diff options
Diffstat (limited to 'docview')
-rw-r--r-- | docview/src/HelpFile.pas | 9 | ||||
-rw-r--r-- | docview/src/IPFFileFormatUnit.pas | 6 | ||||
-rw-r--r-- | docview/src/frm_main.pas | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/docview/src/HelpFile.pas b/docview/src/HelpFile.pas index 4cd36edc..dc9998ed 100644 --- a/docview/src/HelpFile.pas +++ b/docview/src/HelpFile.pas @@ -46,8 +46,11 @@ type end; + { THelpFile } + THelpFile = class(TObject) private + function GetFormatVersion: string; function GetStringResourceIDCount: integer; function GetNumericResourceIDCount: integer; protected @@ -133,6 +136,7 @@ type property NumericResourceIDCount: integer read GetNumericResourceIDCount; property Index: TIndex read GetIndex; property Filename: string read _FileName; + property FormatVersion: string read GetFormatVersion; property ReferencedFiles: TStringList read _ReferencedFiles; @@ -346,6 +350,11 @@ Begin Result := Topic.HelpFile as THelpFile; end; +function THelpFile.GetFormatVersion: string; +begin + Result := Format('%d.%d', [_pHeader^.version_hi, _pHeader^.version_lo]); +end; + function THelpFile.GetStringResourceIDCount: integer; begin Result := _pHeader^.nname; diff --git a/docview/src/IPFFileFormatUnit.pas b/docview/src/IPFFileFormatUnit.pas index b954f4c8..66c52b40 100644 --- a/docview/src/IPFFileFormatUnit.pas +++ b/docview/src/IPFFileFormatUnit.pas @@ -10,9 +10,9 @@ uses SysUtils; type - uint32 = longword; - uint16 = word; - uint8 = byte; + uint32 = longword; // 4 bytes + uint16 = word; // 2 bytes + uint8 = byte; // 1 byte pUInt16 = ^uint16; pUInt32 = ^uint32; pUInt8 = ^uint8; diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas index 298a56d6..0d9f00ac 100644 --- a/docview/src/frm_main.pas +++ b/docview/src/frm_main.pas @@ -493,6 +493,7 @@ begin Add('<b><u>Filename:</u></b> <blue>' + f.Filename + '<black>'); Add('<b>Title:</b> ' + f.Title); Add('<b>File size:</b> ' + IntToStr(fpgFileSize(f.Filename)) + ' bytes'); + Add('<b>INF/HLP file version</b> ' + f.FormatVersion); Add('<b>Dictionary count:</b> ' + IntToStr(f.DictionaryCount)); Add('<b>Topic count:</b> ' + IntToStr(f.TopicCount)); Add('<b>Index count:</b> ' + IntToStr(f.Index.Count)); |