summaryrefslogtreecommitdiff
path: root/UCore.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UCore.pas')
-rw-r--r--UCore.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/UCore.pas b/UCore.pas
index b314eb4..a2e0659 100644
--- a/UCore.pas
+++ b/UCore.pas
@@ -139,7 +139,7 @@ begin
if ListView.Items.Count = 0
then ListItem := ListView.Items.Add
else ListItem := ListView.Items[0];
- Data := malloc(SizeOf(TDataItem));
+ Data := libc_malloc(SizeOf(TDataItem));
memset(Data, 0, SizeOf(TDataItem));
with Data^ do begin
UpDir := True;
@@ -405,7 +405,7 @@ var DirStage1List, FilesList, DirStage2List: TList;
if Engine.GetListing(LocalList, LocalPath, True, False, True, @Error) then begin
for i := 0 to LocalList.Count - 1 do begin
Item := LocalList[i];
- ItemSL := malloc(sizeof(TDataItemSL));
+ ItemSL := libc_malloc(sizeof(TDataItemSL));
memset(ItemSL, 0, sizeof(TDataItemSL));
ItemSL^.DataItem := Item;
ItemSL^.Stage1 := True;
@@ -498,7 +498,7 @@ begin
DataItem := Engine.GetFileInfo(APath, False, True, nil);
if DataItem = nil then Exit; // Inaccessible file
- ItemSL := malloc(sizeof(TDataItemSL));
+ ItemSL := libc_malloc(sizeof(TDataItemSL));
memset(ItemSL, 0, sizeof(TDataItemSL));
// * TODO: report errors? same way as for FillDirFiles
ItemSL^.DataItem := DataItem;
@@ -796,7 +796,7 @@ var t: time_t;
Data^.Size := ASize;
s := FormatSize(ASize, 0);
libc_free(Data^.ColumnData[3]);
-// Data^.ColumnData[3] := malloc(Length(s) + 1);
+// Data^.ColumnData[3] := libc_malloc(Length(s) + 1);
// memset(Data^.ColumnData[3], 0, Length(s) + 1);
Data^.ColumnData[3] := strdup(PChar(s));
except end;
@@ -870,7 +870,7 @@ begin
if Pos('.', FileName) > 1 then FileName := ChangeFileExt(FileName, '.crc')
else FileName := FileName + '.crc';
try
- Buffer := malloc(CRCBlockSize);
+ Buffer := libc_malloc(CRCBlockSize);
memset(Buffer, 0, CRCBlockSize);
except
Application.MessageBox(LANGAnErrorOccuredWhileInitializingMemoryBlock, [mbOK], mbError, mbNone, mbOK);
@@ -1112,7 +1112,7 @@ begin
if Assigned(DirEnt) and Assigned(PChar(@DirEnt^.d_name[0])) then begin
Buf := Pchar(@DirEnt^.d_name[0]);
if (Buf <> '.') and (Buf <> '..') and (DirEnt^.d_name[0] <> #0) then begin
- StatBuf := malloc(sizeof(Tstat64));
+ StatBuf := libc_malloc(sizeof(Tstat64));
memset(StatBuf, 0, sizeof(Tstat64));
if lstat64(PChar(APath + string(Buf)), StatBuf) = 0 then
if __S_ISTYPE(StatBuf^.st_mode, __S_IFDIR)