summaryrefslogtreecommitdiff
path: root/USearch.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-06-14 18:34:02 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-06-14 18:34:02 +0200
commitc9a02bf590248c0bd8e1343198d3f9c13ce118c1 (patch)
treecbd1b07cea6f3ccea7fc98c58d65f568e69e8527 /USearch.pas
parentb1dfa430702770c83c815bec24f1dc72175e1e5e (diff)
downloadtuxcmd-c9a02bf590248c0bd8e1343198d3f9c13ce118c1.tar.xz
Port to new ULibc unit, drop dependency to compiler Libc libraryv0.6.43
(preparation for PPC port)
Diffstat (limited to 'USearch.pas')
-rw-r--r--USearch.pas16
1 files changed, 8 insertions, 8 deletions
diff --git a/USearch.pas b/USearch.pas
index 45c75f9..0156d59 100644
--- a/USearch.pas
+++ b/USearch.pas
@@ -104,7 +104,7 @@ var
implementation
-uses Math, UMain, ULocale, UCoreUtils, Libc, UCore, DateUtils, UViewer, UConfig, UVFSCore;
+uses Math, UMain, ULocale, UCoreUtils, ULibc, UCore, DateUtils, UViewer, UConfig, UVFSCore;
type TFileListItem = class
CRC: LongWord;
@@ -924,10 +924,10 @@ begin
if Matches then begin
GUIMutex.Acquire;
FList.Add(LocalList[i]);
- Libc.free(Data^.FDisplayName);
+ libc_free(Data^.FDisplayName);
PDataItem(LocalList[i])^.FDisplayName := strdup(PChar(StartDir + FileName));
if Assigned(PDataItem(LocalList[i])^.LnkPointTo) then begin
- Libc.free(PDataItem(LocalList[i])^.LnkPointTo);
+ libc_free(PDataItem(LocalList[i])^.LnkPointTo);
PDataItem(LocalList[i])^.LnkPointTo := nil;
end;
if FEngine is TVFSEngine then PDataItem(LocalList[i])^.LnkPointTo := strdup(PChar((FEngine as TVFSEngine).SavePath));
@@ -968,7 +968,7 @@ begin
end;
end;
- if not Matches then Libc.free(LocalList[i]);
+ if not Matches then libc_free(LocalList[i]);
end;
end;
LocalList.Free;
@@ -987,9 +987,9 @@ begin
Result := False;
try
Error := 0;
- Buffer := Libc.malloc(BlockSize);
+ Buffer := malloc(BlockSize);
if Buffer = nil then Exit;
- Libc.memset(Buffer, 0, BlockSize);
+ memset(Buffer, 0, BlockSize);
fd := FEngine.OpenFile(FileName, omRead, Error);
if (fd = nil) or (Error <> 0) then Exit;
@@ -1005,7 +1005,7 @@ begin
if Pos > Length(FStringFind) then begin
Result := True;
FEngine.CloseFile(fd);
- Libc.free(Buffer);
+ libc_free(Buffer);
Exit;
end;
end else Pos := 1;
@@ -1015,7 +1015,7 @@ begin
if CancelIt then Break;
until Read < BlockSize;
FEngine.CloseFile(fd);
- Libc.free(Buffer);
+ libc_free(Buffer);
except
end;
end;