From 75a02e7812d22adcf3eb6ec0cf94040d3ccfea38 Mon Sep 17 00:00:00 2001 From: carl Date: Thu, 9 May 2002 08:42:24 +0000 Subject: [PATCH] * Merges from Fixes branch --- rtl/go32v2/mouse.pp | 26 +++++++++++++++-------- rtl/go32v2/objinc.inc | 48 ++++++++++++++++++++++++++++++++++++------ rtl/go32v2/sysutils.pp | 25 +++++++++++++++++++--- 3 files changed, 81 insertions(+), 18 deletions(-) diff --git a/rtl/go32v2/mouse.pp b/rtl/go32v2/mouse.pp index 90de659cc5..5abeb09605 100644 --- a/rtl/go32v2/mouse.pp +++ b/rtl/go32v2/mouse.pp @@ -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. diff --git a/rtl/go32v2/objinc.inc b/rtl/go32v2/objinc.inc index 77744c54d4..e9d9bf2d95 100644 --- a/rtl/go32v2/objinc.inc +++ b/rtl/go32v2/objinc.inc @@ -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 + } diff --git a/rtl/go32v2/sysutils.pp b/rtl/go32v2/sysutils.pp index 70b1c4e668..a81478b026 100644 --- a/rtl/go32v2/sysutils.pp +++ b/rtl/go32v2/sysutils.pp @@ -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