浏览代码

* increased maxsize of link.res file name
* fixed a 255-limit in TScript.WriteToDisk

olle 21 年之前
父节点
当前提交
f11951edf2
共有 2 个文件被更改,包括 17 次插入35 次删除
  1. 7 3
      compiler/link.pas
  2. 10 32
      compiler/script.pas

+ 7 - 3
compiler/link.pas

@@ -35,8 +35,8 @@ Type
     TLinkerInfo=record
       ExeCmd,
       DllCmd        : array[1..3] of string[100];
-      ResName       : string[12];
-      ScriptName    : string[12];
+      ResName       : string[100];
+      ScriptName    : string[100];
       ExtraOptions  : string;
       DynamicLinker : string[100];
     end;
@@ -676,7 +676,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.40  2004-02-19 20:40:15  olle
+  Revision 1.41  2004-02-24 00:53:49  olle
+    * increased maxsize of link.res file name
+    * fixed a 255-limit in TScript.WriteToDisk
+
+  Revision 1.40  2004/02/19 20:40:15  olle
     + Support for Link on target especially for MacOS
     + TLinkerMPW
     + TAsmScriptMPW

+ 10 - 32
compiler/script.pas

@@ -31,7 +31,7 @@ uses
 
 type
   TScript=class
-    fn   : string[80];
+    fn   : string[100];
     data : TStringList;
     executable : boolean;
     constructor Create(const s:string);
@@ -172,43 +172,20 @@ begin
   Empty:=Data.Empty;
 end;
 
-(*
 procedure TScript.WriteToDisk;
 var
   t : file;
+  i : longint;
   s : string;
   le: string[2];
+
 begin
+  Assign(t,fn);
   if cs_link_on_target in aktglobalswitches then
     le:= target_info.newline
   else
     le:= source_info.newline;
 
-  Assign(t,fn);
-  Rewrite(t,1);
-
-  while not data.Empty do
-    begin
-      s:= data.GetFirst;
-      BlockWrite(t, s[1] ,Length(s));
-      BlockWrite(t, le[1], Length(le));
-    end;
-
-  Close(t);
-{$ifdef hasUnix}
-  if executable then
-   {$ifdef VER1_0}ChMod{$else}fpchmod{$endif}(fn,493);
-{$endif}
-end;
-*)
-
-procedure TScript.WriteToDisk;
-var
-  t : file;
-  i : longint;
-  s : string;
-begin
-  Assign(t,fn);
   {$I-}
   Rewrite(t,1);
   if ioresult<>0 then
@@ -216,11 +193,8 @@ begin
   while not data.Empty do
     begin
       s:=data.GetFirst;
-      if (cs_link_on_target in aktglobalswitches) then
-        s:=s+target_info.newline
-      else
-        s:=s+source_info.newline;
       Blockwrite(t,s[1],length(s),i);
+      Blockwrite(t,le[1],length(le),i);
     end;
   Close(t);
   {$I+}
@@ -524,7 +498,11 @@ end;
 end.
 {
   $Log$
-  Revision 1.26  2004-02-19 20:40:15  olle
+  Revision 1.27  2004-02-24 00:53:48  olle
+    * increased maxsize of link.res file name
+    * fixed a 255-limit in TScript.WriteToDisk
+
+  Revision 1.26  2004/02/19 20:40:15  olle
     + Support for Link on target especially for MacOS
     + TLinkerMPW
     + TAsmScriptMPW