changed Int64 to QWord for chmreader to be consistent.

git-svn-id: trunk@9446 -
This commit is contained in:
andrew 2007-12-14 17:24:18 +00:00
parent 0c773015ef
commit fba415c79d
2 changed files with 15 additions and 15 deletions

View File

@ -57,9 +57,9 @@ type
fChmHeader: TITSFHeader;
fHeaderSuffix: TITSFHeaderSuffix;
fDirectoryHeader: TITSPHeader;
fDirectoryHeaderPos: Int64;
fDirectoryHeaderPos: QWord;
fDirectoryHeaderLength: QWord;
fDirectoryEntriesStartPos: Int64;
fDirectoryEntriesStartPos: QWord;
fDirectoryEntries: array of TPMGListChunkEntry;
fCachedEntry: TPMGListChunkEntry; //contains the last entry found by ObjectExists
fDirectoryEntriesCount: LongWord;
@ -75,7 +75,7 @@ type
procedure GetSections(out Sections: TStringList);
function GetBlockFromSection(SectionPrefix: String; StartPos: QWord; BlockLength: QWord): TMemoryStream;
function FindBlocksFromUnCompressedAddr(var ResetTableEntry: TPMGListChunkEntry;
out CompressedSize: Int64; out UnCompressedSize: Int64; out LZXResetTable: TLZXResetTableArr): QWord; // Returns the blocksize
out CompressedSize: QWord; out UnCompressedSize: QWord; out LZXResetTable: TLZXResetTableArr): QWord; // Returns the blocksize
public
constructor Create(AStream: TStream; FreeStreamOnDestroy: Boolean); virtual;
destructor Destroy; override;
@ -343,10 +343,10 @@ procedure TChmReader.ReadCommonData;
fStrings: TMemoryStream;
EntryCount,
EntrySize: DWord;
EntryStart: Int64;
EntryStart: QWord;
StrPosition: DWord;
X: Integer;
OffSet: Int64;
OffSet: QWord;
begin
fWindows := TMemoryStream(GetObject('/#WINDOWS'));
if fWindows = nil then begin
@ -629,7 +629,7 @@ var
ItemCount: Integer;
procedure ReadQuickRefSection;
var
OldPosn: Int64;
OldPosn: QWord;
Posn: Integer;
I: Integer;
begin
@ -835,8 +835,8 @@ var
Compressed: Boolean;
Sig: Array [0..3] of char;
CompressionVersion: LongWord;
CompressedSize: Int64;
UnCompressedSize: Int64;
CompressedSize: QWord;
UnCompressedSize: QWord;
//LZXResetInterval: LongWord;
//LZXWindowSize: LongWord;
//LZXCacheSize: LongWord;
@ -942,7 +942,7 @@ begin
//now write the decompressed data to the stream
if ResultCode = DECR_OK then begin
Result.Write(OutBuf[WriteStart], Int64(WriteCount));
Result.Write(OutBuf[WriteStart], QWord(WriteCount));
end
else begin
{$IFDEF CHM_DEBUG} // windows gui program will cause an exception with writeln's
@ -967,7 +967,7 @@ begin
end;
function TITSFReader.FindBlocksFromUnCompressedAddr(var ResetTableEntry: TPMGListChunkEntry;
out CompressedSize: Int64; out UnCompressedSize: Int64; out LZXResetTable: TLZXResetTableArr): QWord;
out CompressedSize: QWord; out UnCompressedSize: QWord; out LZXResetTable: TLZXResetTableArr): QWord;
var
BlockCount: LongWord;
{$IFDEF ENDIAN_BIG}

View File

@ -54,7 +54,7 @@ type
FContextStream: TMemoryStream; // the #IVB file
FSection0: TMemoryStream;
FSection1: TStream; // Compressed Stream
FSection1Size: Int64;
FSection1Size: QWord;
FSection1ResetTable: TMemoryStream; // has a list of frame positions NOT window positions
FDirectoryListings: TStream;
FOutStream: TStream;
@ -66,7 +66,7 @@ type
FHasTOC: Boolean;
FHasIndex: Boolean;
FWindowSize: LongWord;
FReadCompressedSize: Int64; // Current Size of Uncompressed data that went in Section1 (compressed)
FReadCompressedSize: QWord; // Current Size of Uncompressed data that went in Section1 (compressed)
// Linear order of file
ITSFHeader: TITSFHeader;
HeaderSection0Table: TITSFHeaderEntry; // points to HeaderSection0
@ -248,7 +248,7 @@ const
PMGI = 'PMGI';
procedure UpdateLastListChunk;
var
Tmp: Int64;
Tmp: QWord;
begin
if ChunkIndex < 1 then begin
Exit;
@ -692,7 +692,7 @@ procedure TChmWriter.MarkFrame(UnCompressedTotal, CompressedTotal: LongWord);
end;
procedure IncEntryCount;
var
OldPos: Int64;
OldPos: QWord;
Value: DWord;
begin
OldPos := FSection1ResetTable.Position;
@ -704,7 +704,7 @@ procedure TChmWriter.MarkFrame(UnCompressedTotal, CompressedTotal: LongWord);
end;
procedure UpdateTotalSizes;
var
OldPos: Int64;
OldPos: QWord;
begin
OldPos := FSection1ResetTable.Position;
FSection1ResetTable.Position := $10;