Browse Source

* renamed TStringList to TCmdStrList, in general use TCmdStr instead of shortstrings to fix bug #6351

git-svn-id: trunk@6215 -
tom_at_work 18 years ago
parent
commit
106fe68ce6

+ 1 - 1
compiler/assemble.pas

@@ -301,7 +301,7 @@ Implementation
     const
     const
       lastas  : byte=255;
       lastas  : byte=255;
     var
     var
-      LastASBin : string;
+      LastASBin : TCmdStr;
     Function TExternalAssembler.FindAssembler:string;
     Function TExternalAssembler.FindAssembler:string;
       var
       var
         asfound : boolean;
         asfound : boolean;

+ 54 - 153
compiler/cclasses.pas

@@ -36,6 +36,7 @@ interface
 {$ELSE}
 {$ELSE}
       fksysutl,
       fksysutl,
 {$ENDIF}
 {$ENDIF}
+      globtype,
       CUtils,CStreams;
       CUtils,CStreams;
 
 
 {********************************************
 {********************************************
@@ -368,47 +369,45 @@ type
        end;
        end;
 
 
 {********************************************
 {********************************************
-                TStringList
+                TCmdStrList
 ********************************************}
 ********************************************}
 
 
        { string containerItem }
        { string containerItem }
-       TStringListItem = class(TLinkedListItem)
-          FPStr : pshortstring;
+       TCmdStrListItem = class(TLinkedListItem)
+          FPStr : TCmdStr;
        public
        public
-          constructor Create(const s:string);
+          constructor Create(const s:TCmdStr);
           destructor  Destroy;override;
           destructor  Destroy;override;
           function GetCopy:TLinkedListItem;override;
           function GetCopy:TLinkedListItem;override;
-          function Str:string; {$ifdef CCLASSESINLINE}inline;{$endif}
+          function Str:TCmdStr; {$ifdef CCLASSESINLINE}inline;{$endif}
        end;
        end;
 
 
        { string container }
        { string container }
-       TStringList = class(TLinkedList)
+       TCmdStrList = class(TLinkedList)
        private
        private
           FDoubles : boolean;  { if this is set to true, doubles are allowed }
           FDoubles : boolean;  { if this is set to true, doubles are allowed }
        public
        public
           constructor Create;
           constructor Create;
           constructor Create_No_Double;
           constructor Create_No_Double;
           { inserts an Item }
           { inserts an Item }
-          procedure Insert(const s:string);
+          procedure Insert(const s:TCmdStr);
           { concats an Item }
           { concats an Item }
-          procedure Concat(const s:string);
+          procedure Concat(const s:TCmdStr);
           { deletes an Item }
           { deletes an Item }
-          procedure Remove(const s:string);
+          procedure Remove(const s:TCmdStr);
           { Gets First Item }
           { Gets First Item }
-          function  GetFirst:string;
+          function  GetFirst:TCmdStr;
           { Gets last Item }
           { Gets last Item }
-          function  GetLast:string;
+          function  GetLast:TCmdStr;
           { true if string is in the container, compare case sensitive }
           { true if string is in the container, compare case sensitive }
-          function FindCase(const s:string):TStringListItem;
+          function FindCase(const s:TCmdStr):TCmdStrListItem;
           { true if string is in the container }
           { true if string is in the container }
-          function Find(const s:string):TStringListItem;
+          function Find(const s:TCmdStr):TCmdStrListItem;
           { inserts an item }
           { inserts an item }
-          procedure InsertItem(item:TStringListItem); {$ifdef CCLASSESINLINE}inline;{$endif}
+          procedure InsertItem(item:TCmdStrListItem); {$ifdef CCLASSESINLINE}inline;{$endif}
           { concats an item }
           { concats an item }
-          procedure ConcatItem(item:TStringListItem); {$ifdef CCLASSESINLINE}inline;{$endif}
+          procedure ConcatItem(item:TCmdStrListItem); {$ifdef CCLASSESINLINE}inline;{$endif}
           property Doubles:boolean read FDoubles write FDoubles;
           property Doubles:boolean read FDoubles write FDoubles;
-          procedure readstream(f:TCStream);
-          procedure writestream(f:TCStream);
        end;
        end;
 
 
 
 
@@ -2094,74 +2093,74 @@ end;
 
 
 
 
 {****************************************************************************
 {****************************************************************************
-                             TStringListItem
+                             TCmdStrListItem
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor TStringListItem.Create(const s:string);
+    constructor TCmdStrListItem.Create(const s:TCmdStr);
       begin
       begin
         inherited Create;
         inherited Create;
-        FPStr:=stringdup(s);
+        FPStr:=s;
       end;
       end;
 
 
 
 
-    destructor TStringListItem.Destroy;
+    destructor TCmdStrListItem.Destroy;
       begin
       begin
-        stringdispose(FPStr);
+        FPStr:='';
       end;
       end;
 
 
 
 
-    function TStringListItem.Str:string;
+    function TCmdStrListItem.Str:TCmdStr;
       begin
       begin
-        Str:=FPStr^;
+        Str:=FPStr;
       end;
       end;
 
 
 
 
-    function TStringListItem.GetCopy:TLinkedListItem;
+    function TCmdStrListItem.GetCopy:TLinkedListItem;
       begin
       begin
         Result:=(inherited GetCopy);
         Result:=(inherited GetCopy);
-        TStringListItem(Result).FPStr:=stringdup(FPstr^);
+        TCmdStrListItem(Result).FPStr:=FPstr;
       end;
       end;
 
 
 
 
 {****************************************************************************
 {****************************************************************************
-                           TSTRINGList
+                           TCmdStrList
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor tstringList.Create;
+    constructor TCmdStrList.Create;
       begin
       begin
          inherited Create;
          inherited Create;
          FDoubles:=true;
          FDoubles:=true;
       end;
       end;
 
 
 
 
-    constructor tstringList.Create_no_double;
+    constructor TCmdStrList.Create_no_double;
       begin
       begin
          inherited Create;
          inherited Create;
          FDoubles:=false;
          FDoubles:=false;
       end;
       end;
 
 
 
 
-    procedure tstringList.insert(const s : string);
+    procedure TCmdStrList.insert(const s : TCmdStr);
       begin
       begin
          if (s='') or
          if (s='') or
             ((not FDoubles) and (find(s)<>nil)) then
             ((not FDoubles) and (find(s)<>nil)) then
           exit;
           exit;
-         inherited insert(tstringListItem.create(s));
+         inherited insert(TCmdStrListItem.create(s));
       end;
       end;
 
 
 
 
-    procedure tstringList.concat(const s : string);
+    procedure TCmdStrList.concat(const s : TCmdStr);
       begin
       begin
          if (s='') or
          if (s='') or
             ((not FDoubles) and (find(s)<>nil)) then
             ((not FDoubles) and (find(s)<>nil)) then
           exit;
           exit;
-         inherited concat(tstringListItem.create(s));
+         inherited concat(TCmdStrListItem.create(s));
       end;
       end;
 
 
 
 
-    procedure tstringList.remove(const s : string);
+    procedure TCmdStrList.remove(const s : TCmdStr);
       var
       var
-        p : tstringListItem;
+        p : TCmdStrListItem;
       begin
       begin
         if s='' then
         if s='' then
          exit;
          exit;
@@ -2174,188 +2173,90 @@ end;
       end;
       end;
 
 
 
 
-    function tstringList.GetFirst : string;
+    function TCmdStrList.GetFirst : TCmdStr;
       var
       var
-         p : tstringListItem;
+         p : TCmdStrListItem;
       begin
       begin
-         p:=tstringListItem(inherited GetFirst);
+         p:=TCmdStrListItem(inherited GetFirst);
          if p=nil then
          if p=nil then
           GetFirst:=''
           GetFirst:=''
          else
          else
           begin
           begin
-            GetFirst:=p.FPStr^;
+            GetFirst:=p.FPStr;
             p.free;
             p.free;
           end;
           end;
       end;
       end;
 
 
 
 
-    function tstringList.Getlast : string;
+    function TCmdStrList.Getlast : TCmdStr;
       var
       var
-         p : tstringListItem;
+         p : TCmdStrListItem;
       begin
       begin
-         p:=tstringListItem(inherited Getlast);
+         p:=TCmdStrListItem(inherited Getlast);
          if p=nil then
          if p=nil then
           Getlast:=''
           Getlast:=''
          else
          else
           begin
           begin
-            Getlast:=p.FPStr^;
+            Getlast:=p.FPStr;
             p.free;
             p.free;
           end;
           end;
       end;
       end;
 
 
 
 
-    function tstringList.FindCase(const s:string):TstringListItem;
+    function TCmdStrList.FindCase(const s:TCmdStr):TCmdStrListItem;
       var
       var
-        NewNode : tstringListItem;
+        NewNode : TCmdStrListItem;
       begin
       begin
         result:=nil;
         result:=nil;
         if s='' then
         if s='' then
          exit;
          exit;
-        NewNode:=tstringListItem(FFirst);
+        NewNode:=TCmdStrListItem(FFirst);
         while assigned(NewNode) do
         while assigned(NewNode) do
          begin
          begin
-           if NewNode.FPStr^=s then
+           if NewNode.FPStr=s then
             begin
             begin
               result:=NewNode;
               result:=NewNode;
               exit;
               exit;
             end;
             end;
-           NewNode:=tstringListItem(NewNode.Next);
+           NewNode:=TCmdStrListItem(NewNode.Next);
          end;
          end;
       end;
       end;
 
 
 
 
-    function tstringList.Find(const s:string):TstringListItem;
+    function TCmdStrList.Find(const s:TCmdStr):TCmdStrListItem;
       var
       var
-        NewNode : tstringListItem;
+        NewNode : TCmdStrListItem;
         ups     : string;
         ups     : string;
       begin
       begin
         result:=nil;
         result:=nil;
         if s='' then
         if s='' then
          exit;
          exit;
         ups:=upper(s);
         ups:=upper(s);
-        NewNode:=tstringListItem(FFirst);
+        NewNode:=TCmdStrListItem(FFirst);
         while assigned(NewNode) do
         while assigned(NewNode) do
          begin
          begin
-           if upper(NewNode.FPStr^)=ups then
+           if upper(NewNode.FPStr)=ups then
             begin
             begin
               result:=NewNode;
               result:=NewNode;
               exit;
               exit;
             end;
             end;
-           NewNode:=tstringListItem(NewNode.Next);
+           NewNode:=TCmdStrListItem(NewNode.Next);
          end;
          end;
       end;
       end;
 
 
 
 
-    procedure TStringList.InsertItem(item:TStringListItem);
+    procedure TCmdStrList.InsertItem(item:TCmdStrListItem);
       begin
       begin
         inherited Insert(item);
         inherited Insert(item);
       end;
       end;
 
 
 
 
-    procedure TStringList.ConcatItem(item:TStringListItem);
+    procedure TCmdStrList.ConcatItem(item:TCmdStrListItem);
       begin
       begin
         inherited Concat(item);
         inherited Concat(item);
       end;
       end;
 
 
 
 
-    procedure TStringList.readstream(f:TCStream);
-      const
-        BufSize = 16384;
-      var
-        Hsp,
-        p,maxp,
-        Buf    : PChar;
-        Prev   : Char;
-        HsPos,
-        ReadLen,
-        BufPos,
-        BufEnd : Longint;
-        hs     : string;
-
-        procedure ReadBuf;
-        begin
-          if BufPos<BufEnd then
-            begin
-              Move(Buf[BufPos],Buf[0],BufEnd-BufPos);
-              Dec(BufEnd,BufPos);
-              BufPos:=0;
-            end;
-          ReadLen:=f.Read(buf[BufEnd],BufSize-BufEnd);
-          inc(BufEnd,ReadLen);
-        end;
-
-      begin
-        Getmem(Buf,Bufsize);
-        BufPos:=0;
-        BufEnd:=0;
-        HsPos:=1;
-        ReadBuf;
-        repeat
-          hsp:=@hs[hsPos];
-          p:=@Buf[BufPos];
-          maxp:=@Buf[BufEnd];
-          while (p<maxp) and not(P^ in [#10,#13]) do
-            begin
-              hsp^:=p^;
-              inc(p);
-              if hsp-@hs[1]<255 then
-                inc(hsp);
-            end;
-          inc(BufPos,maxp-p);
-          inc(HsPos,maxp-p);
-          prev:=p^;
-          inc(BufPos);
-          { no system uses #10#13 as line seperator (#10 = *nix, #13 = Mac, }
-          { #13#10 = Dos), so if we've got #10, we can safely exit          }
-          if (prev<>#10) then
-            begin
-              if (BufPos>=BufEnd) then
-                begin
-                  ReadBuf;
-                  if BufPos>=BufEnd then
-                    break;
-                end;
-              { is there also a #10 after it? }
-              if prev=#13 then
-                begin
-                  if (Buf[BufPos]=#10) then
-                    inc(BufPos);
-                  prev:=#10;
-                end;
-            end;
-          if prev=#10 then
-            begin
-              hs[0]:=char(hsp-@hs[1]);
-              Concat(hs);
-              HsPos:=1;
-            end;
-        until BufPos>=BufEnd;
-        hs[0]:=char(hsp-@hs[1]);
-        Concat(hs);
-        freemem(buf);
-      end;
-
-
-    procedure TStringList.writestream(f:TCStream);
-      var
-        Node : TStringListItem;
-        LineEnd : string[2];
-      begin
-        Case DefaultTextLineBreakStyle Of
-          tlbsLF: LineEnd := #10;
-          tlbsCRLF: LineEnd := #13#10;
-          tlbsCR: LineEnd := #13;
-        End;
-        Node:=tstringListItem(FFirst);
-        while assigned(Node) do
-          begin
-            f.Write(Node.FPStr^[1],Length(Node.FPStr^));
-            f.Write(LineEnd[1],length(LineEnd));
-            Node:=tstringListItem(Node.Next);
-          end;
-      end;
-
-
 {****************************************************************************
 {****************************************************************************
                                 tdynamicarray
                                 tdynamicarray
 ****************************************************************************}
 ****************************************************************************}

+ 30 - 30
compiler/cfileutils.pas

@@ -81,11 +81,11 @@ interface
         function FindClose(var Res:TCachedSearchRec):boolean;
         function FindClose(var Res:TCachedSearchRec):boolean;
       end;
       end;
 
 
-      TSearchPathList = class(TStringList)
-        procedure AddPath(s:string;addfirst:boolean);overload;
-        procedure AddPath(SrcPath,s:string;addfirst:boolean);overload;
+      TSearchPathList = class(TCmdStrList)
+        procedure AddPath(s:TCmdStr;addfirst:boolean);overload;
+        procedure AddPath(SrcPath,s:TCmdStr;addfirst:boolean);overload;
         procedure AddList(list:TSearchPathList;addfirst:boolean);
         procedure AddList(list:TSearchPathList;addfirst:boolean);
-        function  FindFile(const f : string;allowcache:boolean;var foundfile:string):boolean;
+        function  FindFile(const f : TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
       end;
       end;
 
 
     function  bstoslash(const s : string) : string;
     function  bstoslash(const s : string) : string;
@@ -97,16 +97,16 @@ interface
     function  path_absolute(const s : string) : boolean;
     function  path_absolute(const s : string) : boolean;
     Function  PathExists (const F : String;allowcache:boolean) : Boolean;
     Function  PathExists (const F : String;allowcache:boolean) : Boolean;
     Function  FileExists (const F : String;allowcache:boolean) : Boolean;
     Function  FileExists (const F : String;allowcache:boolean) : Boolean;
-    function  FileExistsNonCase(const path,fn:string;allowcache:boolean;var foundfile:string):boolean;
+    function  FileExistsNonCase(const path,fn:TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
     Function  RemoveDir(d:string):boolean;
     Function  RemoveDir(d:string):boolean;
     Function  FixPath(s:string;allowdot:boolean):string;
     Function  FixPath(s:string;allowdot:boolean):string;
     function  FixFileName(const s:string):string;
     function  FixFileName(const s:string):string;
     function  TargetFixPath(s:string;allowdot:boolean):string;
     function  TargetFixPath(s:string;allowdot:boolean):string;
     function  TargetFixFileName(const s:string):string;
     function  TargetFixFileName(const s:string):string;
     procedure SplitBinCmd(const s:string;var bstr: String;var cstr:TCmdStr);
     procedure SplitBinCmd(const s:string;var bstr: String;var cstr:TCmdStr);
-    function  FindFile(const f : string;path : string;allowcache:boolean;var foundfile:string):boolean;
-    function  FindFilePchar(const f : string;path : pchar;allowcache:boolean;var foundfile:string):boolean;
-    function  FindExe(const bin:string;allowcache:boolean;var foundfile:string):boolean;
+    function  FindFile(const f : TCmdStr;path : TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
+    function  FindFilePchar(const f : TCmdStr;path : pchar;allowcache:boolean;var foundfile:TCmdStr):boolean;
+    function  FindExe(const bin:TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
     function  GetShortName(const n:string):string;
     function  GetShortName(const n:string):string;
 
 
     procedure InitFileUtils;
     procedure InitFileUtils;
@@ -370,7 +370,7 @@ implementation
       end;
       end;
 
 
 
 
-    function FileExistsNonCase(const path,fn:string;allowcache:boolean;var foundfile:string):boolean;
+    function FileExistsNonCase(const path,fn:TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
       var
       var
         fn2 : string;
         fn2 : string;
       begin
       begin
@@ -743,29 +743,29 @@ implementation
      end;
      end;
 
 
 
 
-    procedure TSearchPathList.AddPath(s:string;addfirst:boolean);
+    procedure TSearchPathList.AddPath(s:TCmdStr;addfirst:boolean);
       begin
       begin
         AddPath('',s,AddFirst);
         AddPath('',s,AddFirst);
       end;
       end;
 
 
 
 
-   procedure TSearchPathList.AddPath(SrcPath,s:string;addfirst:boolean);
+   procedure TSearchPathList.AddPath(SrcPath,s:TCmdStr;addfirst:boolean);
      var
      var
        staridx,
        staridx,
        j        : longint;
        j        : longint;
        prefix,
        prefix,
        suffix,
        suffix,
        CurrentDir,
        CurrentDir,
-       currPath : string;
+       currPath : TCmdStr;
        subdirfound : boolean;
        subdirfound : boolean;
 {$ifdef usedircache}
 {$ifdef usedircache}
        dir      : TCachedSearchRec;
        dir      : TCachedSearchRec;
 {$else usedircache}
 {$else usedircache}
        dir      : TSearchRec;
        dir      : TSearchRec;
 {$endif usedircache}
 {$endif usedircache}
-       hp       : TStringListItem;
+       hp       : TCmdStrListItem;
 
 
-       procedure WarnNonExistingPath(const path : string);
+       procedure WarnNonExistingPath(const path : TCmdStr);
        begin
        begin
          if assigned(do_comment) then
          if assigned(do_comment) then
            do_comment(V_Tried,'Path "'+path+'" not found');
            do_comment(V_Tried,'Path "'+path+'" not found');
@@ -899,7 +899,7 @@ implementation
      var
      var
        s : string;
        s : string;
        hl : TSearchPathList;
        hl : TSearchPathList;
-       hp,hp2 : TStringListItem;
+       hp,hp2 : TCmdStrListItem;
      begin
      begin
        if list.empty then
        if list.empty then
         exit;
         exit;
@@ -907,11 +907,11 @@ implementation
        if addfirst then
        if addfirst then
         begin
         begin
           hl:=TSearchPathList.Create;
           hl:=TSearchPathList.Create;
-          hp:=TStringListItem(list.first);
+          hp:=TCmdStrListItem(list.first);
           while assigned(hp) do
           while assigned(hp) do
            begin
            begin
              hl.insert(hp.Str);
              hl.insert(hp.Str);
-             hp:=TStringListItem(hp.next);
+             hp:=TCmdStrListItem(hp.next);
            end;
            end;
           while not hl.empty do
           while not hl.empty do
            begin
            begin
@@ -923,40 +923,40 @@ implementation
         end
         end
        else
        else
         begin
         begin
-          hp:=TStringListItem(list.first);
+          hp:=TCmdStrListItem(list.first);
           while assigned(hp) do
           while assigned(hp) do
            begin
            begin
              hp2:=Find(hp.Str);
              hp2:=Find(hp.Str);
              { Check if already in path, then we don't add it }
              { Check if already in path, then we don't add it }
              if not assigned(hp2) then
              if not assigned(hp2) then
               Concat(hp.Str);
               Concat(hp.Str);
-             hp:=TStringListItem(hp.next);
+             hp:=TCmdStrListItem(hp.next);
            end;
            end;
         end;
         end;
      end;
      end;
 
 
 
 
-   function TSearchPathList.FindFile(const f : string;allowcache:boolean;var foundfile:string):boolean;
+   function TSearchPathList.FindFile(const f :TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
      Var
      Var
-       p : TStringListItem;
+       p : TCmdStrListItem;
      begin
      begin
        FindFile:=false;
        FindFile:=false;
-       p:=TStringListItem(first);
+       p:=TCmdStrListItem(first);
        while assigned(p) do
        while assigned(p) do
         begin
         begin
           result:=FileExistsNonCase(p.Str,f,allowcache,FoundFile);
           result:=FileExistsNonCase(p.Str,f,allowcache,FoundFile);
           if result then
           if result then
             exit;
             exit;
-          p:=TStringListItem(p.next);
+          p:=TCmdStrListItem(p.next);
         end;
         end;
        { Return original filename if not found }
        { Return original filename if not found }
        FoundFile:=f;
        FoundFile:=f;
      end;
      end;
 
 
 
 
-   function FindFile(const f : string;path : string;allowcache:boolean;var foundfile:string):boolean;
+   function FindFile(const f : TCmdStr;path : TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
       Var
       Var
-        singlepathstring : string;
+        singlepathstring : TCmdStr;
         i : longint;
         i : longint;
      begin
      begin
 {$ifdef Unix}
 {$ifdef Unix}
@@ -979,9 +979,9 @@ implementation
      end;
      end;
 
 
 
 
-   function FindFilePchar(const f : string;path : pchar;allowcache:boolean;var foundfile:string):boolean;
+   function FindFilePchar(const f : TCmdStr;path : pchar;allowcache:boolean;var foundfile:TCmdStr):boolean;
       Var
       Var
-        singlepathstring : string;
+        singlepathstring : TCmdStr;
         startpc,pc : pchar;
         startpc,pc : pchar;
         sepch : char;
         sepch : char;
      begin
      begin
@@ -1002,8 +1002,8 @@ implementation
              startpc:=pc;
              startpc:=pc;
              while (pc^<>sepch) and (pc^<>';') and (pc^<>#0) do
              while (pc^<>sepch) and (pc^<>';') and (pc^<>#0) do
               inc(pc);
               inc(pc);
-             move(startpc^,singlepathstring[1],pc-startpc);
-             singlepathstring[0]:=char(longint(pc-startpc));
+			 SetLength(singlepathstring, pc-startpc);
+             move(startpc^,singlepathstring[1],pc-startpc);            
              singlepathstring:=FixPath(ExpandFileName(singlepathstring),false);
              singlepathstring:=FixPath(ExpandFileName(singlepathstring),false);
              result:=FileExistsNonCase(singlepathstring,f,allowcache,FoundFile);
              result:=FileExistsNonCase(singlepathstring,f,allowcache,FoundFile);
              if result then
              if result then
@@ -1017,7 +1017,7 @@ implementation
      end;
      end;
 
 
 
 
-   function  FindExe(const bin:string;allowcache:boolean;var foundfile:string):boolean;
+   function  FindExe(const bin:TCmdStr;allowcache:boolean;var foundfile:TCmdStr):boolean;
      var
      var
        p : pchar;
        p : pchar;
        found : boolean;
        found : boolean;

+ 3 - 3
compiler/compiler.pas

@@ -199,13 +199,13 @@ function Compile(const cmd:string):longint;
 
 
   procedure writepathlist(w:longint;l:TSearchPathList);
   procedure writepathlist(w:longint;l:TSearchPathList);
   var
   var
-    hp : tstringlistitem;
+    hp : TCmdStrListItem;
   begin
   begin
-    hp:=tstringlistitem(l.first);
+    hp:=TCmdStrListItem(l.first);
     while assigned(hp) do
     while assigned(hp) do
      begin
      begin
        Message1(w,hp.str);
        Message1(w,hp.str);
-       hp:=tstringlistitem(hp.next);
+       hp:=TCmdStrListItem(hp.next);
      end;
      end;
   end;
   end;
 
 

+ 1 - 1
compiler/comprsrc.pas

@@ -69,7 +69,7 @@ var
   n,
   n,
   s,
   s,
   resobj,
   resobj,
-  resbin   : string;
+  resbin   : TCmdStr;
   resfound,
   resfound,
   objused  : boolean;
   objused  : boolean;
 begin
 begin

+ 2 - 2
compiler/cutils.pas

@@ -98,7 +98,7 @@ interface
        If it is not quoted, or if the quoting is bad, s is not touched,
        If it is not quoted, or if the quoting is bad, s is not touched,
        and false is returned.
        and false is returned.
     }
     }
-    function DePascalQuote(var s: string): Boolean;
+    function DePascalQuote(var s: ansistring): Boolean;
     function CompareStr(const S1, S2: string): Integer;
     function CompareStr(const S1, S2: string): Integer;
     function CompareText(S1, S2: string): integer;
     function CompareText(S1, S2: string): integer;
 
 
@@ -919,7 +919,7 @@ implementation
       end;
       end;
 
 
 
 
-    function DePascalQuote(var s: string): Boolean;
+    function DePascalQuote(var s: ansistring): Boolean;
       var
       var
         destPos, sourcePos, len: Integer;
         destPos, sourcePos, len: Integer;
         t: string;
         t: string;

+ 4 - 4
compiler/fmodule.pas

@@ -136,7 +136,7 @@ interface
         loaded_from   : tmodule;
         loaded_from   : tmodule;
         _exports      : tlinkedlist;
         _exports      : tlinkedlist;
         dllscannerinputlist : TFPHashList;
         dllscannerinputlist : TFPHashList;
-        resourcefiles : tstringlist;
+        resourcefiles : TCmdStrList;
         linkunitofiles,
         linkunitofiles,
         linkunitstaticlibs,
         linkunitstaticlibs,
         linkunitsharedlibs,
         linkunitsharedlibs,
@@ -192,7 +192,7 @@ interface
        compiled_module   : tmodule;     { Current module which is compiled }
        compiled_module   : tmodule;     { Current module which is compiled }
        usedunits         : tlinkedlist; { Used units for this program }
        usedunits         : tlinkedlist; { Used units for this program }
        loaded_units      : tlinkedlist; { All loaded units }
        loaded_units      : tlinkedlist; { All loaded units }
-       SmartLinkOFiles   : TStringList; { List of .o files which are generated,
+       SmartLinkOFiles   : TCmdStrList; { List of .o files which are generated,
                                           used to delete them after linking }
                                           used to delete them after linking }
 
 
     function get_module(moduleindex : longint) : tmodule;
     function get_module(moduleindex : longint) : tmodule;
@@ -401,7 +401,7 @@ implementation
         locallibrarysearchpath:=TSearchPathList.Create;
         locallibrarysearchpath:=TSearchPathList.Create;
         used_units:=TLinkedList.Create;
         used_units:=TLinkedList.Create;
         dependent_units:=TLinkedList.Create;
         dependent_units:=TLinkedList.Create;
-        resourcefiles:=TStringList.Create;
+        resourcefiles:=TCmdStrList.Create;
         linkunitofiles:=TLinkContainer.Create;
         linkunitofiles:=TLinkContainer.Create;
         linkunitstaticlibs:=TLinkContainer.Create;
         linkunitstaticlibs:=TLinkContainer.Create;
         linkunitsharedlibs:=TLinkContainer.Create;
         linkunitsharedlibs:=TLinkContainer.Create;
@@ -625,7 +625,7 @@ implementation
         dependent_units.free;
         dependent_units.free;
         dependent_units:=TLinkedList.Create;
         dependent_units:=TLinkedList.Create;
         resourcefiles.Free;
         resourcefiles.Free;
-        resourcefiles:=TStringList.Create;
+        resourcefiles:=TCmdStrList.Create;
         linkunitofiles.Free;
         linkunitofiles.Free;
         linkunitofiles:=TLinkContainer.Create;
         linkunitofiles:=TLinkContainer.Create;
         linkunitstaticlibs.Free;
         linkunitstaticlibs.Free;

+ 15 - 15
compiler/fppu.pas

@@ -43,7 +43,7 @@ interface
        tppumodule = class(tmodule)
        tppumodule = class(tmodule)
           ppufile    : tcompilerppufile; { the PPU file }
           ppufile    : tcompilerppufile; { the PPU file }
           sourcefn   : pshortstring; { Source specified with "uses .. in '..'" }
           sourcefn   : pshortstring; { Source specified with "uses .. in '..'" }
-          comments   : tstringlist;
+          comments   : TCmdStrList;
 {$ifdef Test_Double_checksum}
 {$ifdef Test_Double_checksum}
           crc_array  : pointer;
           crc_array  : pointer;
           crc_size   : longint;
           crc_size   : longint;
@@ -156,7 +156,7 @@ uses
     procedure tppumodule.queuecomment(s:string;v,w:longint);
     procedure tppumodule.queuecomment(s:string;v,w:longint);
     begin
     begin
       if comments = nil then
       if comments = nil then
-        comments := tstringlist.create;
+        comments := TCmdStrList.create;
       comments.insert(s);
       comments.insert(s);
     end;
     end;
 
 
@@ -260,18 +260,18 @@ uses
     function tppumodule.search_unit(onlysource,shortname:boolean):boolean;
     function tppumodule.search_unit(onlysource,shortname:boolean):boolean;
       var
       var
          singlepathstring,
          singlepathstring,
-         filename : string;
+         filename : TCmdStr;
 
 
-         Function UnitExists(const ext:string;var foundfile:string):boolean;
+         Function UnitExists(const ext:string;var foundfile:TCmdStr):boolean;
          begin
          begin
            Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
            Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
            UnitExists:=FindFile(FileName+ext,Singlepathstring,true,foundfile);
            UnitExists:=FindFile(FileName+ext,Singlepathstring,true,foundfile);
          end;
          end;
 
 
-         Function PPUSearchPath(const s:string):boolean;
+         Function PPUSearchPath(const s:TCmdStr):boolean;
          var
          var
            found : boolean;
            found : boolean;
-           hs    : string;
+           hs    : TCmdStr;
          begin
          begin
            Found:=false;
            Found:=false;
            singlepathstring:=FixPath(s,false);
            singlepathstring:=FixPath(s,false);
@@ -285,10 +285,10 @@ uses
            PPUSearchPath:=Found;
            PPUSearchPath:=Found;
          end;
          end;
 
 
-         Function SourceSearchPath(const s:string):boolean;
+         Function SourceSearchPath(const s:TCmdStr):boolean;
          var
          var
            found   : boolean;
            found   : boolean;
-           hs      : string;
+           hs      : TCmdStr;
          begin
          begin
            Found:=false;
            Found:=false;
            singlepathstring:=FixPath(s,false);
            singlepathstring:=FixPath(s,false);
@@ -321,7 +321,7 @@ uses
            SourceSearchPath:=Found;
            SourceSearchPath:=Found;
          end;
          end;
 
 
-         Function SearchPath(const s:string):boolean;
+         Function SearchPath(const s:TCmdStr):boolean;
          var
          var
            found : boolean;
            found : boolean;
          begin
          begin
@@ -336,24 +336,24 @@ uses
 
 
          Function SearchPathList(list:TSearchPathList):boolean;
          Function SearchPathList(list:TSearchPathList):boolean;
          var
          var
-           hp : TStringListItem;
+           hp : TCmdStrListItem;
            found : boolean;
            found : boolean;
          begin
          begin
            found:=false;
            found:=false;
-           hp:=TStringListItem(list.First);
+           hp:=TCmdStrListItem(list.First);
            while assigned(hp) do
            while assigned(hp) do
             begin
             begin
               found:=SearchPath(hp.Str);
               found:=SearchPath(hp.Str);
               if found then
               if found then
                break;
                break;
-              hp:=TStringListItem(hp.next);
+              hp:=TCmdStrListItem(hp.next);
             end;
             end;
            SearchPathList:=found;
            SearchPathList:=found;
          end;
          end;
 
 
        var
        var
          fnd : boolean;
          fnd : boolean;
-         hs  : string;
+         hs  : TCmdStr;
        begin
        begin
          if shortname then
          if shortname then
           filename:=FixFileName(Copy(realmodulename^,1,8))
           filename:=FixFileName(Copy(realmodulename^,1,8))
@@ -679,8 +679,8 @@ uses
     procedure tppumodule.readsourcefiles;
     procedure tppumodule.readsourcefiles;
       var
       var
         temp,hs       : string;
         temp,hs       : string;
-        temp_dir      : string;
-        main_dir      : string;
+        temp_dir      : TCmdStr;
+        main_dir      : TCmdStr;
         found,
         found,
         is_main       : boolean;
         is_main       : boolean;
         orgfiletime,
         orgfiletime,

+ 3 - 3
compiler/gendef.pas

@@ -40,7 +40,7 @@ type
     is_empty : boolean;
     is_empty : boolean;
     WrittenOnDisk : boolean;
     WrittenOnDisk : boolean;
     exportlist,
     exportlist,
-    importlist   : tstringlist;
+    importlist   : TCmdStrList;
   end;
   end;
 
 
 var
 var
@@ -62,8 +62,8 @@ begin
   fname:=fn;
   fname:=fn;
   WrittenOnDisk:=false;
   WrittenOnDisk:=false;
   is_empty:=true;
   is_empty:=true;
-  importlist:=TStringList.Create;
-  exportlist:=TStringList.Create;
+  importlist:=TCmdStrList.Create;
+  exportlist:=TCmdStrList.Create;
 end;
 end;
 
 
 
 

+ 12 - 11
compiler/globals.pas

@@ -157,7 +157,7 @@ interface
         procedure SetValue(key:AnsiString;Weight:Integer);
         procedure SetValue(key:AnsiString;Weight:Integer);
         procedure SortonWeight;
         procedure SortonWeight;
         function Find(key:AnsiString):AnsiString;
         function Find(key:AnsiString):AnsiString;
-        procedure Expand(src:TStringList;dest: TLinkStrMap);
+        procedure Expand(src:TCmdStrList;dest: TLinkStrMap);
         procedure UpdateWeights(Weightmap:TLinkStrMap);
         procedure UpdateWeights(Weightmap:TLinkStrMap);
         constructor Create;
         constructor Create;
         property count : longint read itemcnt;
         property count : longint read itemcnt;
@@ -191,10 +191,10 @@ interface
        { directory where the utils can be found (options -FD) }
        { directory where the utils can be found (options -FD) }
        utilsdirectory : TPathStr;
        utilsdirectory : TPathStr;
        { targetname specific prefix used by these utils (options -XP<path>) }
        { targetname specific prefix used by these utils (options -XP<path>) }
-       utilsprefix    : TPathStr;
+       utilsprefix    : TCmdStr;
        cshared        : boolean;        { pass --shared to ld to link C libs shared}
        cshared        : boolean;        { pass --shared to ld to link C libs shared}
        Dontlinkstdlibpath: Boolean;     { Don't add std paths to linkpath}
        Dontlinkstdlibpath: Boolean;     { Don't add std paths to linkpath}
-       rlinkpath      : TPathStr;         { rpath-link linkdir override}
+       rlinkpath      : TCmdStr;         { rpath-link linkdir override}
 
 
        { some flags for global compiler switches }
        { some flags for global compiler switches }
        do_build,
        do_build,
@@ -321,7 +321,7 @@ interface
     function filetimestring( t : longint) : string;
     function filetimestring( t : longint) : string;
     function getrealtime : real;
     function getrealtime : real;
 
 
-    procedure DefaultReplacements(var s:string);
+    procedure DefaultReplacements(var s:ansistring);
 
 
     function Shell(const command:ansistring): longint;
     function Shell(const command:ansistring): longint;
     function  GetEnvPChar(const envname:string):pchar;
     function  GetEnvPChar(const envname:string):pchar;
@@ -491,11 +491,11 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TLinkStrMap.Expand(Src:TStringList;Dest:TLinkStrMap);
+    procedure TLinkStrMap.Expand(Src:TCmdStrList;Dest:TLinkStrMap);
       // expands every thing in Src to Dest for linkorder purposes.
       // expands every thing in Src to Dest for linkorder purposes.
       var
       var
         l,r  : longint;
         l,r  : longint;
-        LibN    : String;
+        LibN    : TCmdStr;
       begin
       begin
         while not src.empty do
         while not src.empty do
           begin
           begin
@@ -598,7 +598,7 @@ implementation
                           Default Macro Handling
                           Default Macro Handling
 ****************************************************************************}
 ****************************************************************************}
 
 
-     procedure DefaultReplacements(var s:string);
+     procedure DefaultReplacements(var s:ansistring);
        begin
        begin
          { Replace some macros }
          { Replace some macros }
          Replace(s,'$FPCVERSION',version_string);
          Replace(s,'$FPCVERSION',version_string);
@@ -1032,7 +1032,8 @@ implementation
 
 
    procedure get_exepath;
    procedure get_exepath;
      var
      var
-       exeName:String;
+	   localExepath : TCmdStr;
+       exeName:TCmdStr;
 {$ifdef need_path_search}
 {$ifdef need_path_search}
        hs1 : TPathStr;
        hs1 : TPathStr;
        p   : pchar;
        p   : pchar;
@@ -1054,12 +1055,12 @@ implementation
 {$else macos}
 {$else macos}
           p:=GetEnvPchar('PATH');
           p:=GetEnvPchar('PATH');
 {$endif macos}
 {$endif macos}
-          FindFilePChar(hs1,p,false,exepath);
+          FindFilePChar(hs1,p,false,localExepath);
           FreeEnvPChar(p);
           FreeEnvPChar(p);
-          exepath:=ExtractFilePath(exepath);
+          localExepath:=ExtractFilePath(localExepath);
         end;
         end;
 {$endif need_path_search}
 {$endif need_path_search}
-       exepath:=FixPath(exepath,false);
+       exepath:=FixPath(localExepath,false);
      end;
      end;
 
 
 
 

+ 1 - 1
compiler/globtype.pas

@@ -32,7 +32,7 @@ interface
          executed from the FPC application. In some circomstances, this can be more
          executed from the FPC application. In some circomstances, this can be more
          than 255 characters. That's why using Ansi Strings}
          than 255 characters. That's why using Ansi Strings}
        TCmdStr = AnsiString;
        TCmdStr = AnsiString;
-       TPathStr = ShortString;
+       TPathStr = String;
 
 
        { Natural integer register type and size for the target machine }
        { Natural integer register type and size for the target machine }
 {$ifdef cpu64bit}
 {$ifdef cpu64bit}

+ 37 - 37
compiler/link.pas

@@ -27,6 +27,7 @@ unit link;
 interface
 interface
 
 
     uses
     uses
+	  sysutils,
       cclasses,
       cclasses,
       systems,
       systems,
       fmodule,
       fmodule,
@@ -50,7 +51,7 @@ interface
          SysInitUnit     : string[20];
          SysInitUnit     : string[20];
          ObjectFiles,
          ObjectFiles,
          SharedLibFiles,
          SharedLibFiles,
-         StaticLibFiles  : TStringList;
+         StaticLibFiles  : TCmdStrList;
          Constructor Create;virtual;
          Constructor Create;virtual;
          Destructor Destroy;override;
          Destructor Destroy;override;
          procedure AddModuleFiles(hp:tmodule);
          procedure AddModuleFiles(hp:tmodule);
@@ -64,7 +65,7 @@ interface
          Function  MakeExecutable:boolean;virtual;
          Function  MakeExecutable:boolean;virtual;
          Function  MakeSharedLibrary:boolean;virtual;
          Function  MakeSharedLibrary:boolean;virtual;
          Function  MakeStaticLibrary:boolean;virtual;
          Function  MakeStaticLibrary:boolean;virtual;
-         procedure ExpandAndApplyOrder(var Src:TStringList);
+         procedure ExpandAndApplyOrder(var Src:TCmdStrList);
          procedure LoadPredefinedLibraryOrder;virtual;
          procedure LoadPredefinedLibraryOrder;virtual;
          function  ReOrderEntries : boolean;
          function  ReOrderEntries : boolean;
        end;
        end;
@@ -75,7 +76,7 @@ interface
          Constructor Create;override;
          Constructor Create;override;
          Destructor Destroy;override;
          Destructor Destroy;override;
          Function  FindUtil(const s:string):String;
          Function  FindUtil(const s:string):String;
-         Function  DoExec(const command:string; para:TCmdStr;showinfo,useshell:boolean):boolean;
+         Function  DoExec(const command:TCmdStr; para:TCmdStr;showinfo,useshell:boolean):boolean;
          procedure SetDefaultInfo;virtual;
          procedure SetDefaultInfo;virtual;
          Function  MakeStaticLibrary:boolean;override;
          Function  MakeStaticLibrary:boolean;override;
        end;
        end;
@@ -100,7 +101,7 @@ interface
          property StaticLibraryList:TFPHashObjectList read FStaticLibraryList;
          property StaticLibraryList:TFPHashObjectList read FStaticLibraryList;
          property ImportLibraryList:TFPHashObjectList read FImportLibraryList;
          property ImportLibraryList:TFPHashObjectList read FImportLibraryList;
          procedure DefaultLinkScript;virtual;abstract;
          procedure DefaultLinkScript;virtual;abstract;
-         linkscript : TStringList;
+         linkscript : TCmdStrList;
       public
       public
          IsSharedLibrary : boolean;
          IsSharedLibrary : boolean;
          Constructor Create;override;
          Constructor Create;override;
@@ -114,8 +115,8 @@ interface
       Linker  : TLinker;
       Linker  : TLinker;
 
 
     function FindObjectFile(s : string;const unitpath:string;isunit:boolean) : string;
     function FindObjectFile(s : string;const unitpath:string;isunit:boolean) : string;
-    function FindLibraryFile(s:string;const prefix,ext:string;var foundfile : string) : boolean;
-    function FindDLL(const s:string;var founddll:string):boolean;
+    function FindLibraryFile(s:string;const prefix,ext:string;var foundfile : TCmdStr) : boolean;
+    function FindDLL(const s:string;var founddll:TCmdStr):boolean;
 
 
     procedure InitLinker;
     procedure InitLinker;
     procedure DoneLinker;
     procedure DoneLinker;
@@ -124,7 +125,6 @@ interface
 Implementation
 Implementation
 
 
     uses
     uses
-      SysUtils,
       cutils,cfileutils,
       cutils,cfileutils,
       script,globals,verbose,comphook,ppu,
       script,globals,verbose,comphook,ppu,
       aasmbase,aasmtai,aasmdata,aasmcpu,
       aasmbase,aasmtai,aasmdata,aasmcpu,
@@ -141,7 +141,7 @@ Implementation
     function FindObjectFile(s:string;const unitpath:string;isunit:boolean) : string;
     function FindObjectFile(s:string;const unitpath:string;isunit:boolean) : string;
       var
       var
         found : boolean;
         found : boolean;
-        foundfile : string;
+        foundfile : TCmdStr;
       begin
       begin
         findobjectfile:='';
         findobjectfile:='';
         if s='' then
         if s='' then
@@ -206,7 +206,7 @@ Implementation
 
 
 
 
     { searches a (windows) DLL file }
     { searches a (windows) DLL file }
-    function FindDLL(const s:string;var founddll:string):boolean;
+    function FindDLL(const s:string;var founddll:TCmdStr):boolean;
       var
       var
         sysdir : string;
         sysdir : string;
         Found : boolean;
         Found : boolean;
@@ -234,7 +234,7 @@ Implementation
 
 
 
 
     { searches an library file }
     { searches an library file }
-    function FindLibraryFile(s:string;const prefix,ext:string;var foundfile : string) : boolean;
+    function FindLibraryFile(s:string;const prefix,ext:string;var foundfile : TCmdStr) : boolean;
       var
       var
         found : boolean;
         found : boolean;
         paths : string;
         paths : string;
@@ -287,9 +287,9 @@ Implementation
     Constructor TLinker.Create;
     Constructor TLinker.Create;
       begin
       begin
         Inherited Create;
         Inherited Create;
-        ObjectFiles:=TStringList.Create_no_double;
-        SharedLibFiles:=TStringList.Create_no_double;
-        StaticLibFiles:=TStringList.Create_no_double;
+        ObjectFiles:=TCmdStrList.Create_no_double;
+        SharedLibFiles:=TCmdStrList.Create_no_double;
+        StaticLibFiles:=TCmdStrList.Create_no_double;
       end;
       end;
 
 
 
 
@@ -428,7 +428,7 @@ Implementation
 
 
     Procedure TLinker.AddStaticLibrary(const S:String);
     Procedure TLinker.AddStaticLibrary(const S:String);
       var
       var
-        ns : string;
+        ns : TCmdStr;
         found : boolean;
         found : boolean;
       begin
       begin
         if s='' then
         if s='' then
@@ -457,7 +457,7 @@ Implementation
 
 
     Procedure TLinker.AddStaticCLibrary(const S:String);
     Procedure TLinker.AddStaticCLibrary(const S:String);
       var
       var
-        ns : string;
+        ns : TCmdStr;
         found : boolean;
         found : boolean;
       begin
       begin
         if s='' then
         if s='' then
@@ -499,7 +499,7 @@ Implementation
       end;
       end;
 
 
 
 
-    Procedure TLinker.ExpandAndApplyOrder(var Src:TStringList);
+    Procedure TLinker.ExpandAndApplyOrder(var Src:TCmdStrList);
       var
       var
         p : TLinkStrMap;
         p : TLinkStrMap;
         i : longint;
         i : longint;
@@ -584,7 +584,7 @@ Implementation
     Function TExternalLinker.FindUtil(const s:string):string;
     Function TExternalLinker.FindUtil(const s:string):string;
       var
       var
         Found    : boolean;
         Found    : boolean;
-        FoundBin : string;
+        FoundBin : TCmdStr;
         UtilExe  : string;
         UtilExe  : string;
       begin
       begin
         if cs_link_on_target in current_settings.globalswitches then
         if cs_link_on_target in current_settings.globalswitches then
@@ -611,7 +611,7 @@ Implementation
       end;
       end;
 
 
 
 
-    Function TExternalLinker.DoExec(const command:string; para:TCmdStr;showinfo,useshell:boolean):boolean;
+    Function TExternalLinker.DoExec(const command:TCmdStr; para:TCmdStr;showinfo,useshell:boolean):boolean;
       var
       var
         exitcode: longint;
         exitcode: longint;
       begin
       begin
@@ -656,12 +656,12 @@ Implementation
 
 
     Function TExternalLinker.MakeStaticLibrary:boolean;
     Function TExternalLinker.MakeStaticLibrary:boolean;
 
 
-        function GetNextFiles(const maxCmdLength : AInt; var item : TStringListItem) : ansistring;
+        function GetNextFiles(const maxCmdLength : AInt; var item : TCmdStrListItem) : ansistring;
           begin
           begin
             result := '';
             result := '';
             while (assigned(item) and ((length(result) + length(item.str) + 1) < maxCmdLength)) do begin
             while (assigned(item) and ((length(result) + length(item.str) + 1) < maxCmdLength)) do begin
               result := result + ' ' + item.str;
               result := result + ' ' + item.str;
-              item := TStringListItem(item.next);
+              item := TCmdStrListItem(item.next);
             end;
             end;
           end;
           end;
 
 
@@ -669,7 +669,7 @@ Implementation
         binstr, scriptfile : string;
         binstr, scriptfile : string;
         success : boolean;
         success : boolean;
         cmdstr, nextcmd, smartpath : TCmdStr;
         cmdstr, nextcmd, smartpath : TCmdStr;
-        current : TStringListItem;
+        current : TCmdStrListItem;
         script: Text;
         script: Text;
         scripted_ar : boolean;
         scripted_ar : boolean;
       begin
       begin
@@ -692,11 +692,11 @@ Implementation
             Rewrite(script);
             Rewrite(script);
             try
             try
               writeln(script, 'CREATE ' + current_module.staticlibfilename^);
               writeln(script, 'CREATE ' + current_module.staticlibfilename^);
-              current := TStringListItem(SmartLinkOFiles.First);
+              current := TCmdStrListItem(SmartLinkOFiles.First);
               while current <> nil do
               while current <> nil do
                 begin
                 begin
                   writeln(script, 'ADDMOD ' + current.str);
                   writeln(script, 'ADDMOD ' + current.str);
-                  current := TStringListItem(current.next);
+                  current := TCmdStrListItem(current.next);
                 end;
                 end;
               writeln(script, 'SAVE');
               writeln(script, 'SAVE');
               writeln(script, 'END');
               writeln(script, 'END');
@@ -710,7 +710,7 @@ Implementation
             Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^));
             Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^));
             { create AR commands }
             { create AR commands }
             success := true;
             success := true;
-            current := TStringListItem(SmartLinkOFiles.First);
+            current := TCmdStrListItem(SmartLinkOFiles.First);
             repeat
             repeat
               nextcmd := cmdstr;
               nextcmd := cmdstr;
               Replace(nextcmd,'$FILES',GetNextFiles(2047, current));
               Replace(nextcmd,'$FILES',GetNextFiles(2047, current));
@@ -754,7 +754,7 @@ Implementation
     Constructor TInternalLinker.Create;
     Constructor TInternalLinker.Create;
       begin
       begin
         inherited Create;
         inherited Create;
-        linkscript:=TStringList.Create;
+        linkscript:=TCmdStrList.Create;
         FStaticLibraryList:=TFPHashObjectList.Create(true);
         FStaticLibraryList:=TFPHashObjectList.Create(true);
         FImportLibraryList:=TFPHashObjectList.Create(true);
         FImportLibraryList:=TFPHashObjectList.Create(true);
         exemap:=nil;
         exemap:=nil;
@@ -838,10 +838,10 @@ Implementation
         s,
         s,
         para,
         para,
         keyword : string;
         keyword : string;
-        hp : TStringListItem;
+        hp : TCmdStrListItem;
       begin
       begin
         exeoutput.Load_Start;
         exeoutput.Load_Start;
-        hp:=tstringlistitem(linkscript.first);
+        hp:=TCmdStrListItem(linkscript.first);
         while assigned(hp) do
         while assigned(hp) do
           begin
           begin
             s:=hp.str;
             s:=hp.str;
@@ -861,7 +861,7 @@ Implementation
               Load_ReadObject(para)
               Load_ReadObject(para)
             else if keyword='READSTATICLIBRARY' then
             else if keyword='READSTATICLIBRARY' then
               Load_ReadStaticLibrary(para);
               Load_ReadStaticLibrary(para);
-            hp:=tstringlistitem(hp.next);
+            hp:=TCmdStrListItem(hp.next);
           end;
           end;
       end;
       end;
 
 
@@ -871,10 +871,10 @@ Implementation
         s,
         s,
         para,
         para,
         keyword : string;
         keyword : string;
-        hp : TStringListItem;
+        hp : TCmdStrListItem;
       begin
       begin
         exeoutput.Order_Start;
         exeoutput.Order_Start;
-        hp:=tstringlistitem(linkscript.first);
+        hp:=TCmdStrListItem(linkscript.first);
         while assigned(hp) do
         while assigned(hp) do
           begin
           begin
             s:=hp.str;
             s:=hp.str;
@@ -892,7 +892,7 @@ Implementation
               ExeOutput.Order_Zeros(para)
               ExeOutput.Order_Zeros(para)
             else if keyword='SYMBOL' then
             else if keyword='SYMBOL' then
               ExeOutput.Order_Symbol(para);
               ExeOutput.Order_Symbol(para);
-            hp:=tstringlistitem(hp.next);
+            hp:=TCmdStrListItem(hp.next);
           end;
           end;
         exeoutput.Order_End;
         exeoutput.Order_End;
       end;
       end;
@@ -903,10 +903,10 @@ Implementation
         s,
         s,
         para,
         para,
         keyword : string;
         keyword : string;
-        hp : TStringListItem;
+        hp : TCmdStrListItem;
       begin
       begin
         exeoutput.CalcPos_Start;
         exeoutput.CalcPos_Start;
-        hp:=tstringlistitem(linkscript.first);
+        hp:=TCmdStrListItem(linkscript.first);
         while assigned(hp) do
         while assigned(hp) do
           begin
           begin
             s:=hp.str;
             s:=hp.str;
@@ -922,24 +922,24 @@ Implementation
               ExeOutput.CalcPos_Header
               ExeOutput.CalcPos_Header
             else if keyword='SYMBOLS' then
             else if keyword='SYMBOLS' then
               ExeOutput.CalcPos_Symbols;
               ExeOutput.CalcPos_Symbols;
-            hp:=tstringlistitem(hp.next);
+            hp:=TCmdStrListItem(hp.next);
           end;
           end;
       end;
       end;
 
 
 
 
     procedure TInternalLinker.PrintLinkerScript;
     procedure TInternalLinker.PrintLinkerScript;
       var
       var
-        hp : TStringListItem;
+        hp : TCmdStrListItem;
       begin
       begin
         if not assigned(exemap) then
         if not assigned(exemap) then
           exit;
           exit;
         exemap.Add('Used linker script');
         exemap.Add('Used linker script');
         exemap.Add('');
         exemap.Add('');
-        hp:=tstringlistitem(linkscript.first);
+        hp:=TCmdStrListItem(linkscript.first);
         while assigned(hp) do
         while assigned(hp) do
           begin
           begin
             exemap.Add(hp.str);
             exemap.Add(hp.str);
-            hp:=tstringlistitem(hp.next);
+            hp:=TCmdStrListItem(hp.next);
           end;
           end;
       end;
       end;
 
 

+ 1 - 1
compiler/ncal.pas

@@ -1382,7 +1382,7 @@ implementation
         objectdf : tobjectdef;
         objectdf : tobjectdef;
         parents : tlinkedlist;
         parents : tlinkedlist;
         objectinfo : tobjectinfoitem;
         objectinfo : tobjectinfoitem;
-        stritem : tstringlistitem;
+        stritem : TCmdStrListItem;
         pd : tprocdef;
         pd : tprocdef;
         i  : integer;
         i  : integer;
         first : boolean;
         first : boolean;

+ 9 - 9
compiler/ncgutil.pas

@@ -1896,17 +1896,17 @@ implementation
 
 
     function has_alias_name(pd:tprocdef;const s:string):boolean;
     function has_alias_name(pd:tprocdef;const s:string):boolean;
       var
       var
-        item : tstringlistitem;
+        item : TCmdStrListItem;
       begin
       begin
         result:=true;
         result:=true;
         if pd.mangledname=s then
         if pd.mangledname=s then
           exit;
           exit;
-        item := tstringlistitem(pd.aliasnames.first);
+        item := TCmdStrListItem(pd.aliasnames.first);
         while assigned(item) do
         while assigned(item) do
           begin
           begin
             if item.str=s then
             if item.str=s then
               exit;
               exit;
-            item := tstringlistitem(item.next);
+            item := TCmdStrListItem(item.next);
           end;
           end;
         result:=false;
         result:=false;
       end;
       end;
@@ -1914,22 +1914,22 @@ implementation
 
 
     procedure alloc_proc_symbol(pd: tprocdef);
     procedure alloc_proc_symbol(pd: tprocdef);
       var
       var
-        item : tstringlistitem;
+        item : TCmdStrListItem;
       begin
       begin
-        item := tstringlistitem(pd.aliasnames.first);
+        item := TCmdStrListItem(pd.aliasnames.first);
         while assigned(item) do
         while assigned(item) do
           begin
           begin
             current_asmdata.DefineAsmSymbol(item.str,AB_GLOBAL,AT_FUNCTION);
             current_asmdata.DefineAsmSymbol(item.str,AB_GLOBAL,AT_FUNCTION);
-            item := tstringlistitem(item.next);
+            item := TCmdStrListItem(item.next);
           end;
           end;
        end;
        end;
 
 
 
 
     procedure gen_proc_symbol(list:TAsmList);
     procedure gen_proc_symbol(list:TAsmList);
       var
       var
-        item : tstringlistitem;
+        item : TCmdStrListItem;
       begin
       begin
-        item := tstringlistitem(current_procinfo.procdef.aliasnames.first);
+        item := TCmdStrListItem(current_procinfo.procdef.aliasnames.first);
         while assigned(item) do
         while assigned(item) do
           begin
           begin
             if (cs_profile in current_settings.moduleswitches) or
             if (cs_profile in current_settings.moduleswitches) or
@@ -1939,7 +1939,7 @@ implementation
               list.concat(Tai_symbol.createname(item.str,AT_FUNCTION,0));
               list.concat(Tai_symbol.createname(item.str,AT_FUNCTION,0));
             if tf_use_function_relative_addresses in target_info.flags then
             if tf_use_function_relative_addresses in target_info.flags then
               list.concat(Tai_function_name.create(item.str));
               list.concat(Tai_function_name.create(item.str));
-            item := tstringlistitem(item.next);
+            item := TCmdStrListItem(item.next);
           end;
           end;
 
 
         current_procinfo.procdef.procstarttai:=tai(list.last);
         current_procinfo.procdef.procstarttai:=tai(list.last);

+ 4 - 6
compiler/options.pas

@@ -49,7 +49,7 @@ Type
     procedure WriteHelpPages;
     procedure WriteHelpPages;
     procedure WriteQuickInfo;
     procedure WriteQuickInfo;
     procedure IllegalPara(const opt:string);
     procedure IllegalPara(const opt:string);
-    function  Unsetbool(var Opts:string; Pos: Longint):boolean;
+    function  Unsetbool(var Opts:TCmdStr; Pos: Longint):boolean;
     procedure interpret_option(const opt :string;ispara:boolean);
     procedure interpret_option(const opt :string;ispara:boolean);
     procedure Interpret_envvar(const envname : string);
     procedure Interpret_envvar(const envname : string);
     procedure Interpret_file(const filename : string);
     procedure Interpret_file(const filename : string);
@@ -348,7 +348,7 @@ begin
 end;
 end;
 
 
 
 
-function Toption.Unsetbool(var Opts:string; Pos: Longint):boolean;
+function Toption.Unsetbool(var Opts:TCmdStr; Pos: Longint):boolean;
 { checks if the character after pos in Opts is a + or a - and returns resp.
 { checks if the character after pos in Opts is a + or a - and returns resp.
   false or true. If it is another character (or none), it also returns false }
   false or true. If it is another character (or none), it also returns false }
 begin
 begin
@@ -367,11 +367,11 @@ procedure TOption.interpret_option(const opt:string;ispara:boolean);
 var
 var
   code : integer;
   code : integer;
   c    : char;
   c    : char;
-  more : string;
+  more : TCmdStr;
   major,minor : longint;
   major,minor : longint;
   error : integer;
   error : integer;
   j,l   : longint;
   j,l   : longint;
-  d,s   : string;
+  d,s   : TCmdStr;
 begin
 begin
   if opt='' then
   if opt='' then
    exit;
    exit;
@@ -2097,7 +2097,6 @@ begin
       if option.quickinfo<>'' then
       if option.quickinfo<>'' then
         option.writequickinfo;
         option.writequickinfo;
     end;
     end;
-
   { Stop if errors in options }
   { Stop if errors in options }
   if ErrorCount>0 then
   if ErrorCount>0 then
    StopOptions(1);
    StopOptions(1);
@@ -2133,7 +2132,6 @@ begin
 
 
   { CPU Define }
   { CPU Define }
   def_system_macro('CPU'+Cputypestr[init_settings.cputype]);
   def_system_macro('CPU'+Cputypestr[init_settings.cputype]);
-
 { Check file to compile }
 { Check file to compile }
   if param_file='' then
   if param_file='' then
    begin
    begin

+ 1 - 1
compiler/parser.pas

@@ -106,7 +106,7 @@ implementation
          DefFile:=TDefFile.Create(outputexedir+ChangeFileExt(inputfilename,target_info.defext));
          DefFile:=TDefFile.Create(outputexedir+ChangeFileExt(inputfilename,target_info.defext));
 
 
          { list of generated .o files, so the linker can remove them }
          { list of generated .o files, so the linker can remove them }
-         SmartLinkOFiles:=TStringList.Create;
+         SmartLinkOFiles:=TCmdStrList.Create;
 
 
          { codegen }
          { codegen }
          if paraprintnodetree<>0 then
          if paraprintnodetree<>0 then

+ 2 - 2
compiler/pmodules.pas

@@ -50,7 +50,7 @@ implementation
       var
       var
         DLLScanner      : TDLLScanner;
         DLLScanner      : TDLLScanner;
         s               : string;
         s               : string;
-        KeepShared      : TStringList;
+        KeepShared      : TCmdStrList;
       begin
       begin
         { try to create import entries from system dlls }
         { try to create import entries from system dlls }
         if (tf_has_dllscanner in target_info.flags) and
         if (tf_has_dllscanner in target_info.flags) and
@@ -61,7 +61,7 @@ implementation
             DLLScanner:=CDLLScanner[target_info.system].Create
             DLLScanner:=CDLLScanner[target_info.system].Create
            else
            else
             internalerror(200104121);
             internalerror(200104121);
-           KeepShared:=TStringList.Create;
+           KeepShared:=TCmdStrList.Create;
            { Walk all shared libs }
            { Walk all shared libs }
            While not current_module.linkOtherSharedLibs.Empty do
            While not current_module.linkOtherSharedLibs.Empty do
             begin
             begin

+ 3 - 3
compiler/scanner.pas

@@ -1455,10 +1455,10 @@ In case not, the value returned can be arbitrary.
 
 
     procedure dir_include;
     procedure dir_include;
 
 
-        function findincludefile(const path,name:string;var foundfile:string):boolean;
+        function findincludefile(const path,name:TCmdStr;var foundfile:TCmdStr):boolean;
         var
         var
           found  : boolean;
           found  : boolean;
-          hpath  : string;
+          hpath  : TCmdStr;
         begin
         begin
           (* look for the include file
           (* look for the include file
            If path was specified as part of {$I } then
            If path was specified as part of {$I } then
@@ -1491,10 +1491,10 @@ In case not, the value returned can be arbitrary.
         end;
         end;
 
 
       var
       var
+        foundfile : TCmdStr;
         path,
         path,
         name,
         name,
         args,
         args,
-        foundfile,
         hs    : tpathstr;
         hs    : tpathstr;
         hp    : tinputfile;
         hp    : tinputfile;
         found : boolean;
         found : boolean;

+ 69 - 68
compiler/script.pas

@@ -24,14 +24,16 @@ unit script;
 {$i fpcdefs.inc}
 {$i fpcdefs.inc}
 
 
 interface
 interface
-
+{$H+}
 uses
 uses
+  sysutils,
+  globtype,
   cclasses;
   cclasses;
 
 
 type
 type
   TScript=class
   TScript=class
     fn   : string[100];
     fn   : string[100];
-    data : TStringList;
+    data : TCmdStrList;
     executable : boolean;
     executable : boolean;
     constructor Create(const s:string);
     constructor Create(const s:string);
     constructor CreateExec(const s:string);
     constructor CreateExec(const s:string);
@@ -44,61 +46,61 @@ type
 
 
   TAsmScript = class (TScript)
   TAsmScript = class (TScript)
     Constructor Create(Const ScriptName : String); virtual;
     Constructor Create(Const ScriptName : String); virtual;
-    Procedure AddAsmCommand (Const Command, Options,FileName : String);virtual;abstract;
-    Procedure AddLinkCommand (Const Command, Options, FileName : String);virtual;abstract;
-    Procedure AddDeleteCommand (Const FileName : String);virtual;abstract;
-    Procedure AddDeleteDirCommand (Const FileName : String);virtual;abstract;
+    Procedure AddAsmCommand (Const Command, Options,FileName : TCmdStr);virtual;abstract;
+    Procedure AddLinkCommand (Const Command, Options, FileName : TCmdStr);virtual;abstract;
+    Procedure AddDeleteCommand (Const FileName : TCmdStr);virtual;abstract;
+    Procedure AddDeleteDirCommand (Const FileName : TCmdStr);virtual;abstract;
   end;
   end;
 
 
   TAsmScriptDos = class (TAsmScript)
   TAsmScriptDos = class (TAsmScript)
-    Constructor Create (Const ScriptName : String); override;
-    Procedure AddAsmCommand (Const Command, Options,FileName : String);override;
-    Procedure AddLinkCommand (Const Command, Options, FileName : String);override;
-    Procedure AddDeleteCommand (Const FileName : String);override;
-    Procedure AddDeleteDirCommand (Const FileName : String);override;
+    Constructor Create (Const ScriptName : TCmdStr); override;
+    Procedure AddAsmCommand (Const Command, Options,FileName : TCmdStr);override;
+    Procedure AddLinkCommand (Const Command, Options, FileName : TCmdStr);override;
+    Procedure AddDeleteCommand (Const FileName : TCmdStr);override;
+    Procedure AddDeleteDirCommand (Const FileName : TCmdStr);override;
     Procedure WriteToDisk;override;
     Procedure WriteToDisk;override;
   end;
   end;
 
 
   TAsmScriptAmiga = class (TAsmScript)
   TAsmScriptAmiga = class (TAsmScript)
     Constructor Create (Const ScriptName : String); override;
     Constructor Create (Const ScriptName : String); override;
-    Procedure AddAsmCommand (Const Command, Options,FileName : String);override;
-    Procedure AddLinkCommand (Const Command, Options, FileName : String);override;
-    Procedure AddDeleteCommand (Const FileName : String);override;
-    Procedure AddDeleteDirCommand (Const FileName : String);override;
+    Procedure AddAsmCommand (Const Command, Options,FileName : TCmdStr);override;
+    Procedure AddLinkCommand (Const Command, Options, FileName : TCmdStr);override;
+    Procedure AddDeleteCommand (Const FileName : TCmdStr);override;
+    Procedure AddDeleteDirCommand (Const FileName : TCmdStr);override;
     Procedure WriteToDisk;override;
     Procedure WriteToDisk;override;
   end;
   end;
 
 
   TAsmScriptUnix = class (TAsmScript)
   TAsmScriptUnix = class (TAsmScript)
     Constructor Create (Const ScriptName : String);override;
     Constructor Create (Const ScriptName : String);override;
-    Procedure AddAsmCommand (Const Command, Options,FileName : String);override;
-    Procedure AddLinkCommand (Const Command, Options, FileName : String);override;
-    Procedure AddDeleteCommand (Const FileName : String);override;
-    Procedure AddDeleteDirCommand (Const FileName : String);override;
+    Procedure AddAsmCommand (Const Command, Options,FileName : TCmdStr);override;
+    Procedure AddLinkCommand (Const Command, Options, FileName : TCmdStr);override;
+    Procedure AddDeleteCommand (Const FileName : TCmdStr);override;
+    Procedure AddDeleteDirCommand (Const FileName : TCmdStr);override;
     Procedure WriteToDisk;override;
     Procedure WriteToDisk;override;
   end;
   end;
 
 
   TAsmScriptMPW = class (TAsmScript)
   TAsmScriptMPW = class (TAsmScript)
-    Constructor Create (Const ScriptName : String); override;
-    Procedure AddAsmCommand (Const Command, Options,FileName : String);override;
-    Procedure AddLinkCommand (Const Command, Options, FileName : String);override;
-    Procedure AddDeleteCommand (Const FileName : String);override;
-    Procedure AddDeleteDirCommand (Const FileName : String);override;
+    Constructor Create (Const ScriptName : TCmdStr); override;
+    Procedure AddAsmCommand (Const Command, Options,FileName : TCmdStr);override;
+    Procedure AddLinkCommand (Const Command, Options, FileName : TCmdStr);override;
+    Procedure AddDeleteCommand (Const FileName : TCmdStr);override;
+    Procedure AddDeleteDirCommand (Const FileName : TCmdStr);override;
     Procedure WriteToDisk;override;
     Procedure WriteToDisk;override;
   end;
   end;
 
 
   TLinkRes = Class (TScript)
   TLinkRes = Class (TScript)
     section: string[30];
     section: string[30];
-    procedure Add(const s:string);
-    procedure AddFileName(const s:string);
-    procedure EndSection(const s:string);
-    procedure StartSection(const s:string);
+    procedure Add(const s:ansistring);
+    procedure AddFileName(const s:ansistring);
+    procedure EndSection(const s:ansistring);
+    procedure StartSection(const s:ansistring);
   end;
   end;
 
 
 var
 var
   AsmRes : TAsmScript;
   AsmRes : TAsmScript;
 
 
-Function ScriptFixFileName(const s:string):string;
-Procedure GenerateAsmRes(const st : string);
+Function ScriptFixFileName(const s:TCmdStr):TCmdStr;
+Procedure GenerateAsmRes(const st : TCmdStr);
 
 
 
 
 implementation
 implementation
@@ -107,16 +109,15 @@ uses
 {$ifdef hasUnix}
 {$ifdef hasUnix}
   BaseUnix,
   BaseUnix,
 {$endif}
 {$endif}
-  SysUtils,
   cutils,cfileutils,
   cutils,cfileutils,
-  globtype,globals,systems,verbose;
+  globals,systems,verbose;
 
 
 
 
 {****************************************************************************
 {****************************************************************************
                                    Helpers
                                    Helpers
 ****************************************************************************}
 ****************************************************************************}
 
 
-    Function ScriptFixFileName(const s:string):string;
+    Function ScriptFixFileName(const s:TCmdStr):TCmdStr;
      begin
      begin
        if cs_link_on_target in current_settings.globalswitches then
        if cs_link_on_target in current_settings.globalswitches then
          ScriptFixFileName:=TargetFixFileName(s)
          ScriptFixFileName:=TargetFixFileName(s)
@@ -128,15 +129,15 @@ uses
                                   TScript
                                   TScript
 ****************************************************************************}
 ****************************************************************************}
 
 
-constructor TScript.Create(const s:string);
+constructor TScript.Create(const s: TCmdStr);
 begin
 begin
   fn:=FixFileName(s);
   fn:=FixFileName(s);
   executable:=false;
   executable:=false;
-  data:=TStringList.Create;
+  data:=TCmdStrList.Create;
 end;
 end;
 
 
 
 
-constructor TScript.CreateExec(const s:string);
+constructor TScript.CreateExec(const s:TCmdStr);
 begin
 begin
   fn:=FixFileName(s);
   fn:=FixFileName(s);
   if cs_link_on_target in current_settings.globalswitches then
   if cs_link_on_target in current_settings.globalswitches then
@@ -144,7 +145,7 @@ begin
   else
   else
     fn:=ChangeFileExt(fn,source_info.scriptext);
     fn:=ChangeFileExt(fn,source_info.scriptext);
   executable:=true;
   executable:=true;
-  data:=TStringList.Create;
+  data:=TCmdStrList.Create;
 end;
 end;
 
 
 
 
@@ -154,13 +155,13 @@ begin
 end;
 end;
 
 
 
 
-procedure TScript.AddStart(const s:string);
+procedure TScript.AddStart(const s:TCmdStr);
 begin
 begin
   data.Insert(s);
   data.Insert(s);
 end;
 end;
 
 
 
 
-procedure TScript.Add(const s:string);
+procedure TScript.Add(const s:TCmdStr);
 begin
 begin
    data.Concat(s);
    data.Concat(s);
 end;
 end;
@@ -175,7 +176,7 @@ procedure TScript.WriteToDisk;
 var
 var
   t : file;
   t : file;
   i : longint;
   i : longint;
-  s : string;
+  s : ansistring;
   le: string[2];
   le: string[2];
 
 
 begin
 begin
@@ -208,7 +209,7 @@ end;
                                   Asm Response
                                   Asm Response
 ****************************************************************************}
 ****************************************************************************}
 
 
-Constructor TAsmScript.Create (Const ScriptName : String);
+Constructor TAsmScript.Create (Const ScriptName : TCmdStr);
 begin
 begin
   Inherited CreateExec(ScriptName);
   Inherited CreateExec(ScriptName);
 end;
 end;
@@ -218,13 +219,13 @@ end;
                                   DOS Asm Response
                                   DOS Asm Response
 ****************************************************************************}
 ****************************************************************************}
 
 
-Constructor TAsmScriptDos.Create (Const ScriptName : String);
+Constructor TAsmScriptDos.Create (Const ScriptName : TCmdStr);
 begin
 begin
   Inherited Create(ScriptName);
   Inherited Create(ScriptName);
 end;
 end;
 
 
 
 
-Procedure TAsmScriptDos.AddAsmCommand (Const Command, Options,FileName : String);
+Procedure TAsmScriptDos.AddAsmCommand (Const Command, Options,FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
    begin
    begin
@@ -236,7 +237,7 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptDos.AddLinkCommand (Const Command, Options, FileName : String);
+Procedure TAsmScriptDos.AddLinkCommand (Const Command, Options, FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
    begin
    begin
@@ -248,13 +249,13 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptDos.AddDeleteCommand (Const FileName : String);
+Procedure TAsmScriptDos.AddDeleteCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('Del ' + MaybeQuoted (ScriptFixFileName (FileName)));
  Add('Del ' + MaybeQuoted (ScriptFixFileName (FileName)));
 end;
 end;
 
 
 
 
-Procedure TAsmScriptDos.AddDeleteDirCommand (Const FileName : String);
+Procedure TAsmScriptDos.AddDeleteDirCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('Rmdir ' + MaybeQuoted (ScriptFixFileName (FileName)));
  Add('Rmdir ' + MaybeQuoted (ScriptFixFileName (FileName)));
 end;
 end;
@@ -282,21 +283,21 @@ end;
 
 
 {$IF DEFINED(MORPHOS) OR DEFINED(AMIGA)}
 {$IF DEFINED(MORPHOS) OR DEFINED(AMIGA)}
 { * PathConv is implemented in the system unit! * }
 { * PathConv is implemented in the system unit! * }
-function PathConv(path: string): string; external name 'PATHCONV';
+function PathConv(path: TCmdStr): TCmdStr; external name 'PATHCONV';
 {$ELSE}
 {$ELSE}
-function PathConv(path: string): string;
+function PathConv(path: TCmdStr): TCmdStr;
 begin
 begin
   PathConv:=path;
   PathConv:=path;
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
-Constructor TAsmScriptAmiga.Create (Const ScriptName : String);
+Constructor TAsmScriptAmiga.Create (Const ScriptName : TCmdStr);
 begin
 begin
   Inherited Create(ScriptName);
   Inherited Create(ScriptName);
 end;
 end;
 
 
 
 
-Procedure TAsmScriptAmiga.AddAsmCommand (Const Command, Options,FileName : String);
+Procedure TAsmScriptAmiga.AddAsmCommand (Const Command, Options,FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
    begin
    begin
@@ -313,7 +314,7 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptAmiga.AddLinkCommand (Const Command, Options, FileName : String);
+Procedure TAsmScriptAmiga.AddLinkCommand (Const Command, Options, FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
    begin
    begin
@@ -327,13 +328,13 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptAmiga.AddDeleteCommand (Const FileName : String);
+Procedure TAsmScriptAmiga.AddDeleteCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('Delete ' + PathConv(MaybeQuoted(ScriptFixFileName(FileName))) + ' Quiet');
  Add('Delete ' + PathConv(MaybeQuoted(ScriptFixFileName(FileName))) + ' Quiet');
 end;
 end;
 
 
 
 
-Procedure TAsmScriptAmiga.AddDeleteDirCommand (Const FileName : String);
+Procedure TAsmScriptAmiga.AddDeleteDirCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('Delete ' + PathConv(MaybeQuoted(ScriptFixFileName(FileName))) + ' All Quiet');
  Add('Delete ' + PathConv(MaybeQuoted(ScriptFixFileName(FileName))) + ' All Quiet');
 end;
 end;
@@ -358,13 +359,13 @@ end;
                               Unix Asm Response
                               Unix Asm Response
 ****************************************************************************}
 ****************************************************************************}
 
 
-Constructor TAsmScriptUnix.Create (Const ScriptName : String);
+Constructor TAsmScriptUnix.Create (Const ScriptName : TCmdStr);
 begin
 begin
   Inherited Create(ScriptName);
   Inherited Create(ScriptName);
 end;
 end;
 
 
 
 
-Procedure TAsmScriptUnix.AddAsmCommand (Const Command, Options,FileName : String);
+Procedure TAsmScriptUnix.AddAsmCommand (Const Command, Options,FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
    Add('echo Assembling '+ScriptFixFileName(FileName));
    Add('echo Assembling '+ScriptFixFileName(FileName));
@@ -373,7 +374,7 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptUnix.AddLinkCommand (Const Command, Options, FileName : String);
+Procedure TAsmScriptUnix.AddLinkCommand (Const Command, Options, FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
    Add('echo Linking '+ScriptFixFileName(FileName));
    Add('echo Linking '+ScriptFixFileName(FileName));
@@ -382,13 +383,13 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptUnix.AddDeleteCommand (Const FileName : String);
+Procedure TAsmScriptUnix.AddDeleteCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('rm ' + MaybeQuoted (ScriptFixFileName(FileName)));
  Add('rm ' + MaybeQuoted (ScriptFixFileName(FileName)));
 end;
 end;
 
 
 
 
-Procedure TAsmScriptUnix.AddDeleteDirCommand (Const FileName : String);
+Procedure TAsmScriptUnix.AddDeleteDirCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('rmdir ' + MaybeQuoted (ScriptFixFileName(FileName)));
  Add('rmdir ' + MaybeQuoted (ScriptFixFileName(FileName)));
 end;
 end;
@@ -413,13 +414,13 @@ end;
                                   MPW (MacOS) Asm Response
                                   MPW (MacOS) Asm Response
 ****************************************************************************}
 ****************************************************************************}
 
 
-Constructor TAsmScriptMPW.Create (Const ScriptName : String);
+Constructor TAsmScriptMPW.Create (Const ScriptName : TCmdStr);
 begin
 begin
   Inherited Create(ScriptName);
   Inherited Create(ScriptName);
 end;
 end;
 
 
 
 
-Procedure TAsmScriptMPW.AddAsmCommand (Const Command, Options,FileName : String);
+Procedure TAsmScriptMPW.AddAsmCommand (Const Command, Options,FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
     Add('Echo Assembling '+ScriptFixFileName(FileName));
     Add('Echo Assembling '+ScriptFixFileName(FileName));
@@ -428,7 +429,7 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptMPW.AddLinkCommand (Const Command, Options, FileName : String);
+Procedure TAsmScriptMPW.AddLinkCommand (Const Command, Options, FileName : TCmdStr);
 begin
 begin
   if FileName<>'' then
   if FileName<>'' then
     Add('Echo Linking '+ScriptFixFileName(FileName));
     Add('Echo Linking '+ScriptFixFileName(FileName));
@@ -444,13 +445,13 @@ begin
 end;
 end;
 
 
 
 
-Procedure TAsmScriptMPW.AddDeleteCommand (Const FileName : String);
+Procedure TAsmScriptMPW.AddDeleteCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('Delete ' + MaybeQuoted (ScriptFixFileName(FileName)));
  Add('Delete ' + MaybeQuoted (ScriptFixFileName(FileName)));
 end;
 end;
 
 
 
 
-Procedure TAsmScriptMPW.AddDeleteDirCommand (Const FileName : String);
+Procedure TAsmScriptMPW.AddDeleteDirCommand (Const FileName : TCmdStr);
 begin
 begin
  Add('Delete ' + MaybeQuoted (ScriptFixFileName (FileName)));
  Add('Delete ' + MaybeQuoted (ScriptFixFileName (FileName)));
 end;
 end;
@@ -465,7 +466,7 @@ end;
 
 
 
 
 
 
-Procedure GenerateAsmRes(const st : string);
+Procedure GenerateAsmRes(const st : TCmdStr);
 var
 var
   scripttyp : tscripttype;
   scripttyp : tscripttype;
 begin
 begin
@@ -490,13 +491,13 @@ end;
                                   Link Response
                                   Link Response
 ****************************************************************************}
 ****************************************************************************}
 
 
-procedure TLinkRes.Add(const s:string);
+procedure TLinkRes.Add(const s:TCmdStr);
 begin
 begin
   if s<>'' then
   if s<>'' then
    inherited Add(s);
    inherited Add(s);
 end;
 end;
 
 
-procedure TLinkRes.AddFileName(const s:string);
+procedure TLinkRes.AddFileName(const s:TCmdStr);
 begin
 begin
   if section<>'' then
   if section<>'' then
    begin
    begin
@@ -517,7 +518,7 @@ begin
    end;
    end;
 end;
 end;
 
 
-procedure TLinkRes.EndSection(const s:string);
+procedure TLinkRes.EndSection(const s:TCmdStr);
 begin
 begin
   { only terminate if we started the section }
   { only terminate if we started the section }
   if section='' then
   if section='' then
@@ -525,7 +526,7 @@ begin
   section:='';
   section:='';
 end;
 end;
 
 
-procedure TLinkRes.StartSection(const s:string);
+procedure TLinkRes.StartSection(const s:TCmdStr);
 begin
 begin
   section:=s;
   section:=s;
 end;
 end;

+ 3 - 3
compiler/symdef.pas

@@ -429,7 +429,7 @@ interface
           procsym : tsym;
           procsym : tsym;
           procsymderef : tderef;
           procsymderef : tderef;
           { alias names }
           { alias names }
-          aliasnames : tstringlist;
+          aliasnames : TCmdStrList;
           { symtables }
           { symtables }
           localst : TSymtable;
           localst : TSymtable;
           funcretsym : tsym;
           funcretsym : tsym;
@@ -2827,7 +2827,7 @@ implementation
          _mangledname:=nil;
          _mangledname:=nil;
          fileinfo:=current_filepos;
          fileinfo:=current_filepos;
          extnumber:=$ffff;
          extnumber:=$ffff;
-         aliasnames:=tstringlist.create;
+         aliasnames:=TCmdStrList.create;
          funcretsym:=nil;
          funcretsym:=nil;
          forwarddef:=true;
          forwarddef:=true;
          interfacedef:=false;
          interfacedef:=false;
@@ -2906,7 +2906,7 @@ implementation
             (tf_need_export in target_info.flags) and
             (tf_need_export in target_info.flags) and
             (po_exports in procoptions) then
             (po_exports in procoptions) then
            deffile.AddExport(mangledname);
            deffile.AddExport(mangledname);
-         aliasnames:=tstringlist.create;
+         aliasnames:=TCmdStrList.create;
          forwarddef:=false;
          forwarddef:=false;
          interfacedef:=false;
          interfacedef:=false;
          hasforward:=false;
          hasforward:=false;

+ 5 - 5
compiler/systems/t_amiga.pas

@@ -96,7 +96,7 @@ function TLinkerAmiga.WriteResponseFile(isdll: boolean): boolean;
 var
 var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
+  HPath    : TCmdStrListItem;
   s        : string;
   s        : string;
   linklibc : boolean;
   linklibc : boolean;
 begin
 begin
@@ -106,22 +106,22 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if (cs_link_on_target in current_settings.globalswitches) then
     if (cs_link_on_target in current_settings.globalswitches) then
      s:=ScriptFixFileName(s);
      s:=ScriptFixFileName(s);
     LinkRes.Add('-L'+s);
     LinkRes.Add('-L'+s);
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if s<>'' then
     if s<>'' then
      LinkRes.Add('SEARCH_DIR('+PathConv(maybequoted(s))+')');
      LinkRes.Add('SEARCH_DIR('+PathConv(maybequoted(s))+')');
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   LinkRes.Add('INPUT (');
   LinkRes.Add('INPUT (');

+ 6 - 6
compiler/systems/t_beos.pas

@@ -213,8 +213,8 @@ Var
   i        : integer;
   i        : integer;
   cprtobj,
   cprtobj,
   prtobj   : string[80];
   prtobj   : string[80];
-  HPath    : TStringListItem;
-  s        : string;
+  HPath    : TCmdStrListItem;
+  s        : TCmdStr;
   linklibc : boolean;
   linklibc : boolean;
 begin
 begin
   WriteResponseFile:=False;
   WriteResponseFile:=False;
@@ -250,17 +250,17 @@ begin
   LinkRes.Add('-m elf_i386_be -shared -Bsymbolic');
   LinkRes.Add('-m elf_i386_be -shared -Bsymbolic');
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add(maybequoted('-L'+HPath.Str));
      LinkRes.Add(maybequoted('-L'+HPath.Str));
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add(maybequoted('-L'+HPath.Str));
      LinkRes.Add(maybequoted('-L'+HPath.Str));
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   { try to add crti and crtbegin if linking to C }
   { try to add crti and crtbegin if linking to C }

+ 6 - 6
compiler/systems/t_bsd.pas

@@ -283,8 +283,8 @@ Var
   cprtobj,
   cprtobj,
   gprtobj,
   gprtobj,
   prtobj       : string[80];
   prtobj       : string[80];
-  HPath        : TStringListItem;
-  s,s1,s2      : string;
+  HPath        : TCmdStrListItem;
+  s,s1,s2      : TCmdStr;
   linkdynamic,
   linkdynamic,
   linklibc     : boolean;
   linklibc     : boolean;
   Fl1,Fl2      : Boolean;
   Fl1,Fl2      : Boolean;
@@ -372,23 +372,23 @@ begin
       end;
       end;
   end;
   end;
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      if LdSupportsNoResponseFile then
      if LdSupportsNoResponseFile then
        LinkRes.Add(maybequoted('-L'+HPath.Str))
        LinkRes.Add(maybequoted('-L'+HPath.Str))
      else
      else
        LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
        LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      if LdSupportsNoResponseFile then
      if LdSupportsNoResponseFile then
        LinkRes.Add(maybequoted('-L'+HPath.Str))
        LinkRes.Add(maybequoted('-L'+HPath.Str))
      else
      else
        LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
        LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   if not LdSupportsNoResponseFile then
   if not LdSupportsNoResponseFile then

+ 6 - 6
compiler/systems/t_embedded.pas

@@ -71,8 +71,8 @@ Function TlinkerEmbedded.WriteResponseFile: Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
-  s,s1,s2  : string;
+  HPath    : TCmdStrListItem;
+  s,s1,s2  : TCmdStr;
   prtobj,
   prtobj,
   cprtobj  : string[80];
   cprtobj  : string[80];
   linklibc : boolean;
   linklibc : boolean;
@@ -90,22 +90,22 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if (cs_link_on_target in current_settings.globalswitches) then
     if (cs_link_on_target in current_settings.globalswitches) then
      s:=ScriptFixFileName(s);
      s:=ScriptFixFileName(s);
     LinkRes.Add('-L'+s);
     LinkRes.Add('-L'+s);
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if s<>'' then
     if s<>'' then
      LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
      LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   LinkRes.Add('INPUT (');
   LinkRes.Add('INPUT (');

+ 5 - 5
compiler/systems/t_emx.pas

@@ -389,7 +389,7 @@ Function TLinkerEMX.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
+  HPath    : TCmdStrListItem;
   s        : string;
   s        : string;
 begin
 begin
   WriteResponseFile:=False;
   WriteResponseFile:=False;
@@ -398,17 +398,17 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('-L'+HPath.Str);
      LinkRes.Add('-L'+HPath.Str);
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('-L'+HPath.Str);
      LinkRes.Add('-L'+HPath.Str);
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   { add objectfiles, start with prt0 always }
   { add objectfiles, start with prt0 always }

+ 6 - 6
compiler/systems/t_gba.pas

@@ -71,8 +71,8 @@ Function TLinkerGba.WriteResponseFile: Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
-  s,s1,s2  : string;
+  HPath    : TCmdStrListItem;
+  s,s1,s2  : TCmdStr;
   prtobj, 
   prtobj, 
   cprtobj  : string[80];
   cprtobj  : string[80];
   linklibc : boolean;
   linklibc : boolean;
@@ -90,22 +90,22 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if (cs_link_on_target in current_settings.globalswitches) then
     if (cs_link_on_target in current_settings.globalswitches) then
      s:=ScriptFixFileName(s);
      s:=ScriptFixFileName(s);
     LinkRes.Add('-L'+s);
     LinkRes.Add('-L'+s);
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if s<>'' then
     if s<>'' then
      LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
      LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   LinkRes.Add('INPUT (');
   LinkRes.Add('INPUT (');

+ 5 - 5
compiler/systems/t_go32v2.pas

@@ -153,7 +153,7 @@ end;
 Function TExternalLinkerGo32v2.WriteScript(isdll:boolean) : Boolean;
 Function TExternalLinkerGo32v2.WriteScript(isdll:boolean) : Boolean;
 Var
 Var
   scriptres  : TLinkRes;
   scriptres  : TLinkRes;
-  HPath    : TStringListItem;
+  HPath    : TCmdStrListItem;
   s        : string;
   s        : string;
 begin
 begin
   WriteScript:=False;
   WriteScript:=False;
@@ -211,17 +211,17 @@ begin
   ScriptRes.Add('  }');
   ScriptRes.Add('  }');
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      ScriptRes.Add('SEARCH_DIR("'+GetShortName(HPath.Str)+'")');
      ScriptRes.Add('SEARCH_DIR("'+GetShortName(HPath.Str)+'")');
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      ScriptRes.Add('SEARCH_DIR("'+GetShortName(HPath.Str)+'")');
      ScriptRes.Add('SEARCH_DIR("'+GetShortName(HPath.Str)+'")');
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
 { Write and Close response }
 { Write and Close response }

+ 6 - 6
compiler/systems/t_linux.pas

@@ -386,8 +386,8 @@ Function TLinkerLinux.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres      : TLinkRes;
   linkres      : TLinkRes;
   i            : longint;
   i            : longint;
-  HPath        : TStringListItem;
-  s,s1,s2      : string;
+  HPath        : TCmdStrListItem;
+  s,s1,s2      : TCmdStr;
   found1,
   found1,
   found2       : boolean;
   found2       : boolean;
 begin
 begin
@@ -405,17 +405,17 @@ begin
   with linkres do
   with linkres do
     begin
     begin
       { Write path to search libraries }
       { Write path to search libraries }
-      HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+      HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
       while assigned(HPath) do
       while assigned(HPath) do
        begin
        begin
          Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
          Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
-         HPath:=TStringListItem(HPath.Next);
+         HPath:=TCmdStrListItem(HPath.Next);
        end;
        end;
-      HPath:=TStringListItem(LibrarySearchPath.First);
+      HPath:=TCmdStrListItem(LibrarySearchPath.First);
       while assigned(HPath) do
       while assigned(HPath) do
        begin
        begin
          Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
          Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
-         HPath:=TStringListItem(HPath.Next);
+         HPath:=TCmdStrListItem(HPath.Next);
        end;
        end;
 
 
       StartSection('INPUT(');
       StartSection('INPUT(');

+ 5 - 5
compiler/systems/t_morph.pas

@@ -89,7 +89,7 @@ Function TLinkerMorphOS.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
+  HPath    : TCmdStrListItem;
   s        : string;
   s        : string;
   linklibc : boolean;
   linklibc : boolean;
 begin
 begin
@@ -99,22 +99,22 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if (cs_link_on_target in current_settings.globalswitches) then
     if (cs_link_on_target in current_settings.globalswitches) then
      s:=ScriptFixFileName(s);
      s:=ScriptFixFileName(s);
     LinkRes.Add('-L'+s);
     LinkRes.Add('-L'+s);
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if s<>'' then
     if s<>'' then
      LinkRes.Add('SEARCH_DIR('+PathConv(maybequoted(s))+')');
      LinkRes.Add('SEARCH_DIR('+PathConv(maybequoted(s))+')');
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   LinkRes.Add('INPUT (');
   LinkRes.Add('INPUT (');

+ 6 - 6
compiler/systems/t_nds.pas

@@ -74,8 +74,8 @@ Function TLinkerNDS.WriteResponseFile: Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
-  s,s1,s2  : string;
+  HPath    : TCmdStrListItem;
+  s,s1,s2  : TCmdStr;
   prtobj, 
   prtobj, 
   cprtobj  : string[80];
   cprtobj  : string[80];
   linklibc,
   linklibc,
@@ -107,22 +107,22 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if (cs_link_on_target in current_settings.globalswitches) then
     if (cs_link_on_target in current_settings.globalswitches) then
      s:=ScriptFixFileName(s);
      s:=ScriptFixFileName(s);
     LinkRes.Add('-L'+s);
     LinkRes.Add('-L'+s);
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
     s:=HPath.Str;
     s:=HPath.Str;
     if s<>'' then
     if s<>'' then
      LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
      LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
-    HPath:=TStringListItem(HPath.Next);
+    HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   LinkRes.Add('INPUT (');
   LinkRes.Add('INPUT (');

+ 1 - 1
compiler/systems/t_nwl.pas

@@ -273,7 +273,7 @@ Function TLinkerNetwlibc.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres      : TLinkRes;
   linkres      : TLinkRes;
   i            : longint;
   i            : longint;
-  s,s2,s3      : string;
+  s,s2,s3      : TCmdStr;
   ProgNam      : string [80];
   ProgNam      : string [80];
   NlmNam       : string [80];
   NlmNam       : string [80];
   hp2          : texported_item;  { for exports }
   hp2          : texported_item;  { for exports }

+ 1 - 1
compiler/systems/t_nwm.pas

@@ -265,7 +265,7 @@ Function TLinkerNetware.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres      : TLinkRes;
   linkres      : TLinkRes;
   i            : longint;
   i            : longint;
-  s,s2,s3      : string;
+  s,s2,s3      : TCmdStr;
   ProgNam      : string [80];
   ProgNam      : string [80];
   NlmNam       : string [80];
   NlmNam       : string [80];
   hp2          : texported_item;  { for exports }
   hp2          : texported_item;  { for exports }

+ 5 - 5
compiler/systems/t_os2.pas

@@ -388,7 +388,7 @@ Function TLinkeros2.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
+  HPath    : TCmdStrListItem;
   s        : string;
   s        : string;
 begin
 begin
   WriteResponseFile:=False;
   WriteResponseFile:=False;
@@ -397,17 +397,17 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('-L'+HPath.Str);
      LinkRes.Add('-L'+HPath.Str);
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('-L'+HPath.Str);
      LinkRes.Add('-L'+HPath.Str);
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   { add objectfiles, start with prt0 always }
   { add objectfiles, start with prt0 always }

+ 5 - 5
compiler/systems/t_palmos.pas

@@ -74,7 +74,7 @@ Function TLinkerPalmOS.WriteResponseFile : Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   i        : longint;
   i        : longint;
-  HPath    : TStringListItem;
+  HPath    : TCmdStrListItem;
   s        : string;
   s        : string;
   linklibc : boolean;
   linklibc : boolean;
 begin
 begin
@@ -84,17 +84,17 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('-L'+HPath.Str);
      LinkRes.Add('-L'+HPath.Str);
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('-L'+HPath.Str);
      LinkRes.Add('-L'+HPath.Str);
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   { add objectfiles, start with crt0 always  }
   { add objectfiles, start with crt0 always  }

+ 6 - 6
compiler/systems/t_sunos.pas

@@ -235,8 +235,8 @@ Var
   cprtobj,
   cprtobj,
   gprtobj,
   gprtobj,
   prtobj       : string[80];
   prtobj       : string[80];
-  HPath        : TStringListItem;
-  s,s2         : string;
+  HPath        : TCmdStrListItem;
+  s,s2         : TCmdStr;
   linkdynamic,
   linkdynamic,
   linklibc     : boolean;
   linklibc     : boolean;
 begin
 begin
@@ -268,17 +268,17 @@ begin
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
 
   { Write path to search libraries }
   { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
      LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
+  HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
      LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
      LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
-     HPath:=TStringListItem(HPath.Next);
+     HPath:=TCmdStrListItem(HPath.Next);
    end;
    end;
 
 
   LinkRes.Add('INPUT(');
   LinkRes.Add('INPUT(');

+ 8 - 8
compiler/systems/t_win.pas

@@ -900,7 +900,7 @@ implementation
     procedure TInternalLinkerWin.DefaultLinkScript;
     procedure TInternalLinkerWin.DefaultLinkScript;
       var
       var
         s,s2,
         s,s2,
-        ibase : string;
+        ibase : TCmdStr;
       begin
       begin
         with LinkScript do
         with LinkScript do
           begin
           begin
@@ -1069,8 +1069,8 @@ implementation
     Function TExternalLinkerWin.WriteResponseFile(isdll:boolean) : Boolean;
     Function TExternalLinkerWin.WriteResponseFile(isdll:boolean) : Boolean;
       Var
       Var
         linkres : TLinkRes;
         linkres : TLinkRes;
-        HPath   : TStringListItem;
-        s,s2    : string;
+        HPath   : TCmdStrListItem;
+        s,s2    : TCmdStr;
         i       : integer;
         i       : integer;
       begin
       begin
         WriteResponseFile:=False;
         WriteResponseFile:=False;
@@ -1088,17 +1088,17 @@ implementation
         with linkres do
         with linkres do
           begin
           begin
             { Write path to search libraries }
             { Write path to search libraries }
-            HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+            HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
             while assigned(HPath) do
             while assigned(HPath) do
              begin
              begin
                Add('SEARCH_DIR('+MaybeQuoted(HPath.Str)+')');
                Add('SEARCH_DIR('+MaybeQuoted(HPath.Str)+')');
-               HPath:=TStringListItem(HPath.Next);
+               HPath:=TCmdStrListItem(HPath.Next);
              end;
              end;
-            HPath:=TStringListItem(LibrarySearchPath.First);
+            HPath:=TCmdStrListItem(LibrarySearchPath.First);
             while assigned(HPath) do
             while assigned(HPath) do
              begin
              begin
                Add('SEARCH_DIR('+MaybeQuoted(HPath.Str)+')');
                Add('SEARCH_DIR('+MaybeQuoted(HPath.Str)+')');
-               HPath:=TStringListItem(HPath.Next);
+               HPath:=TCmdStrListItem(HPath.Next);
              end;
              end;
 
 
             { add objectfiles, start with prt0 always                  }
             { add objectfiles, start with prt0 always                  }
@@ -1686,7 +1686,7 @@ implementation
     function TDLLScannerWin.scan(const binname:string):boolean;
     function TDLLScannerWin.scan(const binname:string):boolean;
       var
       var
         hs,
         hs,
-        dllname : string;
+        dllname : TCmdStr;
       begin
       begin
         result:=false;
         result:=false;
         { is there already an import library the we will use that one }
         { is there already an import library the we will use that one }

+ 3 - 3
compiler/verbose.pas

@@ -85,7 +85,7 @@ interface
     procedure SetErrorFlags(const s:string);
     procedure SetErrorFlags(const s:string);
     procedure GenerateError;
     procedure GenerateError;
     procedure Internalerror(i:longint);
     procedure Internalerror(i:longint);
-    procedure Comment(l:longint;s:string);
+    procedure Comment(l:longint;s:ansistring);
     function  MessagePchar(w:longint):pchar;
     function  MessagePchar(w:longint):pchar;
     procedure Message(w:longint;onqueue:tmsgqueueevent=nil);
     procedure Message(w:longint;onqueue:tmsgqueueevent=nil);
     procedure Message1(w:longint;const s1:string;onqueue:tmsgqueueevent=nil);
     procedure Message1(w:longint;const s1:string;onqueue:tmsgqueueevent=nil);
@@ -475,7 +475,7 @@ var
       end;
       end;
 
 
 
 
-    procedure Comment(l:longint;s:string);
+    procedure Comment(l:longint;s:ansistring);
       var
       var
         dostop : boolean;
         dostop : boolean;
       begin
       begin
@@ -506,7 +506,7 @@ var
       end;
       end;
 
 
 
 
-    Procedure Msg2Comment(s:string;w:longint;onqueue:tmsgqueueevent);
+    Procedure Msg2Comment(s:ansistring;w:longint;onqueue:tmsgqueueevent);
       var
       var
         idx,i,v : longint;
         idx,i,v : longint;
         dostop  : boolean;
         dostop  : boolean;

+ 1 - 1
ide/fpvars.pas

@@ -70,7 +70,7 @@ const ClipboardWindow  : PClipboardWindow = nil;
       UseMouse         : boolean = true;
       UseMouse         : boolean = true;
       MainFile         : string = '';
       MainFile         : string = '';
       PrevMainFile     : string = '';
       PrevMainFile     : string = '';
-      EXEFile          : string = '';
+      EXEFile          : ansistring = '';
       CompilationPhase : TCompPhase = cpNothing;
       CompilationPhase : TCompPhase = cpNothing;
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
       GDBWindow        : PGDBWindow = nil;
       GDBWindow        : PGDBWindow = nil;