瀏覽代碼

* revert last change : removal of dos unit

mazen 21 年之前
父節點
當前提交
83cb4fe087
共有 1 個文件被更改,包括 12 次插入10 次删除
  1. 12 10
      compiler/scanner.pas

+ 12 - 10
compiler/scanner.pas

@@ -203,7 +203,11 @@ interface
 implementation
 implementation
 
 
     uses
     uses
-      SysUtils,
+{$ifdef delphi}
+      dmisc,
+{$else}
+      dos,
+{$endif delphi}
       cutils,
       cutils,
       systems,
       systems,
       switches,
       switches,
@@ -976,9 +980,9 @@ implementation
         args,
         args,
         foundfile,
         foundfile,
         hs    : string;
         hs    : string;
-        path  : String;
-        name  : String;
-        ext   : String;
+        path  : dirstr;
+        name  : namestr;
+        ext   : extstr;
         hp    : tinputfile;
         hp    : tinputfile;
         found : boolean;
         found : boolean;
       begin
       begin
@@ -1022,7 +1026,7 @@ implementation
             if hs='FPCTARGETOS' then
             if hs='FPCTARGETOS' then
              hs:=target_info.shortname
              hs:=target_info.shortname
            else
            else
-             hs:=GetEnvironmentVariable(hs);
+             hs:=getenv(hs);
            if hs='' then
            if hs='' then
             Message1(scan_w_include_env_not_found,path);
             Message1(scan_w_include_env_not_found,path);
            { make it a stringconst }
            { make it a stringconst }
@@ -1033,9 +1037,7 @@ implementation
         else
         else
          begin
          begin
            hs:=FixFileName(hs);
            hs:=FixFileName(hs);
-           path := SplitPath(hs);
-           name := SplitName(hs);
-           ext := SplitExtension(hs);
+           fsplit(hs,path,name,ext);
            { try to find the file }
            { try to find the file }
            found:=findincludefile(path,name,ext,foundfile);
            found:=findincludefile(path,name,ext,foundfile);
            if (ext='') then
            if (ext='') then
@@ -3265,8 +3267,8 @@ exit_label:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.89  2004-09-28 16:00:52  mazen
-  - remove Dos unit dependency
+  Revision 1.90  2004-09-29 06:52:43  mazen
+  * revert last change : removal of dos unit
 
 
   Revision 1.88  2004/09/12 20:46:58  olle
   Revision 1.88  2004/09/12 20:46:58  olle
     * Minor bugfix in $IFOPT
     * Minor bugfix in $IFOPT