summaryrefslogtreecommitdiff
path: root/UChecksum.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 /UChecksum.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 'UChecksum.pas')
-rw-r--r--UChecksum.pas18
1 files changed, 9 insertions, 9 deletions
diff --git a/UChecksum.pas b/UChecksum.pas
index 5f0e4db..c6099a6 100644
--- a/UChecksum.pas
+++ b/UChecksum.pas
@@ -63,7 +63,7 @@ var
implementation
-uses ULocale, UCoreUtils, Libc, UCore, DateUtils;
+uses ULocale, UCoreUtils, ULibc, UCore, DateUtils;
type TFileListItem = class
CRC: LongWord;
@@ -217,8 +217,8 @@ begin
else if SFVPresent then FileList.Columns[1].Caption := 'CRC-32';
try
- Buffer := Libc.malloc(ChksumBlockSize);
- Libc.memset(Buffer, 0, ChksumBlockSize);
+ Buffer := malloc(ChksumBlockSize);
+ memset(Buffer, 0, ChksumBlockSize);
except
Application.MessageBox(LANGAnErrorOccuredWhileInitializingMemoryBlock, [mbOK], mbError, mbNone, mbOK);
Exit;
@@ -227,7 +227,7 @@ begin
FD := Engine.OpenFile(FileName, omRead, Error);
if Error <> 0 then begin
Application.MessageBox(Format(LANGAnErrorOccuredWhileOpeningFileSS, [StrToUTF8(ExtractFileName(FileName)), GetErrorString(Error)]), [mbOK], mbError, mbNone, mbOK);
- Libc.free(Buffer);
+ libc_free(Buffer);
Exit;
end;
s := '';
@@ -237,7 +237,7 @@ begin
if Error <> 0 then begin
Application.MessageBox(Format(LANGAnErrorOccuredWhileReadingFileSS, [StrToUTF8(ExtractFileName(FileName)), GetErrorString(Error)]), [mbOK], mbError, mbNone, mbOK);
Engine.CloseFile(FD);
- Libc.free(Buffer);
+ libc_free(Buffer);
Exit;
end;
// processing begins
@@ -258,7 +258,7 @@ begin
CommentOpen := False;
Engine.CloseFile(FD);
- Libc.free(Buffer);
+ libc_free(Buffer);
Result := True;
end;
@@ -393,8 +393,8 @@ begin
ProgressBar.Value := 0;
Application.ProcessMessages;
try
- Buffer := Libc.malloc(ChksumBlockSize);
- Libc.memset(Buffer, 0, ChksumBlockSize);
+ Buffer := malloc(ChksumBlockSize);
+ memset(Buffer, 0, ChksumBlockSize);
except
Application.MessageBox(LANGAnErrorOccuredWhileInitializingMemoryBlock, [mbOK], mbError, mbNone, mbOK);
Exit;
@@ -445,7 +445,7 @@ begin
DebugMsg([Format('Checksum processing: %d:%3d = %.3f MB/s', [SecondOf(Time2 - Time1), MillisecondOf(Time2 - Time1),
(MaxSize / (SecondOf(Time2 - Time1) + MillisecondOf(Time2 - Time1) / 1000)) / (1024 * 1024)])]);
FileList.Items[List.Count - 1].RedrawRow;
- Libc.free(Buffer);
+ libc_free(Buffer);
ProgressBar.Fraction := 1;
CheckButton.Caption := LANGCheckButtonCaptionCheck;
if Stop then StatLabel.Caption := LANGChecksumInterrupted else begin