diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-26 10:42:59 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-26 10:42:59 +0200 |
commit | 3d124609e32b5873d71a4aa27a4342649ebd3522 (patch) | |
tree | e6d68bfd8f3017e09d26d58583d5859d6dab316c /docview | |
parent | 262360d4e6fe6e5d027fbc860b1e90aad62f965b (diff) | |
parent | b7c5d1a50183c1c50033a330a01351d69e2bc438 (diff) | |
download | fpGUI-3d124609e32b5873d71a4aa27a4342649ebd3522.tar.xz |
Merge branch 'master' of /media/flash16gig/git_repos/fpgui
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)); |