home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-01 | 116.5 KB | 2,057 lines |
- %@1@%%@AB@%Microsoft Professional Advisor - LIBRARY REFERENCE%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
-
- ────────────────────────────────────────────────────────────────────────────%@NL@%
- %@AB@%Microsoft (R) Professional Advisor - LIBRARY REFERENCE%@AE@%%@NL@%
- %@NL@%
- %@AB@%%@AE@%%@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%
- %@NL@%
- %@NL@%
- FOR MS (R) OS/2 and MS-DOS (R)
- OPERATING SYSTEMS%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%%@NL@%
- %@NL@%
-
-
- MICROSOFT CORPORATION %@NL@%
- %@NL@%
- Information in this document is subject to change without notice and does
- not represent a commitment on the part of Microsoft Corporation. The
- software described in this document is furnished under a license agreement
- or nondisclosure agreement. The software may be used or copied only in
- accordance with the terms of the agreement. It is against the law to copy
- the software on any medium except as specifically allowed in the license or
- nondisclosure agreement. No part of this manual may be reproduced or
- transmitted in any form or by any means, electronic or mechanical, including
- photocopying and recording, for any purpose without the express written
- permission of Microsoft.
- RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is
- subject to restrictions as set forth in subparagraph (c)(1)(ii) of the
- Rights in Technical Data and Computer Software clause at DFARS 252.227-7013
- or subparagraphs (c)(1) and (2) of Commercial Computer Software
- ─Restricted Rights at 48 CFR 52.227-19, as applicable.
- Contractor/Manufacturer is Microsoft Corporation, One Microsoft Way,
- Redmond, WA 98052-6399.%@NL@%
- %@NL@%
-
- (C) Copyright Microsoft Corporation, 1990. All rights reserved.%@NL@%
- %@NL@%
-
- Printed in the United States of America.%@NL@%
- %@NL@%
-
- Microsoft, MS, MS-DOS, CodeView, and QuickC
- are registered trademarks of Microsoft Corporation.%@NL@%
- %@NL@%
- Apple and Macintosh are registered trademarks of Apple
- Computer, Inc.%@NL@%
- %@NL@%
- IBM is a registered trademark of International Business
- Machines Corporation.%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- Document No. LN18160-0990
- OEM D/0711-1Z
-
- 10 9 8 7 6 5 4 3 2 1 %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@AB@%Introduction%@AE@%%@BO: 16d8@%%@NL@%
- %@NL@%
- %@AB@%Chapter 1%@AE@%%@BO: 2458@% %@AB@%The Help Database%@AE@%%@NL@%
- %@NL@%
- 1.1%@BO: 27d0@% QuickHelp ASCII%@NL@%
- 1.1.1%@BO: 2a63@% Formatting Flags%@NL@%
- 1.1.2%@BO: 2f7f@% Cross-References%@NL@%
- 1.1.3%@BO: 3203@% QuickHelp Example%@NL@%
- 1.2%@BO: 34fc@% Minimally Formatted ASCII%@NL@%
- 1.3%@BO: 3b07@% Unformatted ASCII%@NL@%
- 1.4%@BO: 3cb7@% RTF ASCII%@NL@%
- 1.4.1%@BO: 46ae@% RTF Example%@NL@%
- 1.4.2%@BO: 4c6d@% Local Contexts%@NL@%
- 1.5%@BO: 54d3@% Physical Database Organization%@NL@%
- 1.5.1%@BO: 58d8@% Concatenated Order%@NL@%
- 1.5.2%@BO: 70d5@% Decompressed Topic Format%@NL@%
- 1.6%@BO: 80f3@% The Encoding Process%@NL@%
- %@NL@%
- %@AB@%Chapter 2%@AE@%%@BO: 88b7@% %@AB@%Text Structure and Conventions%@AE@%%@NL@%
- %@NL@%
- 2.1%@BO: 8b0d@% Authoring the Help Database%@NL@%
- 2.1.1%@BO: 8caf@% QuickHelp Format%@NL@%
- 2.1.2%@BO: 9176@% RTF Format%@NL@%
- 2.2%@BO: 96ee@% Hotspots and Cross-References%@NL@%
- 2.3%@BO: a5ca@% Topic Commands%@NL@%
- 2.4%@BO: e0b6@% Cross-Reference Commands%@NL@%
- 2.5%@BO: fe6a@% Context Conventions%@NL@%
- 2.5.1%@BO: 1013f@% Contexts Covered by Convention%@NL@%
- 2.5.2%@BO: 10973@% Required Contexts%@NL@%
- 2.5.3%@BO: 1101d@% Recommended Contexts%@NL@%
- 2.5.4%@BO: 114f1@% Product-Specific Contexts%@NL@%
- 2.6%@BO: 119b1@% Hierarchical Contexts%@NL@%
- 2.7%@BO: 11dcd@% Environment Support%@NL@%
- %@NL@%
- %@AB@%Chapter 3%@AE@%%@BO: 12275@% %@AB@%The HELPMAKE Program%@AE@%%@NL@%
- %@NL@%
- 3.1%@BO: 12515@% HELPMAKE Options%@NL@%
- 3.1.1%@BO: 126ba@% Encoding Options%@NL@%
- 3.1.2%@BO: 12b2d@% Other HELPMAKE Options%@NL@%
- %@NL@%
- %@AB@%Chapter 4%@AE@%%@BO: 139c1@% %@AB@%Applications Interface%@AE@%%@NL@%
- %@NL@%
- 4.1%@BO: 13bd9@% Defining the Interface%@NL@%
- 4.2%@BO: 143ab@% Base File Management%@NL@%
- 4.3%@BO: 148ec@% Context String Management%@NL@%
- 4.4%@BO: 15ca3@% Topic Look-Up and Decompression%@NL@%
- 4.5%@BO: 16722@% Context Maneuvering%@NL@%
- 4.6%@BO: 16fad@% Topic Display%@NL@%
- 4.7%@BO: 17d14@% Cross-References%@NL@%
- 4.8%@BO: 18bfb@% Utility%@NL@%
- 4.9%@BO: 197f1@% Help Engine Callbacks%@NL@%
- 4.10%@BO: 1a993@% Interface Usage%@NL@%
- %@NL@%
- %@AB@%Chapter 5%@AE@%%@BO: 1afd6@% %@AB@%Size and Performance%@AE@%%@NL@%
- %@NL@%
- 5.1%@BO: 1b093@% Help Engine%@NL@%
- 5.2%@BO: 1be38@% HELPMAKE.EXE%@NL@%
- %@NL@%
- %@AB@%Glossary%@AE@%%@BO: 1bf75@%%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A-Intro @%%@1@%%@AB@%Introduction%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@NL@%
- The Microsoft(R) Professional Advisor %@AI@%Library Reference%@AE@% contains information
- about the help library supplied with Microsoft C products. There are several
- advantages to using the Advisor Help Library. %@NL@%
- %@NL@%
- %@AB@%Speed and Maneuverability%@AE@% - The help desired by the user must be available
- quickly, with a minimum of user decisions and selections. To achieve this
- goal, the Advisor Help Library supports cross-referencing, context
- sensitivity, preserves previous help activity, and flexible help-text
- organization.%@NL@%
- %@NL@%
- %@AB@%Modification%@AE@% - Users and/or application developers need to be able to add
- help text to the help system and modify existing help text to suit their
- applications and environments. To meet this need, a maintenance utility
- performs both compression and decompression of help files. Also, the Advisor
- Help Library provides the ability to read uncompressed ASCII text as a help
- file.%@NL@%
- %@NL@%
- %@AB@%Integration%@AE@% - The help text presented must be available to outside
- applications. The Advisor Help Library provides support routines necessary
- to allow the application to access this valuable help text.%@NL@%
- %@NL@%
- %@AB@%Size%@AE@% - It is important to create help files that take up minimal disk space
- but do not at the same time severely impact look-up speed. The Advisor Help
- Library provides three compression algorithms to reduce disk space and meet
- speed requirements.%@NL@%
- %@NL@%
- The Advisor Help Library includes the following files: %@NL@%
- %@NL@%
- %@AB@%File Name%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- HELPMAKE.EXE Bound Help-File-Maintenance Utility.
-
- MSHELP.DLL OS/2 help engine in DLL form.
-
- MSHELP.LIB OS/2 help engine export library.
-
- MHELP.LIB Medium-model help engine.
-
- MHELPH.LIB Medium-model help engine using
- handle:offset.
-
- LHELP.LIB Large-model help engine.
-
- WHELPP.LIB SS!=DS help engine, protected mode.
-
- WHELPR.LIB SS!=DS help engine, real mode.
-
- HELP.H Help engine include file. All
- applications should
- use this.
-
- MSHELP.DEF .DEF file for applications that can use
- it.
-
- SHELP.LIB Small-model help engine.
-
- ────────────────────────────────────────────────────────────────────────────%@NL@%
- NOTE
-
- %@AI@%The pages that follow use the term "OS/2" to refer to the OS/2
- %@AI@%systems─Microsoft Operating System/2 (MS%@AI@%(R)%@AE@%%@AI@% OS/2) and IBM%@AE@%%@AI@%(R)%@AE@%%@AI@% OS/2.
- %@AI@%Similarly, the term "DOS" refers to both the MS-DOS%@AE@%%@AI@%(R)%@AE@%%@AI@% and IBM Personal
- %@AI@%Computer DOS operating systems. The name of a specific operating system is
- %@AI@%used when it is necessary to note features that are unique to the system.%@AE@%%@AE@%%@NL@%
-
- ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A00010001 @%%@1@%%@AB@%Chapter 1 The Help Database%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@NL@%
- There are four types of format text for the topical contents of the help
- database: %@NL@%
- %@NL@%
- %@AB@%ASCII Format%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- QuickHelp Default source format for compressed
- databases
-
- Minimally formatted Can be either compressed or read
- directly from the help engine
-
- RTF An alternate source for the compressed
- database
-
- Unformatted For use directly by the help engine
-
- %@NL@%
- %@2@%%@CR:C6A00010002 @%%@AB@%1.1 QuickHelp ASCII%@AE@%%@EH@%%@NL@%
- %@NL@%
- QuickHelp uses "dot" commands and embedded formatting characters to convey
- information to HELPMAKE. For example: %@NL@%
- %@NL@%
- %@AS@% .context%@AE@%%@NL@%
- %@NL@%
- Each topic is preceded by one or more %@AB@%.context%@AE@% commands that indicate the
- context string for the following topic text up to the next %@AB@%.context%@AE@% line.
- More than one %@AB@%.context%@AE@% command may be specified for a single topic, if no
- topic text is placed between them. For more information on topic commands,
- see Section 2.3 in Chapter 2, "Text Structure and Conventions." %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010003 @%%@AB@%1.1.1 Formatting Flags%@AE@%%@EH@%%@NL@%
- %@NL@%
- The following flags may be embedded in the text to change the attributes of
- the topic text: %@NL@%
- %@NL@%
- %@AB@%Formatting Flag%@AE@% %@AB@%Action%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- \b or \B Bold
-
- \i or \I Italic
-
- \p or \P Plain
-
- \u or \U Underline
-
- \v or \V Invisible
-
- The flags \b, \i, \u and \v are toggles, turning on and off their respective
- attribute. They may be combined. The \p flag turns off all attributes. %@NL@%
- %@NL@%
- The backslash character also escapes the character which follows it, that
- is, %@NL@%
- %@NL@%
- \b %@NL@%
- %@NL@%
- indicates the toggling of the bold attribute, while %@NL@%
- %@NL@%
- \\b %@NL@%
- %@NL@%
- places a " \b" into the actual text. %@NL@%
- %@NL@%
- Lines are truncated to the specified width in characters (which defaults to
- 76); flags affecting the attribute do not count towards the 76-character
- limit. When "/T" is specified, lines beginning with the specified
- application's control character or "." are truncated at 255, regardless of
- the width specification. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010004 @%%@AB@%1.1.2 Cross-References%@AE@%%@EH@%%@NL@%
- %@NL@%
- Cross-references are embedded in one of two ways: %@NL@%
- %@NL@%
- %@NL@%
- 1. Invisible text, immediately following a space-delineated word,
- generates a cross-reference whose text is the invisible text and whose
- hotspot is the entire word.%@NL@%
- %@NL@%
- 2. An anchor, signified by " \a", followed by normal text, which is then
- followed by invisible text, generates a cross-reference whose text is
- the invisible text and whose hotspot is all text between the anchor
- and the beginning of the invisible text.%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010005 @%%@AB@%1.1.3 QuickHelp Example%@AE@%%@EH@%%@NL@%
- %@NL@%
- The following is an example of a help database containing a single entry
- using QuickHelp format: %@NL@%
- %@NL@%
- %@AS@% .context #define
- %@AS@% Syntax: #define <identifier> <substitution-text>
- %@AS@% #define <identifier> [(<parameter-list>)]
- %@AS@% <substitution-text>
- %@AS@%
- %@AS@% Replaces all subsequent cases of \bidentifier\p with the
- %@AS@%substitution-text.
- %@AS@% If \bparameter-list\p is given after \bidentifier\p, each occurrence
- %@AS@% of \bidentifier\p (\bparameter-list\p) is replaced with a version
- %@AS@% of \isubstitution-text\p modified by substituting actual
- %@AS@% arguments for formal parameters.%@AE@%%@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00010006 @%%@AB@%1.2 Minimally Formatted ASCII%@AE@%%@EH@%%@NL@%
- %@NL@%
- Uncompressed, minimally formatted ASCII help files can be used at run time
- at the cost of slower searches and larger help files. Unformatted ASCII
- files are a fixed width and may not contain highlighting or
- cross-references. %@NL@%
- %@NL@%
- The help file is a sequential series of topics, each preceded by one or more
- unique context definitions. Each context definition should be on a line of
- its own, beginning with ">>." Subsequent lines up to the next context
- definition constitute the topic text. For example: %@NL@%
- %@NL@%
- %@AS@% >>#define%@AE@%%@NL@%
- %@NL@%
- %@AS@% Syntax: #define <identifier> <substitution-text>
- %@AS@% #define <identifier> [(<parameter-list>)]
- %@AS@% <substitution-text>
- %@AS@%
- %@AS@% Replaces all subsequent cases of identifier with the substitution-text.
- %@AS@% If parameter-list is given after identifier, each occurrence of identifier
- %@AS@%
- %@AS@% (parameter-list) is replaced with
- %@AS@% a version of substitution-text modified by substituting actual arguments
- %@AS@% for formal parameters.%@AE@%%@NL@%
- %@NL@%
- The minimally formatted ASCII help file must begin with ">>." Since the
- first topic in such a database must start with a context definition line
- anyway, this allows for limited error checking to ensure that the referenced
- file is indeed an ASCII help file. %@NL@%
- %@NL@%
- Minimally formatted ASCII files do not support non-default attributes or
- cross-references. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00010007 @%%@AB@%1.3 Unformatted ASCII%@AE@%%@EH@%%@NL@%
- %@NL@%
- Fully unformatted ASCII files may be cross-referenced by other help files.
- When referenced, the entire ASCII file is treated as a single help topic. No
- formatting information may be present in such a file, and color may not be
- used. The file is returned by the help engine "as is." Such a file has no
- physical "next" or "previous." %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00010008 @%%@AB@%1.4 RTF ASCII%@AE@%%@EH@%%@NL@%
- %@NL@%
- In this format, the database is formatted in a subset of RTF to support
- special attributes. RTF syntax outside of the understood subset is ignored
- and stripped out by HELPMAKE. RTF generated by other programs such as
- Microsoft Word 4.%@AI@% %@AE@%x, Microsoft Word for the Apple(R) Macintosh(R), or
- Word-RTF can be used directly. This allows help authors to write and format
- directly in these word processors. %@NL@%
- %@NL@%
- HELPMAKE recognizes the subset of RTF listed below: %@NL@%
- %@NL@%
- %@AB@%RTF Code%@AE@% %@AB@%Action%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- \plain Reset to default attributes. On most
- screens this is unblinking normal
- intensity.
-
- \b Bold. This is displayed as intensified
- text.
-
- \i Italic. Displayed as reverse video.
-
- \v Hidden text. Hidden text is used for
- cross-reference information and some
- application-specific communications, and
- is not displayed.
-
- \ul Underline. Represented as blue text on
- adapters which do not support
- underlining.
-
- \par End of paragraph.
-
- \pard Reset paragraph formatting to defaults.
-
- \fi Paragraph first line indent.
-
- \li Paragraph left indent.
-
- \line New line (not new paragraph).
-
- \tab Tab character.
-
- Topics may be paragraph-broken. HELPMAKE formats the text to a fixed width
- at compression time. %@NL@%
- %@NL@%
- Each entry in the database source consists of one or more context strings,
- followed by topic text. The sequence ">>" at the beginning of any paragraph
- denotes the beginning of a new help entry. Subsequent text within that
- paragraph constitutes the keyword. If the immediately following paragraph
- begins with ">>," it also defines a context string for the same topic text.
- Subsequent paragraphs, up to the next paragraph beginning with ">>",
- constitute the topic text associated with those contexts. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010009 @%%@AB@%1.4.1 RTF Example%@AE@%%@EH@%%@NL@%
- %@NL@%
- The following is an example of a help database containing a single entry
- using minimal RTF text: %@NL@%
- %@NL@%
- %@AS@% {\rtf0
- %@AS@% >> #define \par
- %@AS@% Syntax:\tab #define <identifier> <substitution-text>
- %@AS@% \par
- %@AS@% \tab #define <identifier>[(<parameter-list>)] <substitution-text>
- %@AS@% \par
- %@AS@% \par
- %@AS@% Replaces all subsequent cases of {\b identifier} with the
- %@AS@%substitution-text.
- %@AS@% If {\b parameter-list} is given after {\b identifier}, each occurrence
- %@AS@% of
- %@AS@% {\b identifier} ({\b parameter-list} ) is replaced with a version
- %@AS@% of
- %@AS@% {\i substitution-text} modified by substituting actual arguments for
- %@AS@% formal parameters. \par
- %@AS@% }%@AE@%%@NL@%
- %@NL@%
- The result, referenced by the context string %@AB@%#define%@AE@%: %@NL@%
- %@NL@%
- %@AS@% Syntax: #define <identifier> <substitution-text>
- %@AS@% #define <identifier>[(<parameter-list>)] <substitution-text>
- %@AS@%
- %@AS@% Replaces all subsequent cases of identifier with the substitution-text.
- %@AS@% If parameter-list is given after identifier, each occurrence
- %@AS@% of identifier (parameter-list) is replaced with a version
- %@AS@% of substitution-text modified by substituting actual
- %@AS@% arguments for formal parameters.%@AE@%%@NL@%
- %@NL@%
- Note that the bold attributes in this example are shown as underline. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010010 @%%@AB@%1.4.2 Local Contexts%@AE@%%@EH@%%@NL@%
- %@NL@%
- In RTF, QuickHelp, and minimal ASCII formats, certain context strings may be
- defined as local contexts, being "local" to the help file. Then these
- context strings may not be looked up by %@AB@%HelpNc%@AE@%, but instead may be used only
- as the target of embedded cross references in the text. %@NL@%
- %@NL@%
- Local contexts are encoded just like normal contexts, except that they begin
- with the at-sign character (@). The actual strings following the at sign are
- discarded by HELPMAKE during compression. Cross-references to local contexts
- are then encoded in the help file in a more compact form. %@NL@%
- %@NL@%
- Local contexts provide the following advantages: %@NL@%
- %@NL@%
- %@NL@%
- ■ Space savings. The context strings are not preserved and hence are not
- carried in the help file's context string table. Cross-references to
- local contexts do not reference the actual context string, but instead
- are encoded in a smaller, 3-byte format.%@NL@%
- %@NL@%
- ■ Access restriction. You cannot mistakenly ask for help on what would
- be a local context string.%@NL@%
- %@NL@%
- %@NL@%
- The following restrictions also apply: %@NL@%
- %@NL@%
- %@NL@%
- ■ Local contexts must be resolvable within a single help file. HELPMAKE
- produces warnings if a local context is cross-referenced, but never
- defined in the help file being created.%@NL@%
- %@NL@%
- ■ Topics which are the targets of local contexts can be accessed in only
- two ways: as the target of a cross-reference or by physical or
- historical relative movement in the help file (Next, Previous, or
- Back).%@NL@%
- %@NL@%
- %@STUB@% For example:%@NL@%
- %@NL@%
- %@AS@% .context normal
- %@AS@% This is a normal topic, accessible by the context string "normal."
- %@AS@% [button\v@local\v] is a cross-reference to the following topic.
- %@AS@%
- %@AS@% .context @local
- %@AS@% This topic can be reached only by physical previous or next, a
- %@AS@%historical
- %@AS@% backup, or by the cross-reference in the previous topic.%@AE@%%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00010011 @%%@AB@%1.5 Physical Database Organization%@AE@%%@EH@%%@NL@%
- %@NL@%
- The physical database consists of several pieces, as outlined below: %@NL@%
- %@NL@%
- %@AS@% +-----
- %@AS@% | Header
- %@AS@% +-----
- %@AS@% | Topic Index
- %@AS@% +-----
- %@AS@% | Context Strings
- %@AS@% +-----
- %@AS@% | Context Map
- %@AS@% +-----
- %@AS@% | Keyphrase Table
- %@AS@% +-----
- %@AS@% | Huffman Decode Tree
- %@AS@% +----
- %@AS@% | Compressed Topic Text
- %@AS@% +----
- %@AS@% | File Title
- %@AS@% +----%@AE@%%@NL@%
- %@NL@%
- Help files may also be concatenated together so that the above pattern is
- repeated. For example, %@NL@%
- %@NL@%
- %@AS@% COPY FOO.HLP/B + BAR.HLP/B + YOU.HLP/B MONDO.HLP/B%@AE@%%@NL@%
- %@NL@%
- This command creates a single help file called MONDO.HLP, which consists of
- the three component help files: FOO, BAR, and YOU. This file, when opened by
- the help engine, counts as three files against the engine's open file limit.
- In most other respects, it acts exactly like a single help file. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010012 @%%@AB@%1.5.1 Concatenated Order%@AE@%%@EH@%%@NL@%
- %@NL@%
- The next several sections explain the pieces in the order in which they
- physically appear in a concatenated help database. %@NL@%
- %@NL@%
- %@AB@%Header%@AE@% - Identifies the help file and contains data relating to the content
- of the file. It is described by the following C structure:%@NL@%
- %@NL@%
- %@AS@% typedef struct {
- %@AS@% ushort wMagic;
- %@AS@% ushort wSignature;
- %@AS@% ushort wFlags;
- %@AS@% ushort appChar;
- %@AS@% ushort cTopics;
- %@AS@% ushort cContexts;
- %@AS@% ushort cbWidth;
- %@AS@% ushort cPreDef;
- %@AS@% uchar fname[14];
- %@AS@% ushort reserved[2];
- %@AS@% ulong posTbl[9];
- %@AS@% ulong fsize;
- %@AS@% } header;%@AE@%%@NL@%
- %@NL@%
- where the following information is called out by the left-hand column: %@NL@%
- %@NL@%
- %@AB@%Header Data%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AI@%wMagic%@AE@% A word that identifies this as a help
- file.
-
- %@AI@%wSignature%@AE@% A word that identifies the "owner" or
- application that uses this help file.
-
- %@AI@%wFlags%@AE@% A word that contains the following
- flags:
-
- %@AB@%Bit%@AE@% %@AB@%Action%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- 0 Set if context look-up is to
- be case sensitive.
-
- 1 Set if the file is locked
- and cannot be
- decompressed.
-
- %@AI@%appChar%@AE@% Application-specific character,
- controlling access to certain line of
- help text. (See the /A parameter to
- HELPMAKE.) 0xff if not set.
-
- %@AI@%cTopics%@AE@% A count of entries in the topic index.
-
- %@AI@%cContexts%@AE@% A count of context strings.
-
- %@AI@%cbWidth%@AE@% The fixed width encoded by HELPMAKE, if
- one was specified. If zero, the data
- must be formatted to the display width
- by the application.
-
- %@AI@%cPreDef%@AE@% Count of predefined contexts.
-
- %@AI@%fname%@AE@% The original file name created by
- HELPMAKE. This is used to identify
- individual help files which have been
- concatenated into larger help files.
-
- %@AI@%posTbl%@AE@% A table of file positions for the
- various fields in the database:
-
- %@AB@%File%@AE@% %@AB@%%@AE@% %@AB@%Description%@AE@%
- %@AB@%Position%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- 0 File offset of the topic
- index.
-
- 1 File offset of the context
- strings.
-
- 2 File offset of the context
- map.
-
- 3 File offset of the keyphrase
- table;
- 0 if keyphrase compression
- was
- not performed.
-
- 4 File offset of the Huffman
- decode
- tree; 0 if Huffman encoding
- was
- not performed.
-
- 5 File offset of text of the
- first topic.
-
- 6 File offset of file title.
-
- 7-8 Reserved.
-
- 9 Size of help file in bytes.
-
- %@AB@%Topic Index%@AE@% - A table of file positions for each topic contained in the
- help file. Topic #%@AI@%n%@AE@%'s file position can be found in the %@AI@%n%@AE@%th
- entry in this table. In addition,
- the size in bytes of any compressed topic can be determined by the
- difference between two successive file positions.%@NL@%
- %@NL@%
- %@AB@%Context Strings%@AE@% - An array of strings which map to context numbers in the
- following
- context map. These strings are used for topic look-up when no predefined
- context number has been assigned.%@NL@%
- %@NL@%
- %@AB@%Context Map%@AE@% - A mapping of context numbers to topic numbers. This allows
- context numbers to be somewhat arbitrarily assigned, by an outside
- piece of software, such as a parser, and then mapped to sequential
- topic numbers.%@NL@%
- %@NL@%
- %@AB@%Keyphrase Table%@AE@% - Table of strings used in keyphrase decompression.%@NL@%
- %@NL@%
- %@AB@%Huffman Decode Tree%@AE@% - The tree used to decompress Huffman encoded data.%@NL@%
- %@NL@%
- %@AB@%Compressed Topic Text%@AE@% - The compressed text for the actual topic data,
- preceded by
- a 1-word count of bytes in the uncompressed topic.%@NL@%
- %@NL@%
- %@AB@%File Title%@AE@% - The title or name specified with the /N command at compression
- time.%@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00010013 @%%@AB@%1.5.2 Decompressed Topic Format%@AE@%%@EH@%%@NL@%
- %@NL@%
- Each line of the decompressed topic is formatted as follows: %@NL@%
- %@NL@%
- %@AS@% +--------+----------------------+
- %@AS@% | cbText | ASCII Text.......... |
- %@AS@% +-------------------------+-----+--+----------------+
- %@AS@% | cbInfo | Attr Info | 0ffffh | Cross-Ref Info |
- %@AS@% +-------------------------+--------+----------------+
- %@AS@% .
- %@AS@% .%@AE@%%@NL@%
- %@NL@%
- Topic information appears in the following order: %@NL@%
- %@NL@%
- %@AB@%Topic Data%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AI@%cbText%@AE@% Byte. Length in bytes, plus one, of the
- ASCII text which follows.
-
- %@AI@%ASCII Text%@AE@% Text of the line. All characters are
- displayable.
- CR-LF characters have no special meaning.
-
- %@AI@%cbInfo%@AE@% Word. Length in bytes plus two of the
- attribute and cross-reference
- information that follows.
-
- %@AI@%Attr Info%@AE@% Information describing the attributes
- associated with the preceding line.
- These are formatted as attribute
- index/byte-count-byte pairs with
- attribute 0ffh indicating the end.
-
- Attribute indexes are bytes whose bits
- represent the following attributes:
-
- %@AB@%Bit%@AE@% %@AB@%Attribute%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- 0 Bold
-
- 1 Italic
-
- 2 Underline
-
- Thus, attribute indexes can range in
- value from 0 -7, representing various
- combinations of the above.
-
- %@AI@%Cross-Ref Info%@AE@% Definition of the "hotspots" contained
- in the line and what they
- cross-reference to. Each hotspot is
- formatted as:
-
- %@AS@%+------+------+-----------+%@AE@%
- %@AS@%|cols|cole|cross-ref|%@AE@%
- %@AS@%+------+------+-----------+%@AE@%
-
- where format information breaks down as
- follows:
-
- %@AB@%Definition%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AI@%cols%@AE@% Byte. Starting column of
- hotspot.
-
- %@AI@%cole%@AE@% Byte. Ending column of the
- hotspot (inclusive).
-
- %@AI@%cross-ref%@AE@% ASCIIZ string. Context which
- the
- hotspot cross-references to.
- Either
- a null-terminated ASCII
- string or a
- "local context" (a 3-byte
- internal
- data structure, the first
- byte of
- which is zero).%@AI@%%@AE@%
-
- %@NL@%
- %@2@%%@CR:C6A00010014 @%%@AB@%1.6 The Encoding Process%@AE@%%@EH@%%@NL@%
- %@NL@%
- The HELPMAKE utility makes several passes on the data when encoding source
- files into help-file format. The amount of compression to be performed is
- optional and is specified when HELPMAKE is run. %@NL@%
- %@NL@%
- HELPMAKE passes are described below. %@NL@%
- %@NL@%
- %@NL@%
- 1. In the first pass, extraneous encoding information is stripped from
- the file and remaining formatting information is converted to an
- internal form. Local context references and definitions are collected.%@NL@%
- %@NL@%
- 2. During the second pass, local context references are resolved. If
- enabled, the text is also run-length encoded. All runs of 4 to 255
- identical characters are replaced with a flag, the character, and a
- repetition count. During this pass the context strings are collected.
- If keyphrase compression is enabled, the encoded text is analyzed for
- keyword/phrase frequency.%@NL@%
- %@NL@%
- 3. If keyphrase compression is enabled, the following pass replaces all
- space-saving occurrences of keyphrases with a flag byte and a byte
- index. If Huffman encoding is enabled, character frequency of the
- output is analyzed for Huffman tree construction.%@NL@%
- %@NL@%
- 4. If Huffman encoding is enabled, a following Huffman pass encodes the
- topic text.%@NL@%
- %@NL@%
- 5. The next-to-last pass builds file topic and compression tables in
- their final form in preparation for writing to the output file.%@NL@%
- %@NL@%
- 6. In the final pass, the actual help file is written. The help-file
- header, topic index, context string table, context map, keyphrase
- table, and Huffman tree are all written to the help file, followed by
- the compressed topic text.%@NL@%
- %@NL@%
- %@NL@%
- As noted above, once compressed, multiple help files can be manually
- concatenated to produce single help files. %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A00020001 @%%@1@%%@AB@%Chapter 2 Text Structure and Conventions%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@NL@%
- Common structures and conventions ensure that help files for one application
- will make sense when viewed using another. This information goes beyond the
- context-string and topic-text mapping functions of the help engine itself.
- This chapter outlines organizational conventions and approaches that should
- be followed by applications that provide maximally cross-compatible help
- files. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00020002 @%%@AB@%2.1 Authoring the Help Database%@AE@%%@EH@%%@NL@%
- %@NL@%
- The help engine is a data-retrieval tool that imposes no real restrictions
- on the content and format of the help text. The HELPMAKE utility and
- additional display routines and conventions, however, make certain
- assumptions about the format of help text. This section provides some help
- authoring guidelines. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00020003 @%%@AB@%2.1.1 QuickHelp Format%@AE@%%@EH@%%@NL@%
- %@NL@%
- When using QuickHelp format, a text editor would be used. QuickHelp format
- also lends itself to relatively easy automated translation from other
- document forms. %@NL@%
- %@NL@%
- Help text source is a sequential series of topics, each preceded by one or
- more unique context definitions. In QuickHelp format, each topic begins with
- one or %@NL@%
- %@NL@%
- more ".context" lines defining the context strings which map to the topic
- text. Subsequent lines up to the next ".context" constitute the topic text.
- For example: %@NL@%
- %@NL@%
- %@AS@% .context #define
- %@AS@% Syntax: #define <identifier> <substitution-text>
- %@AS@% #define <identifier> [(<parameter-list>)]
- %@AS@% <substitution-text>
- %@AS@%
- %@AS@% Replaces all subsequent cases of \bidentifier\p with the
- %@AS@%substitution-text.
- %@AS@% If \bparameter-list\p is given after \bidentifier\p, each occurrence
- %@AS@% of \bidentifier\p (\bparameter-list\p) is replaced with a version
- %@AS@% of \isubstitution-text\p modified by substituting actual arguments
- %@AS@% for formal parameters.%@AE@%%@NL@%
- %@NL@%
- See Chapter 1 for a detailed discussion of QuickHelp. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00020004 @%%@AB@%2.1.2 RTF Format%@AE@%%@EH@%%@NL@%
- %@NL@%
- When using RTF format, authoring can take place using a word processor or
- other tool capable of generating RTF output. Mac WORD, Microsoft Word 4.%@AI@%x%@AE@%,
- and Word-RTF (a tool that converts Word format files to RTF) are all
- alternatives. %@NL@%
- %@NL@%
- In RTF, each context definition should be in a paragraph of its own,
- beginning with ">>." Subsequent paragraphs up to the next context definition
- constitute the topic text. For example: %@NL@%
- %@NL@%
- %@AS@% {\rtf0
- %@AS@% >> #define \par
- %@AS@% Syntax:\tab #define <identifier> <substitution-text>
- %@AS@% \par
- %@AS@% \tab #define <identifier>[(<parameter-list>)] <substitution-text>
- %@AS@% \par
- %@AS@% \par
- %@AS@% Replaces all subsequent cases of {\b identifier} with the
- %@AS@%substitution-text.
- %@AS@% If {\b parameter-list} is given after {\b identifier}, each occurrence
- %@AS@% of
- %@AS@% {\b identifier} ({\b parameter-list} ) is replaced with a version
- %@AS@% of
- %@AS@% {\i substitution-text} modified by substituting actual arguments for
- %@AS@% formal parameters. \par
- %@AS@% }%@AE@%%@NL@%
- %@NL@%
- In these examples, the context string %@AS@% #define %@AE@% relates to the topic text
- which follows it. The topic text contains embedded bold and italic text. See
- Chapter 1 for a detailed discussion of RTF format. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00020005 @%%@AB@%2.2 Hotspots and Cross-References%@AE@%%@EH@%%@NL@%
- %@NL@%
- Cross-references are included as invisible text. A word or an anchored
- phrase, known as a hotspot, followed by invisible text, constitutes a
- cross-reference. For example: %@NL@%
- %@NL@%
- %@AS@% .context EXE2BIN
- %@AS@% EXE2BIN
- %@AS@%
- %@AS@% Convert .EXE file to Binary-Image File
- %@AS@%
- %@AS@% \bPurpose\b
- %@AS@%
- %@AS@% Converts an executable file in the .EXE\vexe_format\v format to a
- %@AS@% memory image file in binary format. The EXE2BIN utility is supplied
- %@AS@% with the MS-DOS distribution disks.%@AE@%%@NL@%
- %@NL@%
- In this example, the word ".EXE" in the first line of the paragraph is the
- hotspot. It cross-references to "exe_format." A mouse click or other form of
- selection with the cursor on any of the letters of ".EXE" brings up the help
- topic whose context was "exe_format." The invisible text "exe_format" is not
- actually displayed. %@NL@%
- %@NL@%
- When the desired hotspot crosses more than one word, an anchor is used: %@NL@%
- %@NL@%
- %@AS@% Converts an executable file in the \a.EXE format\vexe_format\v
- %@AS@% to a memory image file in binary format. The EXE2BIN utility is
- %@AS@% supplied with the MS-DOS distribution disks.%@AE@%%@NL@%
- %@NL@%
- In this case, the hotspot consists of the entire phrase ".EXE format."
- Anchored hotspots must be contained on a single line. %@NL@%
- %@NL@%
- The invisible cross-reference text is formatted as one of the following: %@NL@%
- %@NL@%
- %@AB@%Text Command%@AE@% %@AB@%Action%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AB@%context_%@AE@%%@AI@%string%@AE@% Results in the help topic associated
- with the arbitrary context string being
- displayed. For example, "exe_format"
- results in the help topic associated
- with that context being displayed.
-
- %@AB@%@context_%@AE@%%@AI@%string%@AE@% Causes the help topic associated with
- the local context string to be displayed.
- As defined in a previous section, local
- contexts must be defined in the same
- help file that they are referenced in.
-
- %@AI@%filename%@AE@%%@AB@%!%@AE@% Causes the entire file referenced to
- be treated as a single topic to be
- displayed. For example, the command
- "$INCLUDE:stdio.h!" would search the
- INCLUDE environment variable for STDIO.H,
- and display it as a single help topic.
-
- %@AI@%filename%@AE@%%@AB@%!context_%@AE@%%@AI@%string%@AE@% Same as "context_string" above, except
- that only the help file "filename" is
- searched. If not already open, it is
- searched for, either on the path or
- explicit environment variable, and
- opened. For example, the command
- "$INIT:mep.hlp!assign" would search for
- "mep.hlp" on the INIT environment
- variable, and bring up the topic
- associated with "assign."
-
- %@AB@%!%@AE@%%@AI@%cmd%@AE@% A cross-reference command. These
- commands are discussed in Section 2.4.
-
- %@NL@%
- %@2@%%@CR:C6A00020006 @%%@AB@%2.3 Topic Commands%@AE@%%@EH@%%@NL@%
- %@NL@%
- Topic commands embedded into the help text provide additional control
- information to the application displaying help. The commands are contained
- on a single line which is not considered part of the help text, and is not
- displayed to the user, but is embedded into the help text source. %@NL@%
- %@NL@%
- With the exception of ".context" and ".comment," topic commands take two
- forms: an "English" version used in the help source code (dot command), and
- a shortened version actually placed in the encoded help file and understood
- by the application displaying help (colon command). English versions of the
- commands are automatically converted by the HELPMAKE program to the single
- character versions (or back) on encode (or decode). %@NL@%
- %@NL@%
- Note that ":" is replaced by whatever application-specific character is
- specified to HELPMAKE using the /A parameter. Applications writers should
- support only the ":" commands listed below. Help-file authors should be
- concerned with only the English "." forms of the commands discussed in Table
- 2.1. %@NL@%
- %@NL@%
- %@AB@%Table 2.1 %@AB@%HELPMAKE Topic Commands%@AE@%%@AE@%
-
- %@TH: 211 13854 02 38 38 @%
- Command Action
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AB@%.context%@AE@% %@AI@%context string%@AE@% Required.
-
- %@AB@%.category%@AE@% %@AI@%string number%@AE@%%@AB@%%@AE@% Contains the category name the
- %@AB@%:c%@AE@%%@AI@%string number%@AE@% current function is in, and its
- position in the list of functions.
- The%@AB@% .category%@AE@% name is used by the
- QuickHelp Topic command, which
- brings up the list of topics that
- the current topic is part of. This
- is done by fetching the category
- name, which is a %@AB@%.list%@AE@%-type topic,
- and finding where the current topic
- is within the list of topics.
-
- If the help topic being displayed at
- the time of a request is for
- "h.contents" (the table of contents),
- applications may divert the search
- to the %@AB@%.category%@AE@% %@AI@%string%@AE@% of the
- currently displayed topic.
-
- The %@AB@%.category%@AE@% command, if present,
- must precede all displayable help
- text. If not supported by an
- application, this command should be
- ignored.
-
- %@AB@%.command%@AE@% Indicates that the topic text is not
- %@AB@%:x%@AE@% a displayable help topic, and should
- not be displayed to the user. Used
- to precede script topics, and other
- internal information.
-
- The %@AB@%.command%@AE@% command, if present,
- must precede all displayable help
- text. Should be supported by all
- applications. (If a next or previous
- operation encounters a topic
- containing this command, the topic
- should simply be skipped.)
-
- %@AB@%.comment%@AE@% %@AI@%text%@AE@% Used in the source file to specify a
- comment line which will not be
- placed into the database (i.e.,
- HELPMAKE removes this line). This is
- used by help authors to comment
- their source code so that it can be
- maintained by other authors without
- having the text go into the database.
- This can be particularly valuable
- when documenting cross-
- references that have commands (i.e.,
- you can insert a %@AB@%.comment%@AE@% and say
- what the cross-reference is supposed
- to do).
-
- Since the comments are not preserved
- in the compressed file, they cannot
- be restored via decompression.
-
- %@AB@%.execute %@AE@%%@AI@%cmd%@AE@%%@AB@%%@AE@% Executes the specified
- %@AB@%:y%@AE@%%@AI@%cmd%@AE@% cross-reference command. This
- command is executed at the time the
- line is encountered while the
- application is processing the topic
- for display. All cross-reference
- commands are valid, even though not
- all make sense. This command may
- appear anywhere in a topic.
-
- If not supported by an application,
- this command should be ignored.
-
- %@AB@%.file%@AE@% %@AI@%filename%@AE@%%@AB@%%@AE@% Normally used by an internal release
- %@AB@%:f%@AE@%%@AI@%filename%@AE@% of the database to point to the
- location of the source file. The
- private build of QuickHelp along
- with a macro command in MEP
- can make it possible to load the
- source file with two keystrokes.
-
- If not supported by an application,
- should be ignored.
-
- %@AB@%.freeze%@AE@% ##%@AB@%%@AE@% Indicates that the next ## lines
- %@AB@%:z%@AE@% ## which follow are to be "frozen" as
- the top line(s) on the help screen.
- This is typically used to freeze a
- row of cross-reference buttons at
- the top of a help topic which might
- be scrolled.
-
- The %@AB@%.freeze%@AE@% command, if present,
- must precede all displayable help
- text. If not supported, should be
- ignored.
-
- %@AB@%.mark %@AE@%%@AI@%text%@AE@% [##]%@AB@%%@AE@% Defines a "mark" immediately
- %@AB@%:m%@AE@%%@AI@%text%@AE@% [##] preceding the following line of text.
- An optional number, indicating
- column location, may also be
- included. Can be referenced by
- Advisor Script commands (see Section
- 2.4), usually to indicate that
- display of a particular topic begins
- at the marked line, rather than the
- first line.
-
- %@AB@%.mark%@AE@% names are unique (local) to
- each topic. If not supported by an
- application, should be ignored.
-
- %@AB@%.length%@AE@% #%@AB@%%@AE@% Specifies the initial length of the
- %@AB@%:l%@AE@%# topic when displayed. Applications
- that can resize the window in which
- help is displayed should attempt to
- resize so that # number of lines are
- displayed.
-
- The %@AB@%.length%@AE@% command, if present,
- must precede all displayable help
- text. If not supported by an
- application, should be ignored, and
- the application must support a
- reasonable default window or screen
- size.
-
- %@AB@%.list%@AE@% Indicates that the current topic
- %@AB@%:i%@AE@% contains a list of topics. This will
- cause a highlighted line to be
- displayed. You can select a topic by
- moving the highlighted line over the
- desired topic, and then pressing the
- ENTER key. The first word of the
- line will be used as the topic
- string to search for.
-
- If not supported by an application,
- the topic should
- be displayed as any other help topic
- (i.e., %@AB@%.list%@AE@% can be ignored).
-
- %@AB@%.next %@AE@%%@AI@%context%@AE@% %@AI@%string%@AE@%%@AB@%%@AE@% Indicates that the physically next
- %@AB@%:>%@AE@%%@AI@%context%@AE@% %@AI@%string%@AE@% topic should be looked up using the
- supplied context string, rather than
- getting the actual next topic. This
- is used to skip large blocks of %@AB@%%@AE@%
- %@AB@%.command%@AE@% or%@AB@% .popup%@AE@% topics quickly.
-
- The %@AB@%.next%@AE@% command, if present, must
- precede all displayable help text.
-
- %@AB@%.previous %@AE@%%@AI@%context string%@AE@%%@AB@%%@AE@% Tells the help system to look up the
- %@AB@%:<%@AE@%%@AI@%context%@AE@% %@AI@%string%@AE@% physically previous topic using the
- supplied context string rather than
- get the actual previous topic. This
- is used to skip large blocks of%@AB@% %@AE@%
- %@AB@%.command%@AE@% or %@AB@%.popup%@AE@% topics quickly.
-
- %@AB@%.paste%@AE@% %@AI@%paste-name%@AE@%%@AB@%%@AE@% Begins a paste section, with the
- %@AB@%:p%@AE@%%@AI@%paste-name%@AE@% name appearing in QuickHelp's Paste
- menu. If not supported by an
- application, should be ignored.
-
- The %@AB@%.paste%@AE@% command, if present, must
- precede all displayable help text.
-
- %@AB@%.end%@AE@% Ends a paste section. If not
- %@AB@%:e%@AE@% supported by an application, this
- command should be ignored.
-
- %@AB@%.popup%@AE@% Indicates to QuickHelp that the
- %@AB@%:g%@AE@% current topic is not to be loaded as
- a normal, scrollable topic. Instead
- the number of lines in the current
- topic is counted, and a box is
- created with the topic displayed
- within it. As soon as you press a
- key or click the mouse button, the
- popup box will go away. If you have
- already loaded QuickHelp, the
- previous topic is displayed.
-
- When QuickHelp is first run, it
- attempts to find a topic from the
- word underneath the cursor. If that
- topic is a popup topic, QuickHelp
- displays the popup box, then returns
- without displaying its main window.
-
- The %@AB@%.popup%@AE@% command, if present, must
- precede all displayable help text.
- If not supported by an application,
- the topic can be displayed normally.
-
- %@AB@%.ref%@AE@% [%@AI@%string%@AE@%], [%@AI@%string%@AE@%], ...%@AB@%%@AE@% Contains a list of comma-separated
- %@AB@%:r%@AE@%[%@AI@%string%@AE@%], [%@AI@%string%@AE@%], ... topics (i.e., functions and
- structures) that appear in the
- Reference menu, and will be
- preloaded by the PreLoad thread. If
- not supported by an application,
- this command should be ignored.
-
- %@AB@%.topic%@AE@% %@AI@%topic name%@AE@%%@AB@%%@AE@% If not supported by an application,
- %@AB@%:n%@AE@%%@AI@%topic name%@AE@% this command should be ignored, and
- no title or name displayed.
-
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
-
- %@TE: 211 13854 02 38 38 @%
-
- %@NL@%
- %@2@%%@CR:C6A00020007 @%%@AB@%2.4 Cross-Reference Commands%@AE@%%@EH@%%@NL@%
- %@NL@%
- Cross-reference commands extend hotspots beyond simply moving around in help
- information. These commands actually carry out actions in response to user
- selection. %@NL@%
- %@NL@%
- Typically, when a hotspot is selected by the user of the help system, the
- associated invisible text or "cross-reference" is simply "looked-up" as
- another help request, and its associated topic displayed. A cross-reference
- command (usually prefixed by an exclamation point) contains instead an
- instruction to be carried out by the host application. %@NL@%
- %@NL@%
- The executable command, or in some cases the command class, is defined by
- its first character. Uppercase alphabetic and special character commands are
- broadly classified as "Advisor Script Commands," and potentially applicable
- to all help systems. Lowercase characters are used to define commands or
- command classes of restricted applicability. %@NL@%
- %@NL@%
- These commands are discussed in Table 2.2. %@NL@%
- %@NL@%
- %@AB@%Table 2.2 %@AB@%HELPMAKE Cross-Reference Commands%@AE@%%@AE@%
-
- %@TH: 107 6454 02 34 42 @%
- Command Class
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- >%@AI@%string%@AE@% Indirection. The rest of the command is
- a context string which should be looked
- up, and whose topic contents should be
- executed, line by line, as a series of
- Advisor Script Commands. Such a topic is
- referred to as a script topic. The
- initial exclamation point is not present
- on the commands contained within a
- script topic.
-
- space The rest of the command string should be
- executed visibly by the operating system.
- For example, "! DIR" causes the
- operating system to print the contents
- of the current directory.
-
- ! The rest of the command string should be
- executed invisibly by the operating
- system. For example, "!!COPY FILEA FILEB"
- causes the operating system to copy
- FILEA to FILEB, with no visible output.
-
- B Back. The application is to redisplay
- the previously viewed help topic. May be
- ignored if the historical backtrace list
- is exhausted, or if historical backtrace
- is not supported by the application.
-
- C Context. The rest of the command string
- is a context string to be retrieved and
- immediately displayed. (Intended for use
- within script topics.) This is
- equivalent to a traditional
- cross-reference that does not begin with
- a "!."
-
- D Delay. The rest of the command string is
- an ASCII encoded number, which is the
- number of tenths of a second to delay.
- When executed, the application simply
- delays that much time before continuing.
- (Intended for use within script topics.)
-
- Hs%@AI@%x1%@AE@%,%@AI@%y1%@AE@%, %@AI@%x2%@AE@%,%@AI@%y2%@AE@% Highlight. The rest of the command
- specifies a region, and a highlighting
- state "s" is replaced by either "E" to
- enable highlighting on the region, or "D"
- to disable. The highlighted region is
- from the upper left corner specified by
- (%@AI@%x1%@AE@%,%@AI@%y1%@AE@%) to the lower right corner
- specified by (%@AI@%x2%@AE@%,%@AI@%y2%@AE@%). All coordinates
- are one-based. The actual visual effect
- of highlighting is left up to the
- application; however, reverse video is
- the commonly accepted result.
-
- K Wait for any keystroke before proceeding.
-
- K%@AI@%key%@AE@% Wait for specific keystroke before
- proceeding; "key" is replaced by the key
- name. Beep until correct key is entered.
-
- K%@AI@%key text%@AE@% Wait for specific keystroke before
- proceeding; "key" is replaced by the key
- name. Display "text" if wrong key is
- entered.
-
- M%@AI@%text%@AE@% Mark. Position current topic such that
- the line marked by "text" is the first
- line displayed. (See topic commands for
- a description of marked text.)
-
- P%@AI@%text text%@AE@% Position. Combination of %@AB@%.context%@AE@% and %@AB@%%@AE@%
- %@AB@%.mark%@AE@% commands. The second "text" string
- is a context looked up and immediately
- displayed. The first "text" string is a
- mark at which the display of the topic
- should begin.
-
- b Specific to Basic.
-
- c Specific to C.
-
- CQ.HB Used in Microsoft QuickC(R) version 2.0.
- Indicates that the previously viewed
- help topic should be redisplayed.
- (Executes the QuickC version 2.0 "Help
- Back" command.) This is equivalent to
- the Advisor Script Command "back" listed
- above, and should also be supported by
- applications requiring compatibility
- with C and QuickC help files.
-
- d Specific to the Microsoft CodeView(R)
- debugger.
-
- m The command is specific to the Microsoft
- Editor and/or Programmer's WorkBench
- (PWB). The command is an editor macro
- string, which is executed.
-
- q Specific to the QuickHelp utility.
-
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
-
- %@TE: 107 6454 02 34 42 @%
-
- %@NL@%
- %@2@%%@CR:C6A00020008 @%%@AB@%2.5 Context Conventions%@AE@%%@EH@%%@NL@%
- %@NL@%
- Certain contexts are defined by convention across multiple product lines.
- The intent is that multiple products can access the same types of help in
- the same manner, while also providing mechanisms for truly product-specific
- help to be readily identified as such. %@NL@%
- %@NL@%
- Constructed context strings are kept small, to avoid unnecessary growth of
- the context string table in each help file. In addition, many utilities
- using the help system will display the context strings associated with help
- topics. These conventions also define characteristics which allow such
- utilities to present more intelligent information. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00020009 @%%@AB@%2.5.1 Contexts Covered by Convention%@AE@%%@EH@%%@NL@%
- %@NL@%
- Context strings beginning with "x." (where "x" is an arbitrary character,
- and "." is a period) are defined to be "internal" or "constructed" help
- context strings. They are unlikely to be explicitly requested, and you may
- in fact be prevented from entering contexts of this form. %@NL@%
- %@NL@%
- The following "lead" characters are defined: %@NL@%
- %@NL@%
- %@AB@%Character%@AE@% %@AB@%Definition%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- h Generic help. Prefixes miscellaneous
- help contexts that may be constructed or
- otherwise hidden from the user. For
- example, a "contents" menu item would
- cause a reference to "h.contents."
-
- m Menu items. Contexts that relate to
- product menu items are further defined
- by their accelerator keys (for example,
- the Open selection on the File menu is
- referenced by "m.f.o").
-
- d Dialogs. Dialogs are assigned a number,
- and the help context string is
- constructed by "d." and the ASCII text
- number (for example, "d.12").
-
- e Error numbers. Products that support the
- uniform error numbering scheme used
- within languages would reference those
- by prefixing the error number with "e."
- (for example, "e.c1234").
-
- ! Indicates a cross-reference command, as
- defined in Table 2.2.
-
- %@NL@%
- %@3@%%@CR:C6A00020010 @%%@AB@%2.5.2 Required Contexts%@AE@%%@EH@%%@NL@%
- %@NL@%
- The following contexts should be provided in all help files: %@NL@%
- %@NL@%
- %@AB@%Context%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- h.default This is the "most-default" help screen,
- generally displayed in response to
- pressing F1 at the "top level" in most
- applications.
-
- h.notfound This is the help-text applications
- display when a search for a particular
- context fails. Can be an index, topical
- list, or general help. Applications may
- alternately present error messages when
- help cannot be found.
-
- h.pg1 Indicates the help text that is
- logically the first "page" in the file.
- Used by some applications in response to
- a "go to the beginning" request in help
- manipulation.
-
- h.pg$ Indicates the help text which is
- logically the last "page" in the file.
- This is used by some applications in
- response to a "go to the end" request in
- help manipulation.
-
- %@NL@%
- %@3@%%@CR:C6A00020011 @%%@AB@%2.5.3 Recommended Contexts%@AE@%%@EH@%%@NL@%
- %@NL@%
- The following contexts are not mandatory, but if used, should be of the
- following defined forms: %@NL@%
- %@NL@%
- %@AB@%Context%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- h.contents Help-file table of contents. In addition,
- the context string contents may also be
- used by itself to allow direct reference
- by the user.
-
- h.index Help-file index. In addition, the
- context string index may also be used by
- itself to allow direct reference by the
- user.
-
- h.pg# Specific page number. "#" is replaced
- with the page number of interest.
-
- Care should be taken to maintain "common" usage when writing help that is
- referenced from context strings such as these, since other applications may
- access them in this manner. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00020012 @%%@AB@%2.5.4 Product-Specific Contexts%@AE@%%@EH@%%@NL@%
- %@NL@%
- When multiple products use the same naming mechanisms for the same
- operations, confusion can arise when one product help file is made available
- for use by another product. For example, search order might be the only
- factor determining which product's help appears when a request for help is
- made from a File:Open menu and multiple product help files are available.
- All products would reference the context string "m.f.o" by convention, and
- it would be in both help files. %@NL@%
- %@NL@%
- As defined elsewhere, contexts can be prefixed by a file name. The original
- help-file file names are also embedded in each help file, and preserved
- regardless of what you rename the help file. This allows product-specific
- contexts to be dereferenced by prefixing the original help-file name to the
- context string. %@NL@%
- %@NL@%
- For example, in PWB, QB.HLP, QC.HLP, and PWB.HLP are available. All have a
- "m.f.o" context entry. When you request help on the File:Open menu, however,
- PWB prefixes that string with "pwb.hlp!", creating "pwb.hlp!m.f.o" which
- completely specifies that the help comes from the PWB help file. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00020013 @%%@AB@%2.6 Hierarchical Contexts%@AE@%%@EH@%%@NL@%
- %@NL@%
- Hierarchical context strings should be manufactured by concatenating context
- strings with period separators to form longer context strings. For example:
- %@NL@%
- %@NL@%
- %@AS@% cc.error.c1876%@AE@%%@NL@%
- %@NL@%
- could represent help relating to a C compiler error number c1876. The
- application could manufacture a help look-up request based on its current
- state, such as currently viewing errors on a C compiler, where c1876 is the
- currently viewed error. %@NL@%
- %@NL@%
- For space reasons, it may also be advisable to shorten contexts as much as
- possible, when the context string will never be seen by the user. This is
- the shortened example: %@NL@%
- %@NL@%
- %@AS@% c.e.1876%@AE@%%@NL@%
- %@NL@%
- It is important to note that the help engine does not infer anything from
- the fact that the context string may be viewed elsewhere as a concatenated
- hierarchy. Only a help topic whose entire context string matches exactly
- will correspond to such a request. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00020014 @%%@AB@%2.7 Environment Support%@AE@%%@EH@%%@NL@%
- %@NL@%
- File names used within the help engine may include explicit path
- specifications or explicit environment variable specifications, or it may
- default to being opened on the PATH environment variable. The support for
- each of these is provided by the client application. For example: %@NL@%
- %@NL@%
- %@AB@%Path%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AS@%c:\lib\qb.hlp%@AE@% Explicit path
-
- %@AS@%$INCLUDE:qb.hlp%@AE@% Explicit environment variable
-
- %@AS@%qb.hlp%@AE@% Implicit PATH search
-
- Applications may also elect to support the HELPFILES environment variable
- that specifies the help files to be used. When used, the syntax of this
- variable should be %@NL@%
- %@NL@%
- %@AS@% SET HELPFILES=QB.HLP;QC.HLP;CV.HLP%@AE@%%@NL@%
- %@NL@%
- This example instructs applications to use the three help files, QB.HLP,
- QC.HLP, and CV.HLP, in that order. This may be overridden within the
- application. %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A00030001 @%%@1@%%@AB@%Chapter 3 The HELPMAKE Program%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@NL@%
- HELPMAKE is a general support program that manipulates help files. It can
- dump a help file to RTF text format for editing, and compress an RTF,
- QuickHelp, or modified ASCII formatted text file into help-file format. %@NL@%
- %@NL@%
- HELPMAKE is a distributed utility; further documentation is available in the
- C 6.0 Compiler or Microsoft QuickC 2.0 Compiler products. Use HELPMAKE when
- you want to modify Microsoft-supplied help or to compress user-supplied help
- files. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00030002 @%%@AB@%3.1 HELPMAKE Options%@AE@%%@EH@%%@NL@%
- %@NL@%
- The syntax for HELPMAKE is as follows: %@NL@%
- %@NL@%
- %@AS@% HELPMAKE { /E[n] [/Ac] [/C] [/L] [/N name] [/Sn] [/Wwidth]
- %@AS@% | /D[U|S] | /H }
- %@AS@% [/T][ [/V[n» [/Odestfile] sourcefile(s)%@AE@%%@NL@%
- %@NL@%
- At least one source file and either the "/E" (for Encode) or "/D" (for
- Decode) must be present. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00030003 @%%@AB@%3.1.1 Encoding Options%@AE@%%@EH@%%@NL@%
- %@NL@%
- When encoding (/E) to create a help file, the /O parameter must be present.
- Multiple source files may be specified, including wild cards. %@NL@%
- %@NL@%
- The optional %@AI@%n%@AE@% parameter on /E indicates the amount of compression to take
- place. Successive powers of two indicate various compression techniques to
- use, as in the following list: %@NL@%
- %@NL@%
- %@TH: 7 372 02 22 54 @%
- Parameter Technique
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- 0 No compression
- 1 Run-length compression
- 2 Keyword compression
- 4 Extended keyword compression
- 8 Huffman compression
- %@TE: 7 372 02 22 54 @%
-
- For example, to use both run-length and keyword compression, specify /E3.
- The default is all compression-selected. %@NL@%
- %@NL@%
- Mixing the types of compression allows HELPMAKE to be maximally fast while
- developing help files, or at the user's option when used in the field. %@NL@%
- %@NL@%
- %@NL@%
- %@3@%%@CR:C6A00030004 @%%@AB@%3.1.2 Other HELPMAKE Options%@AE@%%@EH@%%@NL@%
- %@NL@%
- Other options that apply when encoding are listed below: %@NL@%
- %@NL@%
- %@TH: 92 3508 02 08 34 34 @%
- Option Action
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- /A Specifies the
- application-specific control
- character
- for the file. This is used with
- the %@AB@%HelpGetCells%@AE@%, %@AB@%HelpGetLine%@AE@%,
- and %@AB@%HelpGetLineAttr%@AE@% calls to
- ignore lines that begin with
- this character. This feature
- allows you to embed control
- information into the help topics.
- Such information can then be
- automatically stripped out by
- other applications without
- determining the format.
-
- /C Indicates that the context
- strings for this help file are
- case sensitive. All look-ups at
- run time are case sensitive if
- this switch has been set.
-
- /W When specified, indicates the
- fixed width of the resulting
- help text, in characters. The
- default value is 76. When
- HELPMAKE is run to encode RTF
- source, HELPMAKE automatically
- formats the text to this width.
- When used with QuickHelp or
- Minimal ASCII, lines are
- truncated to this width.
-
- /L Locks the generated file so that
- it cannot be decoded by HELPMAKE
- later.
-
- /S%@AI@%n%@AE@% Specifies the type of input
- file:
-
- Option File Type
-
- 1 RTF ASCII
-
- 2 QuickHelp ASCII (default)
-
- 3 Minimally formatted (>) ASCII
-
- /N Specifies a "name" or title for
- the help files, subsequently
- available to applications via
- the HelpGetInfo interface.
- Multiple word titles may be
- enclosed in quotes.
-
- /D Decodes a help file. The
- destination file need not be
- present, in which case the help
- file is decoded to standard
- output. Help files are decoded
- into QuickHelp ASCII format.
-
- Option Effect
-
- /DS "Decode split." Splits a
- concatenated help file back into
- its component files. No actual
- decoding is done, as the
- resulting help files, written to
- their original file names (as
- encoded in each help-file header)
- remain compressed.
-
- /DU "Decode unformatted." Creates a
- plain ASCII text file from a
- help file. All formatting
- information, such as color and
- cross-referencing, is lost
- except for %@AB@%.context%@AE@% statements.
-
- /T Translates between topic
- commands in "English"
- dot-command form, and the terser
- form. See the section in Chapter
- 2 on topic commands for more
- details. This switch is valid in
- both encoding and decoding.
-
- /H Causes HELPMAKE to display a
- summary of usage and exit.
-
- %@TE: 92 3508 02 08 34 34 @%
-
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A00040001 @%%@1@%%@AB@%Chapter 4 Applications Interface%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@NL@%
- The embedded help library provides the following functionality to client
- applications: %@NL@%
- %@NL@%
- %@NL@%
- ■ Help-file location and multiple file management (Open, Close)%@NL@%
- %@NL@%
- ■ Context look-up and help topic retrieval%@NL@%
- %@NL@%
- ■ Browsing functions (Next, Back)%@NL@%
- %@NL@%
- ■ Display utilities%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040002 @%%@AB@%4.1 Defining the Interface%@AE@%%@EH@%%@NL@%
- %@NL@%
- The help "engine" is a library of database tools that control retrieval of
- text based on reference words (context strings), indexes (context numbers),
- or position. The applications interface is to this help engine. This section
- defines the help engine's procedural interface. The engine handles the
- decompression of the help file and physical file I/O. %@NL@%
- %@NL@%
- %@AB@%Term%@AE@% %@AB@%Definition%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- Convention All routines are FAR PASCAL.
-
- Pointers All pointers are FAR.
-
- "nc" type An unsigned long "context number." All
- referenceable keywords or phrases
- (contexts) map to context numbers. A
- context number identifies both the
- source help file and the help context
- itself.
-
- "f" type A Boolean.
-
- "PB" type A "pointer to a buffer." In most
- versions of the help engine, this is a
- far pointer (%@AB@%void far *%@AE@%). In
- handle-based versions of the engine,
- this is a long, containing a memory
- handle in the upper word, and an offset
- in the lower word. The memory handle is
- passed to %@AB@%HelpLock%@AE@% for dereferencing,
- and the offset is then added to the
- result to form the actual physical
- memory address used by the help engine.
-
- %@NL@%
- %@2@%%@CR:C6A00040003 @%%@AB@%4.2 Base File Management%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpOpen%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpOpen (char far *lpszName)%@AE@%%@NL@%
- %@NL@%
- Given a help-file name, this function opens a help file and returns an
- initial context, or an error code on failure. Up to 25 help files can be
- open at a time. The application-provided routine %@AB@%OpenFileOnPath%@AE@% is used to
- open the file; typically that routine uses the PATH environment variable to
- locate the file. %@NL@%
- %@NL@%
- The value returned by %@AB@%HelpOpen%@AE@%, if less than HELPERR_MAX (defined in
- HELP.H), is an error code that displays the reason the file could not be
- opened. %@NL@%
- %@NL@%
- Concatenated help files count against the upper help-file limit once for
- each concatenated portion. The initial context returned is the context for
- the first physical topic in the help file. %@AB@%HelpOpen%@AE@% itself does not attempt
- to automatically append any extension to the file name. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpClose%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpClose (nc ncCur)%@AE@%%@NL@%
- %@NL@%
- Given a context, this function closes the help file associated with it and
- deallocates all associated memory. Calling with %@AS@% ncCur %@AE@% of zero closes all
- open help files. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040004 @%%@AB@%4.3 Context String Management%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNc%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpNc (char far *lpszContext, nc ncInitial)%@AE@%%@NL@%
- %@NL@%
- Given a pointer to a context string, this function looks up the word and
- returns its nonzero context number. This can be used as a Boolean, returning
- FALSE if a help entry does not exist for that context string. %@NL@%
- %@NL@%
- Here, %@AS@% ncInitial %@AE@% is the context from which the search for the help topic
- begins. This context references a particular help file and help topic, and
- the search commences there. %@NL@%
- %@NL@%
- Where concatenated help files are used and %@AS@% ncInitial %@AE@% references something
- other than the first of the concatenated files, those preceding it are not
- searched. Similarly, if %@AS@% ncInitial %@AE@% references a help context in the middle
- of the help file, those contexts preceding it will not be searched. %@NL@%
- %@NL@%
- The initial context returned by %@AB@%HelpOpen%@AE@% (which references the first topic
- in the file), should be saved and used for this call. %@NL@%
- %@NL@%
- Context strings are of the form %@NL@%
- %@NL@%
- %@AS@% [filename!][context]%@AE@%%@NL@%
- %@NL@%
- where %@AS@% filename %@AE@% is the help file containing the cross-reference and allows
- cross-references to cross help files. The help file is located at reference
- time by using %@AB@%HelpOpen%@AE@%, and thus is located on the PATH; %@AS@% context %@AE@% is the
- context string to be referenced. If no context is present, then %@AS@% filename! %@AE@%
- must be present, and the file is assumed to be unformatted ASCII and to
- contain the entire topic. %@NL@%
- %@NL@%
- Context strings may also be of an internal form returned by %@AB@%HelpXref%@AE@%. See
- %@AB@%HelpXref%@AE@% in Section 4.7 for more details. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcCmp%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpNcCmp (char far *fpszContext,nc ncInitial,
- %@AS@% f (pascal far *lpfnCmp) (uchar far *,
- %@AS@% uchar far *, ushort, f, f));%@AE@%%@NL@%
- %@NL@%
- Like %@AB@%HelpNc%@AE@%, when given an ASCII string, this function determines the
- context number of that string. %@AB@%HelpNcCmp%@AE@% uses a caller-supplied comparison
- routine; %@AS@%lpfnCmp %@AE@% is a far pointer to the comparison routine that takes the
- following parameters: %@NL@%
- %@NL@%
- %@AB@%Parameter%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AS@%fpsz1%@AE@% Far pointer to string 1. Normally the
- constant string being "looked up."
-
- %@AS@%fpsz2%@AE@% Far pointer to string 2. This is usually
- a string in the help file's string table
- (compressed) or an actual segment of the
- help file (formatted ASCII) being
- searched.
-
- %@AS@%cbCmp%@AE@% Maximum number of bytes to compare.
- Normally the strings above are
- zero-terminated, and this value is
- passed as 255. In ASCII files, this
- value may represent the number of bytes
- in the second string actually being
- compared. This value can be used as a
- max comparison count, regardless of file
- type.
-
- %@AS@%fCase%@AE@% TRUE if search is to be case insensitive.
- This is the setting of the case
- sensitivity flag in the help file being
- processed.
-
- %@AS@%fTerm%@AE@% TRUE if special termination processing
- is allowed. In this case, if any white
- space is encountered in the second
- string when NULL is found in the first,
- a match is declared.
-
- %@NL@%
- %@4@%%@AB@%HelpSzContext%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% f pascal far HelpSzContext (char far *pBuffer, nc ncCur)%@AE@%%@NL@%
- %@NL@%
- Given a context and a pointer to a buffer, this function places the first
- context string associated with that help topic in the buffer and returns
- TRUE on success. %@NL@%
- %@NL@%
- The format of the string is as described for %@AB@%HelpNc%@AE@%, except that the
- file-name part is always present (but does not include any leading path).
- The file-name part references the original file name created by HELPMAKE,
- not the current open file name if the help file was renamed, or if the file
- was concatenated with other help files. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040005 @%%@AB@%4.4 Topic Look-Up and Decompression%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcCb%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% unsigned pascal far HelpNcCb (nc nContext)%@AE@%%@NL@%
- %@NL@%
- Given a context number, this function returns the size in bytes of the
- compressed topic. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpLook%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% unsigned pascal far HelpLook (nc nContext, PB pbDest)%@AE@%%@NL@%
- %@NL@%
- Given a context number, this function places the topic text into the passed
- buffer, which must be of sufficient size. %@AB@%HelpLook%@AE@% returns count of bytes in
- an uncompressed topic or zero on error. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpDecomp%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% f pascal far HelpDecomp (PB pbTopic, PB pbDest, nc ncContext)%@AE@%%@NL@%
- %@NL@%
- Given a compressed topic as returned by %@AB@%HelpLook%@AE@% (above) and its context
- number, this function decompresses it into the destination buffer. The
- decompressed text in the destination buffer is prefixed by the following
- topic header structure: %@NL@%
- %@NL@%
- %@AS@% typedef struct {
- %@AS@% uchar appchar;
- %@AS@% uchar linchar;
- %@AS@% uchar filetype;
- %@AS@% ushort reserved[2];
- %@AS@% } topichdr;%@AE@%%@NL@%
- %@NL@%
- where %@AB@%uchar%@AE@% is defined as follows: %@NL@%
- %@NL@%
- %@AB@%Character%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AS@%appchar%@AE@% The character specified by the /A switch
- when the help file was created by
- HELPMAKE.
-
- %@AS@%linchar%@AE@% Line-removal character. Lines beginning
- with this character are ignored by the %@AB@%%@AE@%
- %@AB@%HelpGet%@AE@% routines described in Section
- 4.6.
-
- %@AS@%filetype%@AE@% The type of file that the topic came
- from. Values are:
-
- 0 Unformatted ASCII
-
- 1 Minimally formatted ASCII
-
- 3 Fully compressed
-
- %@AS@%reserved%@AE@% Reserved for use by the %@AB@%HelpGet%@AE@% routines
- (see Section 4.6).
-
- Access to this data structure is currently present for compatibility only
- (see %@AB@%HelpCtl%@AE@% for manipulation of the %@AS@% linchar %@AE@% byte). %@AB@%HelpDecomp%@AE@% returns
- TRUE on error. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040006 @%%@AB@%4.5 Context Maneuvering%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcNext%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpNcNext (nc ncCur)%@AE@%%@NL@%
- %@NL@%
- Given a context, this function returns the context number for the next help
- topic, or NULL on catastrophic failure. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcPrev%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpNcPrev (nc ncCur)%@AE@%%@NL@%
- %@NL@%
- Given a current context, this function returns the context number for the
- "physically previous" help topic in the help file, or NULL on catastrophic
- failure. %@NL@%
- %@NL@%
- This function is present for those applications that present a "previous"
- function in a physical, rather than historical, manner. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcRecord%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpNcRecord (nc ncCur)%@AE@%%@NL@%
- %@NL@%
- The %@AB@%HelpNcRecord%@AE@% function records a context number in the help engine
- backtrace list. Numbers are not automatically recorded by the help engine,
- but must be explicitly recorded by client applications. This routine and
- %@AB@%HelpNcBack%@AE@% (below) maintain a Last In First Out (LIFO) list of context
- numbers used to maintain the historical backtrace list. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcBack%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpNcBack ()%@AE@%%@NL@%
- %@NL@%
- Given a current context, this function returns the context number for the
- "historically previous" help topic. These are the context numbers previously
- saved by calls to %@AB@%HelpNcRecord%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpNcUniq%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% nc pascal far HelpNcUniq (nc ncCur);%@AE@%%@NL@%
- %@NL@%
- The %@AB@%HelpNcUniq%@AE@% function transforms a context number into a context number
- guaranteed unique for each topic in the file. That is, given that many
- context strings (and hence many context numbers) may map to the same topic,
- %@AB@%HelpNcUniq%@AE@% transforms all the context numbers that refer to a particular
- topic into the same context number. The information on the context string
- originally used is lost. This function returns NULL on any error. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040007 @%%@AB@%4.6 Topic Display%@AE@%%@EH@%%@NL@%
- %@NL@%
- Help text returned by the help engine contains encoding information. The
- following routines are provided to aid interpretation. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpGetCells%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% int pascal far HelpGetCells (ushort ln ,int cbMax , PB pbDst,
- %@AS@%
- %@AS@% uchar far *pbTopic, uchar far *prgAttr)%@AE@%%@NL@%
- %@NL@%
- %@AB@%HelpGetCells%@AE@% interprets the help file's stored format and returns character
- and attribute information a line at a time. %@NL@%
- %@NL@%
- %@AB@%Character%@AE@% %@AB@%Description%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AS@%ln%@AE@% The one-based line number to return.
-
- %@AS@%cbMax%@AE@% The maximum number of bytes to transfer.
-
- %@AS@%pbDst%@AE@% A pointer to the destination.
-
- %@AS@%pbTopic%@AE@% A pointer to the topic text.
-
- %@AS@%prgAttr%@AE@% A pointer to array of character
- attributes. Internal attribute indexes
- are mapped to physical attributes
- through this table.
-
- Returns number of characters transferred, or -1 if that line does not exist.
- %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpGetLine%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% ushort pascal far HelpGetLine (ushort ln, ushort cbMax,
- %@AS@% char far *pszDst, PB pbTopic);%@AE@%%@NL@%
- %@NL@%
- This function interprets the format of a topic previously read and
- decompressed and returns ASCII text a line at a time. %@NL@%
- %@NL@%
- The %@AB@%HelpGetLine%@AE@% function places characters into %@AB@%pszDst%@AE@% up to %@AB@%cbMax-1%@AE@% for the
- line specified by %@AI@%ln%@AE@% in the help topic pointed to by %@AB@%pbTopic%@AE@%. The line is
- zeroterminated and the function returns the number of characters placed in
- buffer. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpGetLineAttr%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% ushort pascal far HelpGetLineAttr (ushort ln, ushort cbMax,
- %@AS@% LINEATTR far *rgAttrs,
- %@AS@% PB pbTopic);%@AE@%%@NL@%
- %@NL@%
- This function fills %@AI@%rgAttrs%@AE@% buffer with line attributes for a line defined
- by %@AI@%ln%@AE@%. A line attribute is a word containing an attribute index followed by
- count of characters of the attribute. %@NL@%
- %@NL@%
- %@AS@% LineAttr STRUC
- %@AS@% LA_attr dw ? ;color attribute
- %@AS@% LA_cb dw ? ;count of chars
- %@AS@% ;with attribute
- %@AS@% LineAttr ENDS%@AE@%%@NL@%
- %@NL@%
- The array %@AI@%rgAttr%@AE@% may be terminated by an attribute of FFFF. Alternatively,
- if %@AI@%cb%@AE@% is FFFF, the attribute is used for the rest of the line. %@AI@%cbMax%@AE@% is the
- maximum size for the %@AI@%rgAttr%@AE@% buffer, and the function returns 0 if the buffer
- is too small for attributes; otherwise, it returns nonzero. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpcLines%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% int pascal far HelpcLines (PB pbTopic);%@AE@%%@NL@%
- %@NL@%
- This function returns the number of text lines in the topic pointed to by
- %@AB@%pbTopic%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040008 @%%@AB@%4.7 Cross-References%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpXRef%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% char far * pascal far HelpXRef (PB pbTopic, hotspot far *photspot)%@AE@%%@NL@%
- %@NL@%
- Given a row, column (in the hotspot structure defined below), and topic,
- this function returns a pointer to a cross-reference string. %@AI@%pbTopic%@AE@% is the
- pointer to the topic text, and %@AI@%photspot%@AE@% is a pointer to a hotspot structure
- to update. %@NL@%
- %@NL@%
- The %@AB@%HelpXRef%@AE@% function returns a far pointer into the topic text of a
- cross-reference string and updates the contents of the hotspot structure. It
- returns NULL if no cross-reference exists for that line. %@NL@%
- %@NL@%
- A "hotspot" structure defines the position of an embedded cross-reference,
- defined as follows: %@NL@%
- %@NL@%
- %@AS@% typedef struct {
- %@AS@% ushort line; /* the topic line with an xref */
- %@AS@% ushort col; /* the starting column of xref */
- %@AS@% ushort ecol; /* the ending column of xref */
- %@AS@% uchar far *pXref; /* pointer to xref string */
- %@AS@% } hotspot;%@AE@%%@NL@%
- %@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%
- IMPORTANT
-
- %@AI@%The cross-reference string can take either of two forms: a normal,
- %@AI@%nullterminated ASCII string, or a three-byte data structure whose first byte
- %@AI@%is NULL. It is important that the first byte be checked before copying the
- %@AI@%string, because normal string copy routines will not copy the three-byte
- %@AI@%data structure correctly. (The three-byte data structure is a
- %@AI@%cross-reference to a "local context.")%@AE@%%@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpHlNext%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% f pascal far HelpHlNext (int cLead, PB pbTopic,
- %@AS@% hotspot far *photspot);%@AE@%%@NL@%
- %@NL@%
- This function locates the next cross-reference in the help topic. Given a
- starting position in the passed hotspot structure, %@AB@%HelpHlNext%@AE@% locates either
- the next physical cross-reference, or the next reference beginning with a
- particular character (case insensitive); it locates either forward or
- backward. %@NL@%
- %@NL@%
- One of the following can be %@AS@% cLead%@AE@%: %@NL@%
- %@NL@%
- NULL The next hot-link searching forward from
- the specified position is returned.
-
- -1 The next hot-link searching backward
- from the specified position is returned.
-
- char If positive and non-NULL, the next
- hot-link following the specified
- position whose on-screen keyword begins
- with the character %@AS@% cLead %@AE@% is returned (%@AS@%%@AE@%
- %@AS@%cLead %@AE@% must be uppercase).
-
- -char If negative and not -1, the next
- hot-link before the specified position
- whose on-screen keyword begins with the
- character %@AS@% -cLead %@AE@% is returned (%@AS@%cLead%@AE@%
- must be uppercase).
-
- Here, %@AS@% pbTopic %@AE@% is a pointer to the topic text; %@AS@% photspot %@AE@% is a pointer to a
- hotspot structure to receive information; %@AS@%line %@AE@% and %@AS@% col %@AE@% indicate a
- starting point. %@NL@%
- %@NL@%
- The %@AB@%HelpHlNext%@AE@% function returns TRUE if a cross-reference is found or if a
- hotspot structure is updated; it returns NULL if no such cross-reference. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040009 @%%@AB@%4.8 Utility%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpCtl%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpCtl (PB pbTopic, flag);%@AE@%%@NL@%
- %@NL@%
- Here, %@AS@% pbTopic %@AE@% is a pointer to the topic text about to be retrieved. If the
- flag is TRUE, %@AB@%HelpGetLine%@AE@% (and family) subsequently returns all lines of
- text in the topic. If the flag is FALSE, %@AB@%HelpGetLine%@AE@% returns only those
- lines that do not begin with the application-specific control character, as
- specified by the /A parameter to HELPMAKE when the file was compressed.
- (%@AB@%HelpGetLine%@AE@% "and family" refers to all line-retrieval, cross-reference, and
- line-counting routines that operate on the decompressed topic text.) %@NL@%
- %@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%
- NOTE
-
- %@AI@%%@AB@%HelpCtl%@AE@%%@AI@% is provided to clarify the speed-optimization behavior in these
- %@AI@%routines. The current method in most applications is to replace a character
- %@AI@%in the topic header (setting it to FF) prior to calling the line-retrieval
- %@AI@%routines, which confuses the optimization. This new interface hides the
- %@AI@%internal data structures that would otherwise also be modified.%@AE@%%@AE@%%@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpGetInfo%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% int pascal far HelpGetInfo (struct helpinfo far *fpDest,
- %@AS@% int cbDest);%@AE@%%@NL@%
- %@NL@%
- This utility copies a %@AS@% helpinfo %@AE@% structure relating to the specified nc to
- the specified buffer. Here,%@AS@% cbDest %@AE@% is the maximum length of the data to be
- copied. If %@AB@%HelpGetInfo%@AE@% cannot copy the data because the buffer is too small,
- it returns the required buffer size. Otherwise, it returns 0, indicating
- success. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpInit%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpInit (void)%@AE@%%@NL@%
- %@NL@%
- This call initializes data internal to the help engine. It should be called
- once, at program startup. %@NL@%
- %@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%
- NOTE
-
- %@AI@%This function is used only in versions of the help library that do not have
- %@AI@%preinitialized data. For convenience, all libraries distributed outside of
- %@AI@%Microsoft have initialized data (this function is not included).%@AE@%%@NL@%
- ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpShrink%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpShrink (void)%@AE@%%@NL@%
- %@NL@%
- When called, this function causes the help engine to free all memory whose
- data can be regenerated. This frees up indexes and keyword tables loaded
- from help files. The next help access can cause one or more of these tables
- to be reloaded. If there are no open help files, the engine has no memory
- allocated, and this call does nothing. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040010 @%%@AB@%4.9 Help Engine Callbacks%@AE@%%@EH@%%@NL@%
- %@NL@%
- The help engine requires some support from the application environment for
- file and memory management. %@NL@%
- %@NL@%
- In the discussions below, "mh" is an unsigned short memory handle. "DOS
- only" indicates that the call is used only in those versions of the help
- engine that are run under MS-DOS, and not in OS/2-specific versions. %@NL@%
- %@NL@%
- Because of the limitations of some client applications, memory management
- within the help engine is such that the engine holds no locked memory when
- an allocation is performed. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpAlloc%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% mh pascal far HelpAlloc (ushort cbMem)%@AE@%%@NL@%
- %@NL@%
- This function allocates a block of memory. The memory may be movable, and
- outside of the default data segment. %@AB@%HelpAlloc%@AE@% returns NULL on failure, or
- if %@AS@%cbMem %@AE@% is 0. %@AI@%DOS only%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpDealloc%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpDealloc (mh)%@AE@%%@NL@%
- %@NL@%
- This function deallocates a block of memory. %@AI@%DOS only%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpLock%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% char far * pascal far HelpLock (mh)%@AE@%%@NL@%
- %@NL@%
- This function returns a far pointer to the base of the memory referenced by
- the handle. In the case of movable memory, the memory is also locked. If the
- memory handle passed is invalid or NULL, NULL should be returned. %@AI@%DOS only%@AE@%.
- %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpUnlock%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpUnlock (mh)%@AE@%%@NL@%
- %@NL@%
- This function unlocks the memory referenced by the handle. %@AI@%DOS only%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%OpenFileOnPath%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% fhandle pascal far OpenFileOnPath (char *fname, f fWrite);%@AE@%%@NL@%
- %@NL@%
- The file name is of the following form: %@NL@%
- %@NL@%
- %@AS@% [$ENVVAR: | path]filename.ext%@AE@%%@NL@%
- %@NL@%
- %@AB@%If%@AE@% %@AB@%Then%@AE@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@AS@%$ENVVAR: %@AE@% is present The file does not exist in the current
- directory; it should be located on the
- path-formatted environment variable
- specified.
-
- %@AS@%path %@AE@% is not present The file does not exist in the current
- directory; it should be located on the
- PATH environment variable.
-
- %@AS@%path %@AE@% is present The file is simply opened. %@AI@%DOS only%@AE@%.
-
- %@NL@%
- %@4@%%@AB@%ReadHelpFile%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% ulong pascal far ReadHelpFile (int fhandle, ulong fpos, char
- %@AS@% far *pData, ushort cbBytes);%@AE@%%@NL@%
- %@NL@%
- %@AB@%ReadHelpFile%@AE@% reads %@AB@% %@AS@%cbBytes%@AE@% %@AE@% of data, placing it beginning at %@AS@% pData %@AE@% from
- the file whose handle is %@AB@% %@AS@%fhandle%@AE@%%@AE@%, beginning at file offset %@AS@% fpos%@AE@%. It
- returns the number of bytes read. %@NL@%
- %@NL@%
- If %@AS@% cbBytes %@AE@% is zero, then the routine should return the size in bytes of
- the referenced file. %@AI@%DOS only%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%HelpCloseFile%@AE@%%@EH@%%@NL@%
- %@NL@%
- %@AS@% void pascal far HelpCloseFile (int fhandle)%@AE@%%@NL@%
- %@NL@%
- This function closes the file whose handle is passed. %@AI@%DOS only%@AE@%. %@NL@%
- %@NL@%
- %@NL@%
- %@4@%%@AB@%Callback Notes%@AE@%%@EH@%%@NL@%
- %@NL@%
- Each call by an application to %@AB@%HelpOpen%@AE@% results in a call by the engine to
- %@AB@%OpenFileOnPath%@AE@% if the file referenced is not already open. %@AB@%CloseFile%@AE@% will
- not be called until a %@AB@%HelpClose%@AE@% operation is performed on that file. %@NL@%
- %@NL@%
- To reduce the number of concurrently open file handles (for applications
- which support multiple simultaneous help files), the handle returned by
- %@AB@%HelpOpen%@AE@% (and used by %@AB@%ReadHelpFile%@AE@% and %@AB@%CloseFile%@AE@%) should be a "virtual"
- handle. Also, some form of currently open file "handle caching" should be
- performed. By keeping only the most recently accessed file physically open
- at the DOS level, and by closing or opening when a request against a new
- virtual handle is made, the help system can be guaranteed to only have one
- file handle open at a time. %@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00040011 @%%@AB@%4.10 Interface Usage%@AE@%%@EH@%%@NL@%
- %@NL@%
- For simple context-string-to-help-topic-text retrieval, the following steps
- outline the process. Assume that the help file has been opened via %@AB@%HelpOpen%@AE@%:
- %@NL@%
- %@NL@%
- %@NL@%
- 1. Call %@AB@%HelpNc %@AE@%to get a context number for the string on which help is
- desired.%@NL@%
- %@NL@%
- 2. Call %@AB@%HelpNcCb%@AE@% to determine the amount of memory required by the
- compressed topic. If appropriate, allocate this memory.%@NL@%
- %@NL@%
- 3. Call %@AB@%HelpLook%@AE@% to retrieve the compressed topic from the help file.
- This call also returns the size of the uncompressed topic. If
- appropriate, allocate this memory.%@NL@%
- %@NL@%
- 4. Call %@AB@%HelpDecomp%@AE@% to decompress the topic text. Once completed, the
- memory for the compressed topic text may be deleted.%@NL@%
- %@NL@%
- 5. Call %@AB@%HelpGetCells%@AE@% or %@AB@%HelpGetLine%@AE@% and %@AB@%HelpGetLineAttr%@AE@% to extract the
- topic text and formatting information one line at a time.%@NL@%
- %@NL@%
- %@NL@%
- Given any valid context number returned by the help engine, you can also: %@NL@%
- %@NL@%
- %@NL@%
- 1. Call %@AB@%HelpNcNext %@AE@%to get the context number for the next sequential
- topic in the file.%@NL@%
- %@NL@%
- 2. Call %@AB@%HelpNcPrev%@AE@% to get the context number for the previous sequential
- topic in the file.%@NL@%
- %@NL@%
- 3. Use %@AB@%HelpNcRecord%@AE@% and %@AB@%HelpNcBack%@AE@% to manage a history list of context
- numbers.%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A00050001 @%%@1@%%@AB@%Chapter 5 Size and Performance%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- %@NL@%
- %@NL@%
- %@2@%%@CR:C6A00050002 @%%@AB@%5.1 Help Engine%@AE@%%@EH@%%@NL@%
- %@NL@%
- The help engine itself varies in size based on functions used (and hence
- linked in) and on memory model or environment selected. In general, it
- ranges in size from 4K to 6K of code. In addition, the application requires
- around 4K of code to interface the help engine to its own environment. %@NL@%
- %@NL@%
- The help engine maintains 104 bytes of static data. All other data is
- allocated dynamically, based on the number of help files being opened. For
- each help file open, 115 bytes of dynamic memory is allocated. This memory
- is not freed until the file is actually closed with the %@AB@%HelpClose%@AE@% function.
- Note also that concatenated files count separately. That is, each
- concatenated portion counts as a single separate file. %@NL@%
- %@NL@%
- When accessing a help file, several tables are read in from the actual help
- file. These tables are discardable under most circumstances by calling
- %@AB@%HelpShrink%@AE@%. The tables vary in size based on the size of the help file
- itself. The information in Table 5.1 presents the relevant numbers for the
- file QC.HLP, a file shipped with QuickC 2.0, and some indication of what
- each is dependent on. %@NL@%
- %@NL@%
- At decompression time, the Keyphrase and Huffman tables must be resident in
- memory simultaneously. This is checked by the engine. In all other cases,
- %@AB@%HelpShrink%@AE@% may be called during %@AB@%HelpAlloc%@AE@% to discard unneeded or rebuildable
- memory. %@NL@%
- %@NL@%
- At decompression time, memory is also required for both the compressed and
- decompressed topic texts. %@NL@%
- %@NL@%
- %@AB@%Table 5.1 %@AB@%QC.HLP File Information%@AE@%%@AE@%
-
- %@TH: 32 1767 02 17 17 42 @%
- Type Size (in Bytes) Description
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
- File size 355,940 Dependent on all of the tables below,
- plus the volume of help actually
- provided. File size has no bearing on
- the memory requirements of applications.
-
- Topic index 3,084 Four times the number of help topics in
- the file. QC.HLP has 771 topics.
-
- Context strings 4,700 Total length of all context strings
- supported by the help file.
-
- Context map 1,168 Two times the number of context strings
- supported. QC.HLP has 584 context
- strings.
-
- Keyphrase table 8,087 Number plus 2,048 actually allocated at
- decompression time. This table is
- proportional to the size of the
- compressible key phrases identified in
- the file at compression time. This is
- limited to 1,024 words, but the
- individual words may be of arbitrary
- length.
-
- Huffman table 1,024 Occasionally smaller than this, but in
- most cases quickly growing to this size.
- It is never larger.
-
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
-
- %@TE: 32 1767 02 17 17 42 @%
-
- %@NL@%
- %@2@%%@CR:C6A00050003 @%%@AB@%5.2 HELPMAKE.EXE%@AE@%%@EH@%%@NL@%
- %@NL@%
- HELPMAKE.EXE is a bound program around 60K in size. It requires 256K
- available memory to run. When compressing, it requires free disk space up to
- 2.5 times the size of the input file(s). %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@CR:C6A-A0004 @%%@1@%%@AB@%Glossary%@AE@%%@EH@%%@NL@%
- %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Advisor%@AE@%%@EH@%%@NL@%
- %@3@%The Microsoft Advisor is the name given to the help system as actually%@EH@%
- implemented in many Microsoft language products.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Application-Specific Character%@AE@%%@EH@%%@NL@%
- %@3@%A character agreed upon by the applications developer and help-file author%@EH@%
- that signifies that the rest of the line following it is a topic command
- line, and not a line of actual help text to be displayed. Specified to
- HELPMAKE using the /A parameter.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Context%@AE@%%@EH@%%@NL@%
- %@3@%A keyword or phrase which is recognized by the help system and relates to a%@EH@%
- topic.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Context Map%@AE@%%@EH@%%@NL@%
- %@3@%A table which maps a %@AI@%context number%@AE@% to a %@AI@%topic index%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Context Number%@AE@%%@EH@%%@NL@%
- %@3@%A number in the range 1-32,767 that uniquely identifies a %@AI@%context%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Cross Reference%@AE@%%@EH@%%@NL@%
- %@3@%A string associated with a "hotspot" or location in displayed help text.%@EH@%
- When activated, the cross-reference string may reference another help
- context or help file, or it may cause the application to take some other
- kind of action.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Cross-Reference Command%@AE@%%@EH@%%@NL@%
- %@3@%A context string which, when looked up by the application, usually in%@EH@%
- response to a hotspot selection, does not cause additional help to be
- retrieved. Instead it executes a DOS command or causes some other
- application-specific action to occur.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Dot Command%@AE@%%@EH@%%@NL@%
- %@3@%English form of topic command used within QuickHelp-formatted databases.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Executable Context%@AE@%%@EH@%%@NL@%
- %@3@%See %@AI@%Cross-Reference Command%@AE@%. %@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Executable Cross-Reference Command%@AE@%%@EH@%%@NL@%
- %@3@%See %@AI@%Cross-Reference Command%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Help Database%@AE@%%@EH@%%@NL@%
- %@3@%The single compressed file output by HELPMAKE. Also, that single help file,%@EH@%
- when concatenated with others.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Help File%@AE@%%@EH@%%@NL@%
- %@3@%A collection of one or more help databases that constitutes a single%@EH@%
- physical file. Also, a single minimally formatted ASCII file.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Help Item%@AE@%%@EH@%%@NL@%
- %@3@%See %@AI@%Topic%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Help Screen%@AE@%%@EH@%%@NL@%
- %@3@%An application-provided window on a single topic. A help screen should be%@EH@%
- scrollable to allow viewing of the entire topic, should it exceed the size
- of a single screen.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Hotspot%@AE@%%@EH@%%@NL@%
- %@3@%The location in topic text to which a cross-reference has been attached.%@EH@%
- Hotspots are normally highlighted in some fashion when displayed, and define
- areas within the displayed topic that activate the cross-reference when
- selected.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Keyphrase%@AE@%%@EH@%%@NL@%
- %@3@%A word or phrase extracted from the help text and replaced by a token during%@EH@%
- compression.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Label%@AE@%%@EH@%%@NL@%
- %@3@%See %@AI@%Context String%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Local Context%@AE@%%@EH@%%@NL@%
- %@3@%A context that has no associated context string in the help file, and is%@EH@%
- referenced only by a hotspot elsewhere in the same help file.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Node%@AE@%%@EH@%%@NL@%
- %@3@%See %@AI@%Topic%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Node Name%@AE@%%@EH@%%@NL@%
- %@3@%See %@AI@%Context String%@AE@%.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%RTF%@AE@%%@EH@%%@NL@%
- %@3@%Rich Text Format. An ASCII text format for storing documents and their%@EH@%
- formatting information.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Script Topic%@AE@%%@EH@%%@NL@%
- %@3@%A topic whose contents are executable cross-reference commands.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Topic%@AE@%%@EH@%%@NL@%
- %@3@%The text displayed as a help entry. May be up to 64K of encoded text.%@NL@%%@NL@%%@EH@%
- %@NL@%
- %@2@%%@AB@%Topic Command%@AE@%%@EH@%%@NL@%
- %@3@%A control line embedded into help text which contains control information or%@EH@%
- instructions for the application displaying help, as opposed to help text to
- be displayed.%@NL@%%@NL@%
- %@NL@%
- %@2@%%@AB@%Topic Index%@AE@%%@EH@%%@NL@%
- %@3@%A number corresponding to a sequential topic entry in the help file. Also,%@EH@%
- the table that maps these numbers to actual file positions.%@NL@%%@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
- %@NL@%
-