Browse Source

* remove the use of unixutils and deprecated functions in it.

git-svn-id: trunk@21331 -
marco 13 years ago
parent
commit
117c437e94
1 changed files with 5 additions and 9 deletions
  1. 5 9
      packages/xforms/src/fd2pascal.pp

+ 5 - 9
packages/xforms/src/fd2pascal.pp

@@ -23,7 +23,7 @@ Program fd2pascal;
 uses
 uses
   baseunix,
   baseunix,
   Unix,
   Unix,
-  unixutil;
+  sysutils;
 
 
 Const RevString = '$Revision: 1.5 $';
 Const RevString = '$Revision: 1.5 $';
   NrOptions = 4;
   NrOptions = 4;
@@ -155,17 +155,13 @@ Var
   Utilities Code
   Utilities Code
   ------------------------------------------------------------------------ }
   ------------------------------------------------------------------------ }
 
 
-
-Function IntTostr (s : Longint) : String;
-
-var temp : String;
-
+Function BaseName(const s:ansistring;suf:ansistring):ansistring;
 begin
 begin
-  str(s,temp);
-  IntToStr:=Temp;
+  BaseName:=extractfilename(s);
+  if '.'+suf=extractfileext(s) then
+    BaseName:=changefileext(s,'');  
 end;
 end;
 
 
-
 Procedure EmitError (Const s : String);
 Procedure EmitError (Const s : String);
 
 
 begin
 begin