diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-04-06 23:40:44 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-04-06 23:40:44 +0200 |
commit | 5fcd65fd7988b5078c6a52aa6dbb7b1423ebf7bb (patch) | |
tree | 5858eb63110c966aa3c593648ccacfdb08236507 /docview/src/docdump | |
parent | 87f6a1c5162ef80b8124a367af51349a952aceb5 (diff) | |
download | fpGUI-5fcd65fd7988b5078c6a52aa6dbb7b1423ebf7bb.tar.xz |
docdump: fixes the TOC entry offset values in hex and bytes.
The offset is now the offset in bytes from the start of the INF file.
Diffstat (limited to 'docview/src/docdump')
-rw-r--r-- | docview/src/docdump/readtoc.pas | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docview/src/docdump/readtoc.pas b/docview/src/docdump/readtoc.pas index 8c98e31e..d0b74c5b 100644 --- a/docview/src/docdump/readtoc.pas +++ b/docview/src/docdump/readtoc.pas @@ -58,9 +58,9 @@ var pEntry: pTTOCEntryStart; pExtendedInfo: pExtendedTOCEntry; p: PByte; - i: integer; titleLen: integer; title: string; + lOffset: uint32; begin AOut.WriteLn(''); AOut.WriteLn('Table of Contents'); @@ -78,14 +78,14 @@ begin // AIn.Read(toc, SizeOf(TTOCEntryStart)); // FillChar(olay, SizeOf(TTOCOverlay), 0); p := PByte(pEntry) + sizeof(TTOCEntryStart); - i := Longint(p^); olay.extended := (pEntry^.flags and TOCEntryExtended ) = TOCEntryExtended; olay.nestlevel := (pEntry^.flags and TOCEntryLevelMask); olay.hidden := (pEntry^.flags and TOCEntryHidden) = TOCEntryHidden; olay.haschildren := (pEntry^.flags and TOCEntryHasChildren) = TOCEntryHasChildren; - AOut.WriteLn(Format(' TOC Entry #%d at offset %8.8x (%d bytes)', [count, p^, i])); + lOffset := hdr.tocstart + (pEntry-pData); + AOut.WriteLn(Format(' TOC Entry #%d at offset %8.8x (%d bytes)', [count, lOffset, lOffset])); AOut.WriteLn(Format(' tocentry.length: %2.2x (%0:d bytes)', [pEntry^.length])); AOut.WriteLn(Format(' tocentry.nestlevel: %d', [olay.nestlevel])); AOut.WriteLn(Format(' tocentry.unknown: %s', [iif(olay.unknown, 'set', 'clear')])); |