peter 27 rokov pred
rodič
commit
aace149d8c

+ 9 - 2
compiler/comphook.pas

@@ -111,7 +111,11 @@ begin
       gccfilename[i]:=s[i];
      end;
    end;
+{$ifopt H+}
+  setlength(gccfilename,length(s));
+{$else}
   gccfilename[0]:=s[0];
+{$endif}
 end;
 
 
@@ -209,7 +213,7 @@ begin
          begin
            if status.use_gccoutput then
              hs:=gccfilename(status.currentsource)+':'+tostr(status.currentline)+': '+hs
-                 +tostr(status.currentcolumn)+': ' 
+                 +tostr(status.currentcolumn)+': '
            else
              hs:=status.currentsource+'('+tostr(status.currentline)
                  +','+tostr(status.currentcolumn)+') '+hs;
@@ -254,7 +258,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.10  1998-10-27 13:45:25  pierre
+  Revision 1.11  1998-11-16 12:17:59  peter
+    * H+ fixes
+
+  Revision 1.10  1998/10/27 13:45:25  pierre
     * classes get a vmt allways
     * better error info (tried to remove
       several error strings introduced by the tpexcept handling)

+ 8 - 1
compiler/files.pas

@@ -478,7 +478,11 @@ unit files;
              getlinestr[i]:=c;
              inc(longint(p));
            until (i=255);
+{$ifopt H+}
+           setlength(getlinestr,i);
+{$else}
            getlinestr[0]:=chr(i);
+{$endif}
          end;
       end;
 
@@ -1042,7 +1046,10 @@ unit files;
 end.
 {
   $Log$
-  Revision 1.73  1998-11-16 11:28:58  pierre
+  Revision 1.74  1998-11-16 12:18:01  peter
+    * H+ fixes
+
+  Revision 1.73  1998/11/16 11:28:58  pierre
     * stackcheck removed for i386_win32
     * exportlist does not crash at least !!
       (was need for tests dir !)z

+ 8 - 1
compiler/ppu.pas

@@ -575,7 +575,11 @@ function tppufile.getstring:string;
 var
   s : string;
 begin
+{$ifopt H+}
+  setlength(s,getbyte);
+{$else}
   s[0]:=chr(getbyte);
+{$endif}
   if entryidx+length(s)>entry.size then
    begin
      error:=true;
@@ -776,7 +780,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.17  1998-10-14 10:45:08  pierre
+  Revision 1.18  1998-11-16 12:18:03  peter
+    * H+ fixes
+
+  Revision 1.17  1998/10/14 10:45:08  pierre
     * ppu problems for m68k fixed (at least in cross compiling)
     * one last memory leak for sysamiga fixed
     * the amiga RTL compiles now completely !!

+ 17 - 3
compiler/scandir.inc

@@ -140,7 +140,11 @@ const
                                end
                              else
                                len:=mac^.buflen;
+{$ifopt H+}
+                             setlength(hs,len);
+{$else}
                              hs[0]:=char(len);
+{$endif}
                              move(mac^.buftext^,hs[1],len);
                           end
                         else
@@ -508,12 +512,19 @@ const
         name  : namestr;
         ext   : extstr;
         hp    : pinputfile;
+        i     : longint;
         found : boolean;
       begin
         current_scanner^.skipspace;
         hs:=current_scanner^.readcomment;
-        while (hs<>'') and (hs[length(hs)]=' ') do
-         dec(byte(hs[0]));
+        i:=length(hs);
+        while (i>0) and (hs[i]=' ') do
+         dec(i);
+{$ifopt H+}
+        setlength(hs,i);
+{$else}
+        hs[0]:=chr(i);
+{$endif}
         if hs='' then
          exit;
         if (hs[1]='%') then
@@ -974,7 +985,10 @@ const
 
 {
   $Log$
-  Revision 1.41  1998-10-22 17:54:08  florian
+  Revision 1.42  1998-11-16 12:18:04  peter
+    * H+ fixes
+
+  Revision 1.41  1998/10/22 17:54:08  florian
     + switch $APPTYPE for win32 added
 
   Revision 1.40  1998/10/21 20:16:04  peter

+ 17 - 1
compiler/scanner.pas

@@ -647,8 +647,13 @@ implementation
            break;
           end;
         until false;
+{$ifopt H+}
+        setlength(orgpattern,i);
+        setlength(pattern,i);
+{$else}
         orgpattern[0]:=chr(i);
         pattern[0]:=chr(i);
+{$endif}
       end;
 
 
@@ -695,7 +700,11 @@ implementation
       { was the next char a linebreak ? }
         if c in [#10,#13] then
          linebreak;
+{$ifopt H+}
+        setlength(pattern,i);
+{$else}
         pattern[0]:=chr(i);
+{$endif}
       end;
 
 
@@ -747,7 +756,11 @@ implementation
           if c in [#10,#13] then
            linebreak;
         until false;
+{$ifopt H+}
+        setlength(readcomment,i);
+{$else}
         readcomment[0]:=chr(i);
+{$endif}
       end;
 
 
@@ -1522,7 +1535,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.66  1998-11-05 23:48:29  peter
+  Revision 1.67  1998-11-16 12:18:06  peter
+    * H+ fixes
+
+  Revision 1.66  1998/11/05 23:48:29  peter
     * recordtype.field support in constant expressions
     * fixed imul for oa_imm8 which was not allowed
     * fixed reading of local typed constants