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

View File

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