* Merges from Fixes branch

This commit is contained in:
carl 2002-05-09 08:42:24 +00:00
parent 07af6301de
commit 75a02e7812
3 changed files with 81 additions and 18 deletions

View File

@ -50,6 +50,7 @@ var
v2prt0_ds_alias : word;external name '___v2prt0_ds_alias';
const
MousePresent : boolean = false;
First_try : boolean = true;
{$ifdef DEBUG}
MouseError : longint = 0;
CallCounter : longint = 0;
@ -465,7 +466,11 @@ begin
begin
if DetectMouse=0 then
begin
Writeln('No mouse driver found ');
if First_try then
begin
Writeln('No mouse driver found ');
First_try:=false;
end;
exit;
end
else
@ -770,17 +775,20 @@ Begin
end.
{
$Log$
Revision 1.5 2002-01-19 11:57:55 peter
* merged fixes
Revision 1.6 2002-05-09 08:42:24 carl
* Merges from Fixes branch
Revision 1.4 2001/12/26 21:20:47 peter
* more xp fixes
Revision 1.1.2.6 2002/04/12 12:01:48 pierre
* fix bug report 1701
Revision 1.3 2001/12/26 21:03:56 peter
* merged fixes from 1.0.x
Revision 1.1.2.5 2002/01/08 16:34:52 pierre
a working callback for XP
Revision 1.2 2001/09/22 00:01:42 michael
+ Merged driver support for mouse from fixbranch
Revision 1.1.2.4 2001/12/20 08:36:07 pierre
* one more try to fix mouse for XP
Revision 1.1.2.3 2001/12/17 15:21:17 pierre
* resotre all registers in NT realmode callback for XP
Revision 1.1.2.2 2001/09/21 23:53:48 michael
+ Added mouse driver support.

View File

@ -90,7 +90,7 @@ BEGIN
sysrealintr($21,regs);
if (regs.realflags and 1) <> 0 then
begin
InOutRes:=lo(regs.realeax);
DosStreamError:=lo(regs.realeax);
FileOpen:=$0;
exit;
end
@ -135,9 +135,15 @@ END;
{---------------------------------------------------------------------------}
FUNCTION FileRead (Handle: THandle; Var Buf; Count: Sw_Word;
Var Actual: Sw_Word): Word;
Var
StoreInOutRes : word;
BEGIN
StoreInOutRes:=InOutRes;
InOutRes:=0;
Actual:=system.do_read(longint(Handle),longint(@Buf),Count);
FileRead:=InOutRes;
DosStreamError:=InOutRes;
InOutRes:=StoreInOutRes;
FileRead:=DosStreamError;
End;
@ -145,10 +151,16 @@ End;
{ FileWrite -> Platforms DOS - Checked 05May1998 CEC }
{---------------------------------------------------------------------------}
FUNCTION FileWrite (Handle: THandle; Var Buf; Count: Sw_Word; Var Actual: Sw_Word): Word;
Var
StoreInOutRes : word;
BEGIN
StoreInOutRes:=InOutRes;
InOutRes:=0;
system.do_write(longint(Handle),longint(@Buf),Count);
Actual:=Count;
FileWrite:=InOutRes;
DosStreamError:=InOutRes;
InOutRes:=StoreInOutRes;
FileWrite:=DosStreamError;
End;
@ -181,7 +193,31 @@ END;
{
$Log$
Revision 1.2 2000-07-13 11:33:40 michael
+ removed logs
Revision 1.3 2002-05-09 08:42:24 carl
* Merges from Fixes branch
Revision 1.1.2.1 2002/04/12 08:08:08 pierre
* avoid that objects unit is sensitive to or changes system.InOutRes value
Revision 1.1 2000/07/13 06:30:39 michael
+ Initial import
Revision 1.7 2000/06/30 22:16:19 peter
* fixed truncate
Revision 1.6 2000/05/30 06:45:53 marco
* fixed in line 164 pointer(@buf) to buf
Revision 1.5 2000/03/20 19:19:44 pierre
* LFN support in streams
Revision 1.4 2000/02/09 16:59:29 peter
* truncated log
Revision 1.3 2000/01/07 16:41:32 daniel
* copyright 2000
Revision 1.2 2000/01/07 16:32:23 daniel
* copyright 2000 added
}

View File

@ -691,9 +691,25 @@ end;
****************************************************************************}
Function GetEnvironmentVariable(Const EnvVar : String) : String;
var
hp : ppchar;
lenvvar,hs : string;
eqpos : longint;
begin
Result:=getenv(EnvVar);
lenvvar:=upcase(envvar);
hp:=envp;
Result:='';
while assigned(hp^) do
begin
hs:=strpas(hp^);
eqpos:=pos('=',hs);
if upcase(copy(hs,1,eqpos-1))=lenvvar then
begin
Result:=copy(hs,eqpos+1,length(hs)-eqpos);
exit;
end;
inc(hp);
end;
end;
{****************************************************************************
@ -708,7 +724,10 @@ Finalization
end.
{
$Log$
Revision 1.8 2002-01-25 16:23:03 peter
Revision 1.9 2002-05-09 08:42:24 carl
* Merges from Fixes branch
Revision 1.8 2002/01/25 16:23:03 peter
* merged filesearch() fix
Revision 1.7 2002/01/19 11:57:55 peter