Browse Source

* avr uses a reduced buffer and file name length in textrecs and filerecs
* fixed file and text sizes for avr

git-svn-id: trunk@22147 -

florian 13 years ago
parent
commit
04034b6771
3 changed files with 13 additions and 4 deletions
  1. 4 4
      compiler/symdef.pas
  2. 4 0
      rtl/inc/filerec.inc
  3. 5 0
      rtl/inc/textrec.inc

+ 4 - 4
compiler/symdef.pas

@@ -2466,15 +2466,15 @@ implementation
             savesize:=332;
             savesize:=332;
         end;
         end;
 {$endif cpu32bitaddr}
 {$endif cpu32bitaddr}
-{$ifdef cpu8bitaddr}
+{$ifdef cpu16bitaddr}
         case filetyp of
         case filetyp of
           ft_text :
           ft_text :
-            savesize:=127;
+            savesize:=96;
           ft_typed,
           ft_typed,
           ft_untyped :
           ft_untyped :
-            savesize:=127;
+            savesize:=76;
         end;
         end;
-{$endif cpu8bitaddr}
+{$endif cpu16bitaddr}
       end;
       end;
 
 
 
 

+ 4 - 0
rtl/inc/filerec.inc

@@ -21,7 +21,11 @@
 }
 }
 
 
 const
 const
+{$ifdef CPUAVR}
+  filerecnamelength = 15;
+{$else CPUAVR}
   filerecnamelength = 255;
   filerecnamelength = 255;
+{$endif CPUAVR}
 type
 type
  { using packed makes the compiler to generate ugly code on some CPUs, further
  { using packed makes the compiler to generate ugly code on some CPUs, further
     using packed causes the compiler to handle arrays of text wrongly, see  see tw0754 e.g. on arm  }
     using packed causes the compiler to handle arrays of text wrongly, see  see tw0754 e.g. on arm  }

+ 5 - 0
rtl/inc/textrec.inc

@@ -20,8 +20,13 @@
 }
 }
 
 
 const
 const
+{$ifdef CPUAVR}
+  TextRecNameLength = 16;
+  TextRecBufSize    = 16;
+{$else CPUAVR}
   TextRecNameLength = 256;
   TextRecNameLength = 256;
   TextRecBufSize    = 256;
   TextRecBufSize    = 256;
+{$endif CPUAVR}
 type
 type
   TLineEndStr = string [3];
   TLineEndStr = string [3];
   TextBuf = array[0..TextRecBufSize-1] of char;
   TextBuf = array[0..TextRecBufSize-1] of char;