diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-03-15 22:09:47 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-03-15 22:09:47 +0000 |
commit | 220ae11b40e104d09e2c1ac08203c2a631294d99 (patch) | |
tree | ce86353468f61e4679acf64178565326f658582c | |
parent | a5ac82f7b9a7431dc18ea6a779ab884359aab78d (diff) | |
download | usdx-220ae11b40e104d09e2c1ac08203c2a631294d99.tar.gz usdx-220ae11b40e104d09e2c1ac08203c2a631294d99.tar.xz usdx-220ae11b40e104d09e2c1ac08203c2a631294d99.zip |
- fpc patch
- added units to project-file
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1640 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | unicode/src/base/UFilename.pas | 2 | ||||
-rw-r--r-- | unicode/src/base/UFilesystem.pas | 17 | ||||
-rw-r--r-- | unicode/src/ultrastardx.dpr | 14 |
3 files changed, 29 insertions, 4 deletions
diff --git a/unicode/src/base/UFilename.pas b/unicode/src/base/UFilename.pas index 0cf12cc0..c2ccaec8 100644 --- a/unicode/src/base/UFilename.pas +++ b/unicode/src/base/UFilename.pas @@ -29,6 +29,8 @@ unit UFilename; {$MODE Delphi} {$ENDIF} +{$I switches.inc} + interface uses diff --git a/unicode/src/base/UFilesystem.pas b/unicode/src/base/UFilesystem.pas index b9020391..e654f198 100644 --- a/unicode/src/base/UFilesystem.pas +++ b/unicode/src/base/UFilesystem.pas @@ -27,6 +27,12 @@ unit UFilesystem; interface +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +{$I switches.inc} + uses {$IFDEF MSWINDOWS} Windows, @@ -306,8 +312,13 @@ begin end; function TFileSystemImpl.FileAge(const FileName: IPath; out FileDateTime: TDateTime): Boolean; +var + FileDate: longint; begin - Result := SysUtils.FileAge(FileName.ToString(pencSystemANSI), FileDateTime); + FileDate := SysUtils.FileAge(FileName.ToString(pencSystemANSI)); + if (FileDate > -1) then + FileDateTime := FileDateToDateTime(FileDate); + Result := (FileDate > -1); end; function TFileSystemImpl.DirectoryExists(const Name: IPath): Boolean; @@ -337,7 +348,7 @@ end; function TFileSystemImpl.FileSetReadOnly(const FileName: IPath; ReadOnly: Boolean): Boolean; begin - Result := SysUtils.FileSetReadOnly(FileName.ToString(pencSystemANSI), ReadOnly); + Result := (SysUtils.FileSetAttr(FileName.ToString(pencSystemANSI), faReadOnly) = 0); end; function TFileSystemImpl.ForceDirectories(const Dir: IPath): Boolean; @@ -479,7 +490,7 @@ begin {$IFDEF MSWINDOWS} Result.Name := Path(fSearchRec.Name); {$ELSE} - Result.Name := Path(fSearchRec.Name, pencSystem); + Result.Name := Path(fSearchRec.Name, pencSystemANSI); {$ENDIF} Result.ExcludeAttr := fSearchRec.ExcludeAttr; diff --git a/unicode/src/ultrastardx.dpr b/unicode/src/ultrastardx.dpr index f48e9ada..9bcc4aca 100644 --- a/unicode/src/ultrastardx.dpr +++ b/unicode/src/ultrastardx.dpr @@ -135,6 +135,15 @@ uses SQLiteTable3 in 'lib\SQLite\SQLiteTable3.pas', SQLite3 in 'lib\SQLite\SQLite3.pas', + {$IFDEF MSWINDOWS} + // TntUnicodeControls + TntSystem in 'lib\TntUnicodeControls\TntSystem.pas', + TntSysUtils in 'lib\TntUnicodeControls\TntSysUtils.pas', + TntWindows in 'lib\TntUnicodeControls\TntWindows.pas', + TntWideStrUtils in 'lib\TntUnicodeControls\TntWideStrUtils.pas', + TntClasses in 'lib\TntUnicodeControls\TntClasses.pas', + TntFormatStrUtils in 'lib\TntUnicodeControls\TntFormatStrUtils.pas', + {$ENDIF} //------------------------------ //Includes - Menu System @@ -199,7 +208,10 @@ uses UUnicodeUtils in 'base\UUnicodeUtils.pas', UFont in 'base\UFont.pas', UTextEncoding in 'base\UTextEncoding.pas', - + + //UFilename in 'base\UFilename.pas', + //UFilesystem in 'base\UFilesystem.pas', + //------------------------------ //Includes - Plugin Support //------------------------------ |