Browse Source

+ FileNameCaseSensetive boolean

peter 26 years ago
parent
commit
3f9b3dc921
5 changed files with 44 additions and 13 deletions
  1. 8 2
      rtl/go32v2/dos.pp
  2. 10 2
      rtl/go32v2/system.pp
  3. 5 2
      rtl/win32/Makefile
  4. 8 2
      rtl/win32/dos.pp
  5. 13 5
      rtl/win32/syswin32.pp

+ 8 - 2
rtl/go32v2/dos.pp

@@ -740,7 +740,10 @@ end;
               pa[1]:=CHR(ORD(Pa[1])-32);
               pa[1]:=CHR(ORD(Pa[1])-32);
            end
            end
           else
           else
-           pa:=upcase(path);
+           if FileNameCaseSensitive then
+            pa:=path
+           else
+            pa:=upcase(path);
           { allow slash as backslash }
           { allow slash as backslash }
           for i:=1 to length(pa) do
           for i:=1 to length(pa) do
            if pa[i]='/' then
            if pa[i]='/' then
@@ -994,7 +997,10 @@ End;
 end.
 end.
 {
 {
   $Log$
   $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
     * fixed LFNFindfirst on network drives
 
 
   Revision 1.4  1999/03/01 15:40:48  peter
   Revision 1.4  1999/03/01 15:40:48  peter

+ 10 - 2
rtl/go32v2/system.pp

@@ -29,6 +29,8 @@ const
   StdOutputHandle = 1;
   StdOutputHandle = 1;
   StdErrorHandle  = 2;
   StdErrorHandle  = 2;
 
 
+  FileNameCaseSensitive : boolean = false; 
+
 { Default memory segments (Tp7 compatibility) }
 { Default memory segments (Tp7 compatibility) }
   seg0040 = $0040;
   seg0040 = $0040;
   segA000 = $A000;
   segA000 = $A000;
@@ -1149,7 +1151,8 @@ begin
   dir[3]:='\';
   dir[3]:='\';
   dir[0]:=char(i+3);
   dir[0]:=char(i+3);
 { upcase the string }
 { upcase the string }
-  dir:=upcase(dir);
+  if not FileNameCaseSensitive then
+   dir:=upcase(dir);
   if drivenr<>0 then   { Drive was supplied. We know it }
   if drivenr<>0 then   { Drive was supplied. We know it }
    dir[1]:=char(65+drivenr-1)
    dir[1]:=char(65+drivenr-1)
   else
   else
@@ -1228,12 +1231,17 @@ Begin
   Setup_Arguments;
   Setup_Arguments;
 { Use LFNSupport LFN }
 { Use LFNSupport LFN }
   LFNSupport:=CheckLFN;
   LFNSupport:=CheckLFN;
+  if LFNSupport then
+   FileNameCaseSensitive:=true;
 { Reset IO Error }
 { Reset IO Error }
   InOutRes:=0;
   InOutRes:=0;
 End.
 End.
 {
 {
   $Log$
   $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
     * define MT for multithreading introduced
 
 
   Revision 1.8  1999/04/08 12:23:02  peter
   Revision 1.8  1999/04/08 12:23:02  peter

+ 5 - 2
rtl/win32/Makefile

@@ -202,7 +202,7 @@ ole2$(PPUEXT) : ole2.pp windows$(PPUEXT) $(SYSTEMPPU)
 # TP7 Compatible RTL Units
 # 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)
 crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMPPU) objpas$(PPUEXT)
 
 
@@ -371,7 +371,10 @@ endif
 
 
 #
 #
 # $Log$
 # $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
 #   * fixed sysutils dependencys
 #   * objpas files are agian in the main Makefile, makefile.op is obsolete
 #   * objpas files are agian in the main Makefile, makefile.op is obsolete
 #
 #

+ 8 - 2
rtl/win32/dos.pp

@@ -617,7 +617,10 @@ var
    i,j  : longint;
    i,j  : longint;
 begin
 begin
    getdir(0,s);
    getdir(0,s);
-   pa:=upcase(path);
+   if FileNameCaseSensitive then
+    pa:=path
+   else
+    pa:=upcase(path);
    { allow slash as backslash }
    { allow slash as backslash }
    for i:=1 to length(pa) do
    for i:=1 to length(pa) do
     if pa[i]='/' then
     if pa[i]='/' then
@@ -876,7 +879,10 @@ End;
 end.
 end.
 {
 {
   $Log$
   $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
     * removed os.inc
 
 
   Revision 1.13  1998/11/16 15:48:53  peter
   Revision 1.13  1998/11/16 15:48:53  peter

+ 13 - 5
rtl/win32/syswin32.pp

@@ -34,6 +34,8 @@ const
    StdOutputHandle : longint = 0;
    StdOutputHandle : longint = 0;
    StdErrorHandle  : longint = 0;
    StdErrorHandle  : longint = 0;
 
 
+   FileNameCaseSensitive : boolean = true;
+
 type
 type
   TStartupInfo=packed record
   TStartupInfo=packed record
     cb : longint;
     cb : longint;
@@ -613,12 +615,12 @@ procedure chdir(const s:string);[IOCHECK];
  end;
  end;
 
 
 procedure getdir(drivenr:byte;var dir:shortstring);
 procedure getdir(drivenr:byte;var dir:shortstring);
- const
+const
   Drive:array[0..3]of char=(#0,':',#0,#0);
   Drive:array[0..3]of char=(#0,':',#0,#0);
- var
+var
   defaultdrive:boolean;
   defaultdrive:boolean;
   DirBuf,SaveBuf:array[0..259] of Char;
   DirBuf,SaveBuf:array[0..259] of Char;
- begin
+begin
   defaultdrive:=drivenr=0;
   defaultdrive:=drivenr=0;
   if not defaultdrive then
   if not defaultdrive then
    begin
    begin
@@ -630,7 +632,10 @@ procedure getdir(drivenr:byte;var dir:shortstring);
   if not defaultdrive then
   if not defaultdrive then
    SetCurrentDirectory(@SaveBuf);
    SetCurrentDirectory(@SaveBuf);
   dir:=strpas(DirBuf);
   dir:=strpas(DirBuf);
- end;
+  if not FileNameCaseSensitive then
+   dir:=upcase(dir);
+end;
+
 
 
 {*****************************************************************************
 {*****************************************************************************
                          SystemUnit Initialization
                          SystemUnit Initialization
@@ -1010,7 +1015,10 @@ end.
 
 
 {
 {
   $Log$
   $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
     * removed os.inc
 
 
   Revision 1.36  1999/03/24 23:25:59  peter
   Revision 1.36  1999/03/24 23:25:59  peter