Ver código fonte

* Expanded filename buffer in FileRec to 512 bytes, so it can hold enough unicode characters.

git-svn-id: branches/unicodertl@12191 -
yury 17 anos atrás
pai
commit
9dc1820490
3 arquivos alterados com 10 adições e 9 exclusões
  1. 6 6
      compiler/symdef.pas
  2. 3 2
      rtl/inc/filerec.inc
  3. 1 1
      rtl/inc/textrec.inc

+ 6 - 6
compiler/symdef.pas

@@ -1776,23 +1776,23 @@ implementation
         case filetyp of
           ft_text :
             if target_info.system in [system_x86_64_win64,system_ia64_win64] then
-              savesize:=632{+8}
+              savesize:=888{+8}
             else
-              savesize:=628{+8};
+              savesize:=884{+8};
           ft_typed,
           ft_untyped :
             if target_info.system in [system_x86_64_win64,system_ia64_win64] then
-              savesize:=372
+              savesize:=628
             else
-              savesize:=368;
+              savesize:=624;
         end;
 {$else cpu64bitaddr}
         case filetyp of
           ft_text :
-            savesize:=592{+4};
+            savesize:=848{+4};
           ft_typed,
           ft_untyped :
-            savesize:=332;
+            savesize:=588;
         end;
 {$endif cpu64bitaddr}
       end;

+ 3 - 2
rtl/inc/filerec.inc

@@ -21,7 +21,8 @@
 }
 
 const
-  filerecnamelength = 255;
+  filerecnamelength = {$ifdef VER2_2} 256 {$else} 512 {$endif};
+
 type
   FileRec = Packed Record
     Handle    : THandle;
@@ -29,6 +30,6 @@ type
     RecSize   : SizeInt;
     _private  : array[1..3 * SizeOf(SizeInt) + 5 * SizeOf (pointer)] of byte;
     UserData  : array[1..32] of byte;
-    name      : array[0..filerecnamelength div SizeOf(RtlChar)] of RtlChar;
+    name      : array[0..(filerecnamelength div SizeOf(RtlChar))-1] of RtlChar;
   End;
 

+ 1 - 1
rtl/inc/textrec.inc

@@ -21,7 +21,7 @@
 }
 
 const
-  TextRecNameLength = 256;
+  TextRecNameLength = {$ifdef VER2_2} 256 {$else} 512 {$endif};
   TextRecBufSize    = 256;
 type
   TLineEndStr = string [3];