diff --git a/rtl/go32v2/dos.pp b/rtl/go32v2/dos.pp index 8b210464c9..3a222a1666 100644 --- a/rtl/go32v2/dos.pp +++ b/rtl/go32v2/dos.pp @@ -740,7 +740,10 @@ end; pa[1]:=CHR(ORD(Pa[1])-32); end else - pa:=upcase(path); + if FileNameCaseSensitive then + pa:=path + else + pa:=upcase(path); { allow slash as backslash } for i:=1 to length(pa) do if pa[i]='/' then @@ -994,7 +997,10 @@ End; end. { $Log$ - Revision 1.5 1999-04-02 00:01:29 peter + Revision 1.6 1999-04-28 11:42:44 peter + + FileNameCaseSensetive boolean + + Revision 1.5 1999/04/02 00:01:29 peter * fixed LFNFindfirst on network drives Revision 1.4 1999/03/01 15:40:48 peter diff --git a/rtl/go32v2/system.pp b/rtl/go32v2/system.pp index b8d982543a..aa54fbae8a 100644 --- a/rtl/go32v2/system.pp +++ b/rtl/go32v2/system.pp @@ -29,6 +29,8 @@ const StdOutputHandle = 1; StdErrorHandle = 2; + FileNameCaseSensitive : boolean = false; + { Default memory segments (Tp7 compatibility) } seg0040 = $0040; segA000 = $A000; @@ -1149,7 +1151,8 @@ begin dir[3]:='\'; dir[0]:=char(i+3); { upcase the string } - dir:=upcase(dir); + if not FileNameCaseSensitive then + dir:=upcase(dir); if drivenr<>0 then { Drive was supplied. We know it } dir[1]:=char(65+drivenr-1) else @@ -1228,12 +1231,17 @@ Begin Setup_Arguments; { Use LFNSupport LFN } LFNSupport:=CheckLFN; + if LFNSupport then + FileNameCaseSensitive:=true; { Reset IO Error } InOutRes:=0; End. { $Log$ - Revision 1.9 1999-04-28 06:01:25 florian + Revision 1.10 1999-04-28 11:42:45 peter + + FileNameCaseSensetive boolean + + Revision 1.9 1999/04/28 06:01:25 florian * define MT for multithreading introduced Revision 1.8 1999/04/08 12:23:02 peter diff --git a/rtl/win32/Makefile b/rtl/win32/Makefile index ac5c59e1a8..449f912a24 100644 --- a/rtl/win32/Makefile +++ b/rtl/win32/Makefile @@ -202,7 +202,7 @@ ole2$(PPUEXT) : ole2.pp windows$(PPUEXT) $(SYSTEMPPU) # TP7 Compatible RTL Units # -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc $(SYSTEMPPU) +dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMPPU) crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMPPU) objpas$(PPUEXT) @@ -371,7 +371,10 @@ endif # # $Log$ -# Revision 1.26 1999-04-22 10:56:33 peter +# Revision 1.27 1999-04-28 11:42:50 peter +# + FileNameCaseSensetive boolean +# +# Revision 1.26 1999/04/22 10:56:33 peter # * fixed sysutils dependencys # * objpas files are agian in the main Makefile, makefile.op is obsolete # diff --git a/rtl/win32/dos.pp b/rtl/win32/dos.pp index ddc6abf3ec..0416669585 100644 --- a/rtl/win32/dos.pp +++ b/rtl/win32/dos.pp @@ -617,7 +617,10 @@ var i,j : longint; begin getdir(0,s); - pa:=upcase(path); + if FileNameCaseSensitive then + pa:=path + else + pa:=upcase(path); { allow slash as backslash } for i:=1 to length(pa) do if pa[i]='/' then @@ -876,7 +879,10 @@ End; end. { $Log$ - Revision 1.14 1999-04-08 12:23:07 peter + Revision 1.15 1999-04-28 11:42:52 peter + + FileNameCaseSensetive boolean + + Revision 1.14 1999/04/08 12:23:07 peter * removed os.inc Revision 1.13 1998/11/16 15:48:53 peter diff --git a/rtl/win32/syswin32.pp b/rtl/win32/syswin32.pp index 8b830f5935..619a251e07 100644 --- a/rtl/win32/syswin32.pp +++ b/rtl/win32/syswin32.pp @@ -34,6 +34,8 @@ const StdOutputHandle : longint = 0; StdErrorHandle : longint = 0; + FileNameCaseSensitive : boolean = true; + type TStartupInfo=packed record cb : longint; @@ -613,12 +615,12 @@ procedure chdir(const s:string);[IOCHECK]; end; procedure getdir(drivenr:byte;var dir:shortstring); - const +const Drive:array[0..3]of char=(#0,':',#0,#0); - var +var defaultdrive:boolean; DirBuf,SaveBuf:array[0..259] of Char; - begin +begin defaultdrive:=drivenr=0; if not defaultdrive then begin @@ -630,7 +632,10 @@ procedure getdir(drivenr:byte;var dir:shortstring); if not defaultdrive then SetCurrentDirectory(@SaveBuf); dir:=strpas(DirBuf); - end; + if not FileNameCaseSensitive then + dir:=upcase(dir); +end; + {***************************************************************************** SystemUnit Initialization @@ -1010,7 +1015,10 @@ end. { $Log$ - Revision 1.37 1999-04-08 12:23:11 peter + Revision 1.38 1999-04-28 11:42:53 peter + + FileNameCaseSensetive boolean + + Revision 1.37 1999/04/08 12:23:11 peter * removed os.inc Revision 1.36 1999/03/24 23:25:59 peter