home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / books / cadvisor.db < prev    next >
Encoding:
Text File  |  1991-03-01  |  116.5 KB  |  2,057 lines

  1. %@1@%%@AB@%Microsoft  Professional Advisor - LIBRARY REFERENCE%@AE@%%@EH@%%@NL@%
  2.                                       %@NL@%
  3.                                       %@NL@%
  4.                                       %@NL@%
  5.                                       %@NL@%
  6.                                       %@NL@%
  7.                                       %@NL@%
  8.                                       %@NL@%
  9.  
  10. ────────────────────────────────────────────────────────────────────────────%@NL@%
  11.            %@AB@%Microsoft (R) Professional Advisor - LIBRARY REFERENCE%@AE@%%@NL@%
  12.                                       %@NL@%
  13.                                       %@AB@%%@AE@%%@NL@%
  14. ────────────────────────────────────────────────────────────────────────────%@NL@%
  15.                                       %@NL@%
  16.                                       %@NL@%
  17.                        FOR MS (R) OS/2 and MS-DOS (R)
  18.                              OPERATING SYSTEMS%@NL@%
  19.                                       %@NL@%
  20. %@NL@%
  21. %@NL@%
  22. %@NL@%
  23. %@NL@%%@NL@%
  24. %@NL@%
  25.  
  26.  
  27. MICROSOFT CORPORATION %@NL@%
  28. %@NL@%
  29. Information in this document is subject to change without notice and does
  30. not represent a commitment on the part of Microsoft Corporation. The
  31. software described in this document is furnished under a license agreement
  32. or nondisclosure agreement. The software may be used or copied only in
  33. accordance with the terms of the agreement. It is against the law to copy
  34. the software on any medium except as specifically allowed in the license or
  35. nondisclosure agreement. No part of this manual may be reproduced or
  36. transmitted in any form or by any means, electronic or mechanical, including
  37. photocopying and recording, for any purpose without the express written
  38. permission of Microsoft.  
  39. RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is
  40. subject to restrictions as set forth in subparagraph (c)(1)(ii) of the
  41. Rights in Technical Data and Computer Software clause at DFARS 252.227-7013
  42. or subparagraphs (c)(1) and (2) of Commercial Computer Software
  43. ─Restricted Rights at 48 CFR 52.227-19, as applicable.
  44. Contractor/Manufacturer is Microsoft Corporation, One Microsoft Way,
  45. Redmond, WA  98052-6399.%@NL@%
  46. %@NL@%
  47.  
  48. (C) Copyright Microsoft Corporation, 1990. All rights reserved.%@NL@%
  49. %@NL@%
  50.  
  51. Printed in the United States of America.%@NL@%
  52. %@NL@%
  53.  
  54. Microsoft, MS, MS-DOS, CodeView, and QuickC 
  55. are registered trademarks of Microsoft Corporation.%@NL@%
  56. %@NL@%
  57. Apple and Macintosh are registered trademarks of Apple 
  58. Computer, Inc.%@NL@%
  59. %@NL@%
  60. IBM is a registered trademark of International Business 
  61. Machines Corporation.%@NL@%
  62. %@NL@%
  63. %@NL@%
  64. %@NL@%
  65. Document No. LN18160-0990
  66.                          OEM D/0711-1Z
  67.  
  68. 10 9 8 7 6 5 4 3 2 1 %@NL@%
  69. %@NL@%
  70. %@NL@%
  71. %@NL@%
  72. %@NL@%
  73. %@NL@%
  74. %@NL@%
  75. %@NL@%
  76. %@AB@%Introduction%@AE@%%@BO:        16d8@%%@NL@%
  77. %@NL@%
  78. %@AB@%Chapter 1%@AE@%%@BO:        2458@%  %@AB@%The Help Database%@AE@%%@NL@%
  79. %@NL@%
  80.      1.1%@BO:        27d0@%   QuickHelp ASCII%@NL@%
  81.             1.1.1%@BO:        2a63@%    Formatting Flags%@NL@%
  82.             1.1.2%@BO:        2f7f@%    Cross-References%@NL@%
  83.             1.1.3%@BO:        3203@%    QuickHelp Example%@NL@%
  84.      1.2%@BO:        34fc@%   Minimally Formatted ASCII%@NL@%
  85.      1.3%@BO:        3b07@%   Unformatted ASCII%@NL@%
  86.      1.4%@BO:        3cb7@%   RTF ASCII%@NL@%
  87.             1.4.1%@BO:        46ae@%    RTF Example%@NL@%
  88.             1.4.2%@BO:        4c6d@%    Local Contexts%@NL@%
  89.      1.5%@BO:        54d3@%   Physical Database Organization%@NL@%
  90.             1.5.1%@BO:        58d8@%    Concatenated Order%@NL@%
  91.             1.5.2%@BO:        70d5@%    Decompressed Topic Format%@NL@%
  92.      1.6%@BO:        80f3@%   The Encoding Process%@NL@%
  93. %@NL@%
  94. %@AB@%Chapter 2%@AE@%%@BO:        88b7@%  %@AB@%Text Structure and Conventions%@AE@%%@NL@%
  95. %@NL@%
  96.      2.1%@BO:        8b0d@%   Authoring the Help Database%@NL@%
  97.             2.1.1%@BO:        8caf@%    QuickHelp Format%@NL@%
  98.             2.1.2%@BO:        9176@%    RTF Format%@NL@%
  99.      2.2%@BO:        96ee@%   Hotspots and Cross-References%@NL@%
  100.      2.3%@BO:        a5ca@%   Topic Commands%@NL@%
  101.      2.4%@BO:        e0b6@%   Cross-Reference Commands%@NL@%
  102.      2.5%@BO:        fe6a@%   Context Conventions%@NL@%
  103.             2.5.1%@BO:       1013f@%    Contexts Covered by Convention%@NL@%
  104.             2.5.2%@BO:       10973@%    Required Contexts%@NL@%
  105.             2.5.3%@BO:       1101d@%    Recommended Contexts%@NL@%
  106.             2.5.4%@BO:       114f1@%    Product-Specific Contexts%@NL@%
  107.      2.6%@BO:       119b1@%   Hierarchical Contexts%@NL@%
  108.      2.7%@BO:       11dcd@%   Environment Support%@NL@%
  109. %@NL@%
  110. %@AB@%Chapter 3%@AE@%%@BO:       12275@%  %@AB@%The HELPMAKE Program%@AE@%%@NL@%
  111. %@NL@%
  112.      3.1%@BO:       12515@%   HELPMAKE Options%@NL@%
  113.             3.1.1%@BO:       126ba@%    Encoding Options%@NL@%
  114.             3.1.2%@BO:       12b2d@%    Other HELPMAKE Options%@NL@%
  115. %@NL@%
  116. %@AB@%Chapter 4%@AE@%%@BO:       139c1@%  %@AB@%Applications Interface%@AE@%%@NL@%
  117. %@NL@%
  118.      4.1%@BO:       13bd9@%   Defining the Interface%@NL@%
  119.      4.2%@BO:       143ab@%   Base File Management%@NL@%
  120.      4.3%@BO:       148ec@%   Context String Management%@NL@%
  121.      4.4%@BO:       15ca3@%   Topic Look-Up and Decompression%@NL@%
  122.      4.5%@BO:       16722@%   Context Maneuvering%@NL@%
  123.      4.6%@BO:       16fad@%   Topic Display%@NL@%
  124.      4.7%@BO:       17d14@%   Cross-References%@NL@%
  125.      4.8%@BO:       18bfb@%   Utility%@NL@%
  126.      4.9%@BO:       197f1@%   Help Engine Callbacks%@NL@%
  127.      4.10%@BO:       1a993@%  Interface Usage%@NL@%
  128. %@NL@%
  129. %@AB@%Chapter 5%@AE@%%@BO:       1afd6@%  %@AB@%Size and Performance%@AE@%%@NL@%
  130. %@NL@%
  131.      5.1%@BO:       1b093@%   Help Engine%@NL@%
  132.      5.2%@BO:       1be38@%   HELPMAKE.EXE%@NL@%
  133. %@NL@%
  134. %@AB@%Glossary%@AE@%%@BO:       1bf75@%%@NL@%
  135. %@NL@%
  136. %@NL@%
  137. %@NL@%
  138. %@CR:C6A-Intro   @%%@1@%%@AB@%Introduction%@AE@%%@EH@%%@NL@%
  139. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  140. %@NL@%
  141. The Microsoft(R) Professional Advisor %@AI@%Library Reference%@AE@% contains information
  142. about the help library supplied with Microsoft C products. There are several
  143. advantages to using the Advisor Help Library.  %@NL@%
  144. %@NL@%
  145. %@AB@%Speed and Maneuverability%@AE@% - The help desired by the user must be available
  146. quickly, with a minimum of user decisions and selections. To achieve this
  147. goal, the Advisor Help Library supports cross-referencing, context
  148. sensitivity, preserves previous help activity, and flexible help-text
  149. organization.%@NL@%
  150. %@NL@%
  151. %@AB@%Modification%@AE@% - Users and/or application developers need to be able to add
  152. help text to the help system and modify existing help text to suit their
  153. applications and environments. To meet this need, a maintenance utility
  154. performs both compression and decompression of help files. Also, the Advisor
  155. Help Library provides the ability to read uncompressed ASCII text as a help
  156. file.%@NL@%
  157. %@NL@%
  158. %@AB@%Integration%@AE@% - The help text presented must be available to outside
  159. applications. The Advisor Help Library provides support routines necessary
  160. to allow the application to access this valuable help text.%@NL@%
  161. %@NL@%
  162. %@AB@%Size%@AE@% - It is important to create help files that take up minimal disk space
  163. but do not at the same time severely impact look-up speed. The Advisor Help
  164. Library provides three compression algorithms to reduce disk space and meet
  165. speed requirements.%@NL@%
  166. %@NL@%
  167. The Advisor Help Library includes the following files:  %@NL@%
  168. %@NL@%
  169. %@AB@%File Name%@AE@%                         %@AB@%Description%@AE@%
  170. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  171. HELPMAKE.EXE                      Bound Help-File-Maintenance Utility.
  172.  
  173. MSHELP.DLL                        OS/2 help engine in DLL form.
  174.  
  175. MSHELP.LIB                        OS/2 help engine export library.
  176.  
  177. MHELP.LIB                         Medium-model help engine.
  178.  
  179. MHELPH.LIB                        Medium-model help engine using 
  180.                                   handle:offset.
  181.  
  182. LHELP.LIB                         Large-model help engine.
  183.  
  184. WHELPP.LIB                        SS!=DS help engine, protected mode.
  185.  
  186. WHELPR.LIB                        SS!=DS help engine, real mode.
  187.  
  188. HELP.H                            Help engine include file. All 
  189.                                   applications should
  190.                                   use this.
  191.  
  192. MSHELP.DEF                        .DEF file for applications that can use 
  193.                                   it.
  194.  
  195. SHELP.LIB                         Small-model help engine.
  196.  
  197. ────────────────────────────────────────────────────────────────────────────%@NL@%
  198. NOTE
  199.  
  200. %@AI@%The pages that follow use the term "OS/2" to refer to the OS/2
  201. %@AI@%systems─Microsoft Operating System/2 (MS%@AI@%(R)%@AE@%%@AI@% OS/2) and IBM%@AE@%%@AI@%(R)%@AE@%%@AI@% OS/2.
  202. %@AI@%Similarly, the term "DOS" refers to both the MS-DOS%@AE@%%@AI@%(R)%@AE@%%@AI@% and IBM Personal
  203. %@AI@%Computer DOS operating systems. The name of a specific operating system is
  204. %@AI@%used when it is necessary to note features that are unique to the system.%@AE@%%@AE@%%@NL@%
  205.  
  206. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  207. %@NL@%
  208. %@NL@%
  209. %@NL@%
  210. %@NL@%
  211. %@NL@%
  212. %@NL@%
  213. %@CR:C6A00010001 @%%@1@%%@AB@%Chapter 1  The Help Database%@AE@%%@EH@%%@NL@%
  214. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  215. %@NL@%
  216. There are four types of format text for the topical contents of the help
  217. database:  %@NL@%
  218. %@NL@%
  219. %@AB@%ASCII Format%@AE@%                      %@AB@%Description%@AE@%
  220. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  221. QuickHelp                         Default source format for compressed 
  222.                                   databases
  223.  
  224. Minimally formatted               Can be either compressed or read 
  225.                                   directly from the help engine
  226.  
  227. RTF                               An alternate source for the compressed 
  228.                                   database
  229.  
  230. Unformatted                       For use directly by the help engine
  231.  
  232. %@NL@%
  233. %@2@%%@CR:C6A00010002 @%%@AB@%1.1  QuickHelp ASCII%@AE@%%@EH@%%@NL@%
  234. %@NL@%
  235. QuickHelp uses "dot" commands and embedded formatting characters to convey
  236. information to HELPMAKE. For example:  %@NL@%
  237. %@NL@%
  238. %@AS@%  .context%@AE@%%@NL@%
  239. %@NL@%
  240. Each topic is preceded by one or more %@AB@%.context%@AE@% commands that indicate the
  241. context string for the following topic text up to the next %@AB@%.context%@AE@% line.
  242. More than one %@AB@%.context%@AE@% command may be specified for a single topic, if no
  243. topic text is placed between them. For more information on topic commands,
  244. see Section 2.3 in Chapter 2, "Text Structure and Conventions."  %@NL@%
  245. %@NL@%
  246. %@NL@%
  247. %@3@%%@CR:C6A00010003 @%%@AB@%1.1.1  Formatting Flags%@AE@%%@EH@%%@NL@%
  248. %@NL@%
  249. The following flags may be embedded in the text to change the attributes of
  250. the topic text:  %@NL@%
  251. %@NL@%
  252. %@AB@%Formatting Flag%@AE@%                   %@AB@%Action%@AE@%
  253. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  254. \b or \B                          Bold
  255.  
  256. \i or \I                          Italic
  257.  
  258. \p or \P                          Plain
  259.  
  260. \u or \U                          Underline
  261.  
  262. \v or \V                          Invisible
  263.  
  264. The flags \b, \i, \u and \v are toggles, turning on and off their respective
  265. attribute. They may be combined. The \p flag turns off all attributes.  %@NL@%
  266. %@NL@%
  267. The backslash character also escapes the character which follows it, that
  268. is,  %@NL@%
  269. %@NL@%
  270. \b  %@NL@%
  271. %@NL@%
  272. indicates the toggling of the bold attribute, while  %@NL@%
  273. %@NL@%
  274. \\b  %@NL@%
  275. %@NL@%
  276. places a " \b" into the actual text.  %@NL@%
  277. %@NL@%
  278. Lines are truncated to the specified width in characters (which defaults to
  279. 76); flags affecting the attribute do not count towards the 76-character
  280. limit. When "/T" is specified, lines beginning with the specified
  281. application's control character or "." are truncated at 255, regardless of
  282. the width specification.  %@NL@%
  283. %@NL@%
  284. %@NL@%
  285. %@3@%%@CR:C6A00010004 @%%@AB@%1.1.2  Cross-References%@AE@%%@EH@%%@NL@%
  286. %@NL@%
  287. Cross-references are embedded in one of two ways:  %@NL@%
  288. %@NL@%
  289. %@NL@%
  290.   1.  Invisible text, immediately following a space-delineated word,
  291.       generates a cross-reference whose text is the invisible text and whose
  292.       hotspot is the entire word.%@NL@%
  293. %@NL@%
  294.   2.  An anchor, signified by " \a", followed by normal text, which is then
  295.       followed by invisible text, generates a cross-reference whose text is
  296.       the invisible text and whose hotspot is all text between the anchor
  297.       and the beginning of the invisible text.%@NL@%
  298. %@NL@%
  299. %@NL@%
  300. %@NL@%
  301. %@3@%%@CR:C6A00010005 @%%@AB@%1.1.3  QuickHelp Example%@AE@%%@EH@%%@NL@%
  302. %@NL@%
  303. The following is an example of a help database containing a single entry
  304. using QuickHelp format:  %@NL@%
  305. %@NL@%
  306. %@AS@%  .context  #define
  307. %@AS@%  Syntax:   #define <identifier> <substitution-text>
  308. %@AS@%            #define <identifier> [(<parameter-list>)]
  309. %@AS@%            <substitution-text>
  310. %@AS@%  
  311. %@AS@%  Replaces all subsequent cases of \bidentifier\p with the
  312. %@AS@%substitution-text. 
  313. %@AS@%  If \bparameter-list\p is given after \bidentifier\p, each occurrence 
  314. %@AS@%  of \bidentifier\p (\bparameter-list\p) is replaced with a version 
  315. %@AS@%  of \isubstitution-text\p modified by substituting actual 
  316. %@AS@%  arguments for formal parameters.%@AE@%%@NL@%
  317. %@NL@%
  318. %@NL@%
  319. %@2@%%@CR:C6A00010006 @%%@AB@%1.2  Minimally Formatted ASCII%@AE@%%@EH@%%@NL@%
  320. %@NL@%
  321. Uncompressed, minimally formatted ASCII help files can be used at run time
  322. at the cost of slower searches and larger help files. Unformatted ASCII
  323. files are a fixed width and may not contain highlighting or
  324. cross-references.  %@NL@%
  325. %@NL@%
  326. The help file is a sequential series of topics, each preceded by one or more
  327. unique context definitions. Each context definition should be on a line of
  328. its own, beginning with ">>." Subsequent lines up to the next context
  329. definition constitute the topic text. For example:  %@NL@%
  330. %@NL@%
  331. %@AS@%  >>#define%@AE@%%@NL@%
  332. %@NL@%
  333. %@AS@%  Syntax:   #define <identifier> <substitution-text>
  334. %@AS@%            #define <identifier> [(<parameter-list>)]
  335. %@AS@%            <substitution-text>
  336. %@AS@%  
  337. %@AS@%  Replaces all subsequent cases of identifier with the substitution-text. 
  338. %@AS@%  If parameter-list is given after identifier, each occurrence of identifier
  339. %@AS@%
  340. %@AS@%  (parameter-list) is replaced with
  341. %@AS@%  a version of substitution-text modified by substituting actual arguments 
  342. %@AS@%  for formal parameters.%@AE@%%@NL@%
  343. %@NL@%
  344. The minimally formatted ASCII help file must begin with ">>." Since the
  345. first topic in such a database must start with a context definition line
  346. anyway, this allows for limited error checking to ensure that the referenced
  347. file is indeed an ASCII help file.  %@NL@%
  348. %@NL@%
  349. Minimally formatted ASCII files do not support non-default attributes or
  350. cross-references.  %@NL@%
  351. %@NL@%
  352. %@NL@%
  353. %@2@%%@CR:C6A00010007 @%%@AB@%1.3  Unformatted ASCII%@AE@%%@EH@%%@NL@%
  354. %@NL@%
  355. Fully unformatted ASCII files may be cross-referenced by other help files.
  356. When referenced, the entire ASCII file is treated as a single help topic. No
  357. formatting information may be present in such a file, and color may not be
  358. used. The file is returned by the help engine "as is." Such a file has no
  359. physical "next" or "previous."  %@NL@%
  360. %@NL@%
  361. %@NL@%
  362. %@2@%%@CR:C6A00010008 @%%@AB@%1.4  RTF ASCII%@AE@%%@EH@%%@NL@%
  363. %@NL@%
  364. In this format, the database is formatted in a subset of RTF to support
  365. special attributes. RTF syntax outside of the understood subset is ignored
  366. and stripped out by HELPMAKE. RTF generated by other programs such as
  367. Microsoft Word 4.%@AI@% %@AE@%x, Microsoft Word for the Apple(R) Macintosh(R), or
  368. Word-RTF can be used directly. This allows help authors to write and format
  369. directly in these word processors.  %@NL@%
  370. %@NL@%
  371. HELPMAKE recognizes the subset of RTF listed below:  %@NL@%
  372. %@NL@%
  373. %@AB@%RTF Code%@AE@%                          %@AB@%Action%@AE@%
  374. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  375. \plain                            Reset to default attributes. On most 
  376.                                   screens this is unblinking normal 
  377.                                   intensity.
  378.  
  379. \b                                Bold. This is displayed as intensified 
  380.                                   text.
  381.  
  382. \i                                Italic. Displayed as reverse video.
  383.  
  384. \v                                Hidden text. Hidden text is used for 
  385.                                   cross-reference information and some 
  386.                                   application-specific communications, and
  387.                                   is not displayed.
  388.  
  389. \ul                               Underline. Represented as blue text on 
  390.                                   adapters which do not support 
  391.                                   underlining.
  392.  
  393. \par                              End of paragraph.
  394.  
  395. \pard                             Reset paragraph formatting to defaults.
  396.  
  397. \fi                               Paragraph first line indent.
  398.  
  399. \li                               Paragraph left indent.
  400.  
  401. \line                             New line (not new paragraph).
  402.  
  403. \tab                              Tab character.
  404.  
  405. Topics may be paragraph-broken. HELPMAKE formats the text to a fixed width
  406. at compression time.  %@NL@%
  407. %@NL@%
  408. Each entry in the database source consists of one or more context strings,
  409. followed by topic text. The sequence ">>" at the beginning of any paragraph
  410. denotes the beginning of a new help entry. Subsequent text within that
  411. paragraph constitutes the keyword. If the immediately following paragraph
  412. begins with ">>," it also defines a context string for the same topic text.
  413. Subsequent paragraphs, up to the next paragraph beginning with ">>",
  414. constitute the topic text associated with those contexts.  %@NL@%
  415. %@NL@%
  416. %@NL@%
  417. %@3@%%@CR:C6A00010009 @%%@AB@%1.4.1  RTF Example%@AE@%%@EH@%%@NL@%
  418. %@NL@%
  419. The following is an example of a help database containing a single entry
  420. using minimal RTF text:  %@NL@%
  421. %@NL@%
  422. %@AS@%  {\rtf0 
  423. %@AS@%  >> #define \par 
  424. %@AS@%  Syntax:\tab #define <identifier> <substitution-text> 
  425. %@AS@%  \par 
  426. %@AS@%  \tab #define <identifier>[(<parameter-list>)] <substitution-text>
  427. %@AS@%  \par 
  428. %@AS@%  \par 
  429. %@AS@%  Replaces all subsequent cases of {\b identifier} with the
  430. %@AS@%substitution-text.
  431. %@AS@%  If {\b parameter-list} is given after {\b identifier}, each occurrence 
  432. %@AS@%  of 
  433. %@AS@%  {\b identifier} ({\b parameter-list} ) is replaced with a version 
  434. %@AS@%  of 
  435. %@AS@%  {\i substitution-text} modified by substituting actual arguments for 
  436. %@AS@%  formal parameters. \par 
  437. %@AS@%  }%@AE@%%@NL@%
  438. %@NL@%
  439. The result, referenced by the context string %@AB@%#define%@AE@%:  %@NL@%
  440. %@NL@%
  441. %@AS@%  Syntax: #define <identifier> <substitution-text>
  442. %@AS@%          #define <identifier>[(<parameter-list>)] <substitution-text>
  443. %@AS@%  
  444. %@AS@%  Replaces all subsequent cases of identifier with the substitution-text. 
  445. %@AS@%  If parameter-list is given after identifier, each occurrence 
  446. %@AS@%  of identifier (parameter-list) is replaced with a version 
  447. %@AS@%  of substitution-text modified by substituting actual 
  448. %@AS@%  arguments for formal parameters.%@AE@%%@NL@%
  449. %@NL@%
  450. Note that the bold attributes in this example are shown as underline.  %@NL@%
  451. %@NL@%
  452. %@NL@%
  453. %@3@%%@CR:C6A00010010 @%%@AB@%1.4.2  Local Contexts%@AE@%%@EH@%%@NL@%
  454. %@NL@%
  455. In RTF, QuickHelp, and minimal ASCII formats, certain context strings may be
  456. defined as local contexts, being "local" to the help file. Then these
  457. context strings may not be looked up by %@AB@%HelpNc%@AE@%, but instead may be used only
  458. as the target of embedded cross references in the text.  %@NL@%
  459. %@NL@%
  460. Local contexts are encoded just like normal contexts, except that they begin
  461. with the at-sign character (@). The actual strings following the at sign are
  462. discarded by HELPMAKE during compression. Cross-references to local contexts
  463. are then encoded in the help file in a more compact form.  %@NL@%
  464. %@NL@%
  465. Local contexts provide the following advantages:  %@NL@%
  466. %@NL@%
  467. %@NL@%
  468.   ■   Space savings. The context strings are not preserved and hence are not
  469.       carried in the help file's context string table. Cross-references to
  470.       local contexts do not reference the actual context string, but instead
  471.       are encoded in a smaller, 3-byte format.%@NL@%
  472. %@NL@%
  473.   ■   Access restriction. You cannot mistakenly ask for help on what would
  474.       be a local context string.%@NL@%
  475. %@NL@%
  476. %@NL@%
  477. The following restrictions also apply:  %@NL@%
  478. %@NL@%
  479. %@NL@%
  480.   ■   Local contexts must be resolvable within a single help file. HELPMAKE
  481.       produces warnings if a local context is cross-referenced, but never
  482.       defined in the help file being created.%@NL@%
  483. %@NL@%
  484.   ■   Topics which are the targets of local contexts can be accessed in only
  485.       two ways: as the target of a cross-reference or by physical or
  486.       historical relative movement in the help file (Next, Previous, or
  487.       Back).%@NL@%
  488. %@NL@%
  489. %@STUB@%      For example:%@NL@%
  490. %@NL@%
  491. %@AS@%      .context normal
  492. %@AS@%      This is a normal topic, accessible by the context string "normal." 
  493. %@AS@%      [button\v@local\v] is a cross-reference to the following topic.
  494. %@AS@%      
  495. %@AS@%      .context @local
  496. %@AS@%      This topic can be reached only by physical previous or next, a
  497. %@AS@%historical 
  498. %@AS@%      backup, or by the cross-reference in the previous topic.%@AE@%%@NL@%
  499. %@NL@%
  500. %@NL@%
  501. %@NL@%
  502. %@2@%%@CR:C6A00010011 @%%@AB@%1.5  Physical Database Organization%@AE@%%@EH@%%@NL@%
  503. %@NL@%
  504. The physical database consists of several pieces, as outlined below:  %@NL@%
  505. %@NL@%
  506. %@AS@%  +-----
  507. %@AS@%  | Header
  508. %@AS@%  +-----
  509. %@AS@%  | Topic Index
  510. %@AS@%  +-----
  511. %@AS@%  | Context Strings
  512. %@AS@%  +-----
  513. %@AS@%  | Context Map
  514. %@AS@%  +-----
  515. %@AS@%  | Keyphrase Table
  516. %@AS@%  +-----
  517. %@AS@%  | Huffman Decode Tree
  518. %@AS@%  +----
  519. %@AS@%  | Compressed Topic Text
  520. %@AS@%  +----
  521. %@AS@%  | File Title
  522. %@AS@%  +----%@AE@%%@NL@%
  523. %@NL@%
  524. Help files may also be concatenated together so that the above pattern is
  525. repeated. For example,  %@NL@%
  526. %@NL@%
  527. %@AS@%  COPY FOO.HLP/B + BAR.HLP/B + YOU.HLP/B MONDO.HLP/B%@AE@%%@NL@%
  528. %@NL@%
  529. This command creates a single help file called MONDO.HLP, which consists of
  530. the three component help files: FOO, BAR, and YOU. This file, when opened by
  531. the help engine, counts as three files against the engine's open file limit.
  532. In most other respects, it acts exactly like a single help file.  %@NL@%
  533. %@NL@%
  534. %@NL@%
  535. %@3@%%@CR:C6A00010012 @%%@AB@%1.5.1  Concatenated Order%@AE@%%@EH@%%@NL@%
  536. %@NL@%
  537. The next several sections explain the pieces in the order in which they
  538. physically appear in a concatenated help database.  %@NL@%
  539. %@NL@%
  540. %@AB@%Header%@AE@% - Identifies the help file and contains data relating to the content
  541. of the file. It is described by the following C structure:%@NL@%
  542. %@NL@%
  543. %@AS@%  typedef struct {
  544. %@AS@%       ushort      wMagic;
  545. %@AS@%       ushort      wSignature;
  546. %@AS@%       ushort      wFlags;
  547. %@AS@%       ushort      appChar;
  548. %@AS@%       ushort      cTopics;
  549. %@AS@%       ushort      cContexts;
  550. %@AS@%       ushort      cbWidth;
  551. %@AS@%       ushort      cPreDef;
  552. %@AS@%       uchar       fname[14];
  553. %@AS@%       ushort      reserved[2];
  554. %@AS@%       ulong       posTbl[9];
  555. %@AS@%       ulong       fsize;
  556. %@AS@%       } header;%@AE@%%@NL@%
  557. %@NL@%
  558. where the following information is called out by the left-hand column:  %@NL@%
  559. %@NL@%
  560. %@AB@%Header Data%@AE@%                       %@AB@%Description%@AE@%
  561. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  562. %@AI@%wMagic%@AE@%                            A word that identifies this as a help 
  563.                                   file.
  564.  
  565. %@AI@%wSignature%@AE@%                        A word that identifies the "owner" or 
  566.                                   application that uses this help file.
  567.  
  568. %@AI@%wFlags%@AE@%                            A word that contains the following 
  569.                                   flags:
  570.  
  571.                                   %@AB@%Bit%@AE@%         %@AB@%Action%@AE@%
  572. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  573.                                   0           Set if context look-up is to
  574.                                               be case sensitive.
  575.  
  576.                                   1           Set if the file is locked 
  577.                                               and cannot be
  578.                                               decompressed.
  579.  
  580. %@AI@%appChar%@AE@%                           Application-specific character, 
  581.                                   controlling access to certain line of 
  582.                                   help text. (See the /A parameter to 
  583.                                   HELPMAKE.) 0xff if not set.
  584.  
  585. %@AI@%cTopics%@AE@%                           A count of entries in the topic index.
  586.  
  587. %@AI@%cContexts%@AE@%                         A count of context strings.
  588.  
  589. %@AI@%cbWidth%@AE@%                           The fixed width encoded by HELPMAKE, if 
  590.                                   one was specified. If zero, the data 
  591.                                   must be formatted to the display width 
  592.                                   by the application.
  593.  
  594. %@AI@%cPreDef%@AE@%                           Count of predefined contexts.
  595.  
  596. %@AI@%fname%@AE@%                             The original file name created by 
  597.                                   HELPMAKE. This is used to identify 
  598.                                   individual help files which have been 
  599.                                   concatenated into larger help files.
  600.  
  601. %@AI@%posTbl%@AE@%                            A table of file positions for the 
  602.                                   various fields in the database:
  603.  
  604.                                   %@AB@%File%@AE@% %@AB@%%@AE@%       %@AB@%Description%@AE@%
  605.                                   %@AB@%Position%@AE@%    
  606. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  607.                                   0           File offset of the topic 
  608.                                               index.
  609.  
  610.                                   1           File offset of the context 
  611.                                               strings.
  612.  
  613.                                   2           File offset of the context 
  614.                                               map.
  615.  
  616.                                   3           File offset of the keyphrase
  617.                                               table;
  618.                                               0 if keyphrase compression 
  619.                                               was
  620.                                               not performed.
  621.  
  622.                                   4           File offset of the Huffman 
  623.                                               decode
  624.                                               tree; 0 if Huffman encoding 
  625.                                               was
  626.                                               not performed.
  627.  
  628.                                   5           File offset of text of the 
  629.                                               first topic.
  630.  
  631.                                   6           File offset of file title.
  632.  
  633.                                   7-8         Reserved.
  634.  
  635.                                   9           Size of help file in bytes.
  636.  
  637. %@AB@%Topic Index%@AE@% - A table of file positions for each topic contained in the
  638. help file. Topic #%@AI@%n%@AE@%'s file position can be found in the %@AI@%n%@AE@%th
  639. entry in this table. In addition,
  640. the size in bytes of any compressed topic can be determined by the
  641. difference between two successive file positions.%@NL@%
  642. %@NL@%
  643. %@AB@%Context Strings%@AE@% - An array of strings which map to context numbers in the
  644. following
  645. context map. These strings are used for topic look-up when no predefined
  646. context number has been assigned.%@NL@%
  647. %@NL@%
  648. %@AB@%Context Map%@AE@% - A mapping of context numbers to topic numbers. This allows
  649. context numbers to be somewhat arbitrarily assigned, by an outside
  650. piece of software, such as a parser, and then mapped to sequential
  651. topic numbers.%@NL@%
  652. %@NL@%
  653. %@AB@%Keyphrase Table%@AE@% - Table of strings used in keyphrase decompression.%@NL@%
  654. %@NL@%
  655. %@AB@%Huffman Decode Tree%@AE@% - The tree used to decompress Huffman encoded data.%@NL@%
  656. %@NL@%
  657. %@AB@%Compressed Topic Text%@AE@% - The compressed text for the actual topic data,
  658. preceded by
  659. a 1-word count of bytes in the uncompressed topic.%@NL@%
  660. %@NL@%
  661. %@AB@%File Title%@AE@% - The title or name specified with the /N command at compression
  662. time.%@NL@%
  663. %@NL@%
  664. %@NL@%
  665. %@3@%%@CR:C6A00010013 @%%@AB@%1.5.2  Decompressed Topic Format%@AE@%%@EH@%%@NL@%
  666. %@NL@%
  667. Each line of the decompressed topic is formatted as follows:  %@NL@%
  668. %@NL@%
  669. %@AS@%  +--------+----------------------+
  670. %@AS@%  | cbText | ASCII Text.......... |
  671. %@AS@%  +-------------------------+-----+--+----------------+
  672. %@AS@%  | cbInfo | Attr Info      | 0ffffh | Cross-Ref Info |
  673. %@AS@%  +-------------------------+--------+----------------+
  674. %@AS@%  .
  675. %@AS@%  .%@AE@%%@NL@%
  676. %@NL@%
  677. Topic information appears in the following order:  %@NL@%
  678. %@NL@%
  679. %@AB@%Topic Data%@AE@%                        %@AB@%Description%@AE@%
  680. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  681. %@AI@%cbText%@AE@%                            Byte. Length in bytes, plus one, of the 
  682.                                   ASCII text which follows.
  683.  
  684. %@AI@%ASCII Text%@AE@%                        Text of the line. All characters are 
  685.                                   displayable.
  686.                                   CR-LF characters have no special meaning.
  687.  
  688. %@AI@%cbInfo%@AE@%                            Word. Length in bytes plus two of the 
  689.                                   attribute and cross-reference 
  690.                                   information that follows.
  691.  
  692. %@AI@%Attr Info%@AE@%                         Information describing the attributes 
  693.                                   associated with the preceding line. 
  694.                                   These are formatted as attribute 
  695.                                   index/byte-count-byte pairs with 
  696.                                   attribute 0ffh indicating the end.
  697.  
  698.                                   Attribute indexes are bytes whose bits 
  699.                                   represent the following attributes:
  700.  
  701.                                   %@AB@%Bit%@AE@%         %@AB@%Attribute%@AE@%
  702. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  703.                                   0           Bold
  704.  
  705.                                   1           Italic
  706.  
  707.                                   2           Underline
  708.  
  709.                                   Thus, attribute indexes can range in 
  710.                                   value from 0 -7, representing various 
  711.                                   combinations of the above.
  712.  
  713. %@AI@%Cross-Ref Info%@AE@%                    Definition of the "hotspots" contained 
  714.                                   in the line and what they 
  715.                                   cross-reference to. Each hotspot is 
  716.                                   formatted as:
  717.  
  718.                                   %@AS@%+------+------+-----------+%@AE@%
  719.                                   %@AS@%|cols|cole|cross-ref|%@AE@%
  720.                                   %@AS@%+------+------+-----------+%@AE@%
  721.  
  722.                                   where format information breaks down as 
  723.                                   follows:
  724.  
  725.                                   %@AB@%Definition%@AE@%  %@AB@%Description%@AE@%
  726. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  727.                                   %@AI@%cols%@AE@%        Byte. Starting column of 
  728.                                               hotspot.
  729.  
  730.                                   %@AI@%cole%@AE@%        Byte. Ending column of the
  731.                                               hotspot (inclusive).
  732.  
  733.                                   %@AI@%cross-ref%@AE@%   ASCIIZ string. Context which
  734.                                               the
  735.                                               hotspot cross-references to.
  736.                                               Either
  737.                                               a null-terminated ASCII 
  738.                                               string or a
  739.                                               "local context" (a 3-byte 
  740.                                               internal
  741.                                               data structure, the first 
  742.                                               byte of
  743.                                               which is zero).%@AI@%%@AE@%
  744.  
  745. %@NL@%
  746. %@2@%%@CR:C6A00010014 @%%@AB@%1.6  The Encoding Process%@AE@%%@EH@%%@NL@%
  747. %@NL@%
  748. The HELPMAKE utility makes several passes on the data when encoding source
  749. files into help-file format. The amount of compression to be performed is
  750. optional and is specified when HELPMAKE is run.  %@NL@%
  751. %@NL@%
  752. HELPMAKE passes are described below.  %@NL@%
  753. %@NL@%
  754. %@NL@%
  755.   1.  In the first pass, extraneous encoding information is stripped from
  756.       the file and remaining formatting information is converted to an
  757.       internal form. Local context references and definitions are collected.%@NL@%
  758. %@NL@%
  759.   2.  During the second pass, local context references are resolved. If
  760.       enabled, the text is also run-length encoded. All runs of 4 to 255
  761.       identical characters are replaced with a flag, the character, and a
  762.       repetition count. During this pass the context strings are collected.
  763.       If keyphrase compression is enabled, the encoded text is analyzed for
  764.       keyword/phrase frequency.%@NL@%
  765. %@NL@%
  766.   3.  If keyphrase compression is enabled, the following pass replaces all
  767.       space-saving occurrences of keyphrases with a flag byte and a byte
  768.       index. If Huffman encoding is enabled, character frequency of the
  769.       output is analyzed for Huffman tree construction.%@NL@%
  770. %@NL@%
  771.   4.  If Huffman encoding is enabled, a following Huffman pass encodes the
  772.       topic text.%@NL@%
  773. %@NL@%
  774.   5.  The next-to-last pass builds file topic and compression tables in
  775.       their final form in preparation for writing to the output file.%@NL@%
  776. %@NL@%
  777.   6.  In the final pass, the actual help file is written. The help-file
  778.       header, topic index, context string table, context map, keyphrase
  779.       table, and Huffman tree are all written to the help file, followed by
  780.       the compressed topic text.%@NL@%
  781. %@NL@%
  782. %@NL@%
  783. As noted above, once compressed, multiple help files can be manually
  784. concatenated to produce single help files.  %@NL@%
  785. %@NL@%
  786. %@NL@%
  787. %@NL@%
  788. %@NL@%
  789. %@NL@%
  790. %@NL@%
  791. %@CR:C6A00020001 @%%@1@%%@AB@%Chapter 2  Text Structure and Conventions%@AE@%%@EH@%%@NL@%
  792. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  793. %@NL@%
  794. Common structures and conventions ensure that help files for one application
  795. will make sense when viewed using another. This information goes beyond the
  796. context-string and topic-text mapping functions of the help engine itself.
  797. This chapter outlines organizational conventions and approaches that should
  798. be followed by applications that provide maximally cross-compatible help
  799. files.  %@NL@%
  800. %@NL@%
  801. %@NL@%
  802. %@2@%%@CR:C6A00020002 @%%@AB@%2.1  Authoring the Help Database%@AE@%%@EH@%%@NL@%
  803. %@NL@%
  804. The help engine is a data-retrieval tool that imposes no real restrictions
  805. on the content and format of the help text. The HELPMAKE utility and
  806. additional display routines and conventions, however, make certain
  807. assumptions about the format of help text. This section provides some help
  808. authoring guidelines.  %@NL@%
  809. %@NL@%
  810. %@NL@%
  811. %@3@%%@CR:C6A00020003 @%%@AB@%2.1.1  QuickHelp Format%@AE@%%@EH@%%@NL@%
  812. %@NL@%
  813. When using QuickHelp format, a text editor would be used. QuickHelp format
  814. also lends itself to relatively easy automated translation from other
  815. document forms.  %@NL@%
  816. %@NL@%
  817. Help text source is a sequential series of topics, each preceded by one or
  818. more unique context definitions. In QuickHelp format, each topic begins with
  819. one or  %@NL@%
  820. %@NL@%
  821. more ".context" lines defining the context strings which map to the topic
  822. text. Subsequent lines up to the next ".context" constitute the topic text.
  823. For example:  %@NL@%
  824. %@NL@%
  825. %@AS@%  .context #define
  826. %@AS@%  Syntax: #define <identifier> <substitution-text>
  827. %@AS@%   #define <identifier> [(<parameter-list>)]
  828. %@AS@%   <substitution-text>
  829. %@AS@%  
  830. %@AS@%  Replaces all subsequent cases of \bidentifier\p with the
  831. %@AS@%substitution-text. 
  832. %@AS@%  If \bparameter-list\p is given after \bidentifier\p, each occurrence 
  833. %@AS@%  of \bidentifier\p (\bparameter-list\p) is replaced with a version 
  834. %@AS@%  of \isubstitution-text\p modified by substituting actual arguments
  835. %@AS@%  for formal parameters.%@AE@%%@NL@%
  836. %@NL@%
  837. See Chapter 1 for a detailed discussion of QuickHelp.  %@NL@%
  838. %@NL@%
  839. %@NL@%
  840. %@3@%%@CR:C6A00020004 @%%@AB@%2.1.2  RTF Format%@AE@%%@EH@%%@NL@%
  841. %@NL@%
  842. When using RTF format, authoring can take place using a word processor  or
  843. other tool capable of generating RTF output. Mac WORD, Microsoft  Word 4.%@AI@%x%@AE@%,
  844. and Word-RTF (a tool that converts Word format files to RTF) are all
  845. alternatives.  %@NL@%
  846. %@NL@%
  847. In RTF, each context definition should be in a paragraph of its own,
  848. beginning with ">>." Subsequent paragraphs up to the next context definition
  849. constitute the topic text. For example:  %@NL@%
  850. %@NL@%
  851. %@AS@%  {\rtf0 
  852. %@AS@%  >> #define \par 
  853. %@AS@%  Syntax:\tab #define <identifier> <substitution-text> 
  854. %@AS@%  \par 
  855. %@AS@%  \tab #define <identifier>[(<parameter-list>)] <substitution-text>
  856. %@AS@%  \par 
  857. %@AS@%  \par 
  858. %@AS@%  Replaces all subsequent cases of {\b identifier} with the
  859. %@AS@%substitution-text.
  860. %@AS@%  If {\b parameter-list} is given after {\b identifier}, each occurrence 
  861. %@AS@%  of 
  862. %@AS@%  {\b identifier} ({\b parameter-list} ) is replaced with a version 
  863. %@AS@%  of 
  864. %@AS@%  {\i substitution-text} modified by substituting actual arguments for 
  865. %@AS@%  formal parameters. \par 
  866. %@AS@%  }%@AE@%%@NL@%
  867. %@NL@%
  868. In these examples, the context string %@AS@% #define %@AE@% relates to the topic text
  869. which follows it. The topic text contains embedded bold and italic text. See
  870. Chapter 1 for a detailed discussion of RTF format.  %@NL@%
  871. %@NL@%
  872. %@NL@%
  873. %@2@%%@CR:C6A00020005 @%%@AB@%2.2  Hotspots and Cross-References%@AE@%%@EH@%%@NL@%
  874. %@NL@%
  875. Cross-references are included as invisible text. A word or an anchored
  876. phrase, known as a hotspot, followed by invisible text, constitutes a
  877. cross-reference. For example:  %@NL@%
  878. %@NL@%
  879. %@AS@%  .context EXE2BIN
  880. %@AS@%  EXE2BIN
  881. %@AS@%  
  882. %@AS@%  Convert .EXE file to Binary-Image File
  883. %@AS@%  
  884. %@AS@%  \bPurpose\b
  885. %@AS@%  
  886. %@AS@%  Converts an executable file in the .EXE\vexe_format\v format to a 
  887. %@AS@%  memory image file in binary format. The EXE2BIN utility is supplied 
  888. %@AS@%  with the MS-DOS distribution disks.%@AE@%%@NL@%
  889. %@NL@%
  890. In this example, the word ".EXE" in the first line of the paragraph is the
  891. hotspot. It cross-references to "exe_format." A mouse click or other form of
  892. selection with the cursor on any of the letters of ".EXE" brings up the help
  893. topic whose context was "exe_format." The invisible text "exe_format" is not
  894. actually displayed.  %@NL@%
  895. %@NL@%
  896. When the desired hotspot crosses more than one word, an anchor is used:  %@NL@%
  897. %@NL@%
  898. %@AS@%  Converts an executable file in the \a.EXE format\vexe_format\v
  899. %@AS@%  to a memory image file in binary format. The EXE2BIN utility is
  900. %@AS@%  supplied with the MS-DOS distribution disks.%@AE@%%@NL@%
  901. %@NL@%
  902. In this case, the hotspot consists of the entire phrase ".EXE format."
  903. Anchored hotspots must be contained on a single line.  %@NL@%
  904. %@NL@%
  905. The invisible cross-reference text is formatted as one of the following:  %@NL@%
  906. %@NL@%
  907. %@AB@%Text Command%@AE@%                      %@AB@%Action%@AE@%
  908. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  909. %@AB@%context_%@AE@%%@AI@%string%@AE@%                    Results in the help topic associated 
  910.                                   with the arbitrary context string being 
  911.                                   displayed. For example, "exe_format" 
  912.                                   results in the help topic associated 
  913.                                   with that context being displayed.
  914.  
  915. %@AB@%@context_%@AE@%%@AI@%string%@AE@%                   Causes the help topic associated with 
  916.                                   the local context string to be displayed.
  917.                                   As defined in a previous section, local 
  918.                                   contexts must be defined in the same 
  919.                                   help file that they are referenced in.
  920.  
  921. %@AI@%filename%@AE@%%@AB@%!%@AE@%                         Causes the entire file referenced to
  922.                                   be treated as a single topic to be 
  923.                                   displayed. For example, the command 
  924.                                   "$INCLUDE:stdio.h!" would search the 
  925.                                   INCLUDE environment variable for STDIO.H,
  926.                                   and display it as a single help topic.
  927.  
  928. %@AI@%filename%@AE@%%@AB@%!context_%@AE@%%@AI@%string%@AE@%           Same as "context_string" above, except 
  929.                                   that only the help file "filename" is 
  930.                                   searched. If not already open, it is 
  931.                                   searched for, either on the path or 
  932.                                   explicit environment variable, and 
  933.                                   opened. For example, the command 
  934.                                   "$INIT:mep.hlp!assign" would search for 
  935.                                   "mep.hlp" on the INIT environment 
  936.                                   variable, and bring up the topic 
  937.                                   associated with "assign."
  938.  
  939. %@AB@%!%@AE@%%@AI@%cmd%@AE@%                              A cross-reference command. These 
  940.                                   commands are discussed in Section 2.4.
  941.  
  942. %@NL@%
  943. %@2@%%@CR:C6A00020006 @%%@AB@%2.3  Topic Commands%@AE@%%@EH@%%@NL@%
  944. %@NL@%
  945. Topic commands embedded into the help text provide additional control
  946. information to the application displaying help. The commands are contained
  947. on a single line which is not considered part of the help text, and is not
  948. displayed to the user, but is embedded into the help text source.  %@NL@%
  949. %@NL@%
  950. With the exception of ".context" and ".comment," topic commands take two
  951. forms: an "English" version used in the help source code (dot command), and
  952. a shortened version actually placed in the encoded help file and understood
  953. by the application displaying help (colon command). English versions of the
  954. commands are automatically converted by the HELPMAKE program to the single
  955. character versions (or back) on encode (or decode).  %@NL@%
  956. %@NL@%
  957. Note that ":" is replaced by whatever application-specific character is
  958. specified to HELPMAKE using the /A parameter. Applications writers should
  959. support only the ":" commands listed below. Help-file authors should be
  960. concerned with only the English "." forms of the commands discussed in Table
  961. 2.1.  %@NL@%
  962. %@NL@%
  963. %@AB@%Table 2.1  %@AB@%HELPMAKE Topic Commands%@AE@%%@AE@%
  964.  
  965. %@TH: 211 13854 02 38 38 @%
  966. Command                               Action
  967. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  968. %@AB@%.context%@AE@% %@AI@%context string%@AE@%               Required.
  969.  
  970. %@AB@%.category%@AE@% %@AI@%string number%@AE@%%@AB@%%@AE@%               Contains the category name the 
  971. %@AB@%:c%@AE@%%@AI@%string number%@AE@%                       current function is in, and its 
  972.                                       position in the list of functions. 
  973.                                       The%@AB@% .category%@AE@% name is used by the 
  974.                                       QuickHelp Topic command, which 
  975.                                       brings up the list of topics that 
  976.                                       the current topic is part of. This 
  977.                                       is done by fetching the category 
  978.                                       name, which is a %@AB@%.list%@AE@%-type topic, 
  979.                                       and finding where the current topic 
  980.                                       is within the list of topics.
  981.  
  982.                                       If the help topic being displayed at
  983.                                       the time of a request is for 
  984.                                       "h.contents" (the table of contents),
  985.                                       applications may divert the search 
  986.                                       to the %@AB@%.category%@AE@% %@AI@%string%@AE@% of the 
  987.                                       currently displayed topic.
  988.  
  989.                                       The %@AB@%.category%@AE@% command, if present, 
  990.                                       must precede all displayable help 
  991.                                       text. If not supported by an 
  992.                                       application, this command should be 
  993.                                       ignored.
  994.  
  995. %@AB@%.command%@AE@%                              Indicates that the topic text is not
  996. %@AB@%:x%@AE@%                                    a displayable help topic, and should
  997.                                       not be displayed to the user. Used 
  998.                                       to precede script topics, and other 
  999.                                       internal information.
  1000.  
  1001.                                       The %@AB@%.command%@AE@% command, if present, 
  1002.                                       must precede all displayable help 
  1003.                                       text. Should be supported by all 
  1004.                                       applications. (If a next or previous
  1005.                                       operation encounters a topic 
  1006.                                       containing this command, the topic 
  1007.                                       should simply be skipped.)
  1008.  
  1009. %@AB@%.comment%@AE@% %@AI@%text%@AE@%                         Used in the source file to specify a
  1010.                                       comment line which will not be 
  1011.                                       placed into the database (i.e., 
  1012.                                       HELPMAKE removes this line). This is
  1013.                                       used by help authors to comment 
  1014.                                       their source code so that it can be 
  1015.                                       maintained by other authors without 
  1016.                                       having the text go into the database.
  1017.                                       This can be particularly valuable 
  1018.                                       when documenting cross-
  1019.                                       references that have commands (i.e.,
  1020.                                       you can insert a %@AB@%.comment%@AE@% and say 
  1021.                                       what the cross-reference is supposed
  1022.                                       to do).
  1023.  
  1024.                                       Since the comments are not preserved
  1025.                                       in the compressed file, they cannot 
  1026.                                       be restored via decompression.
  1027.  
  1028. %@AB@%.execute %@AE@%%@AI@%cmd%@AE@%%@AB@%%@AE@%                          Executes the specified 
  1029. %@AB@%:y%@AE@%%@AI@%cmd%@AE@%                                 cross-reference command. This 
  1030.                                       command is executed at the time the 
  1031.                                       line is encountered while the 
  1032.                                       application is processing the topic 
  1033.                                       for display. All cross-reference 
  1034.                                       commands are valid, even though not 
  1035.                                       all make sense. This command may 
  1036.                                       appear anywhere in a topic.
  1037.  
  1038.                                       If not supported by an application, 
  1039.                                       this command should be ignored.
  1040.  
  1041. %@AB@%.file%@AE@% %@AI@%filename%@AE@%%@AB@%%@AE@%                        Normally used by an internal release
  1042. %@AB@%:f%@AE@%%@AI@%filename%@AE@%                            of the database to point to the 
  1043.                                       location of the source file. The 
  1044.                                       private build of QuickHelp along 
  1045.                                       with a macro command in MEP 
  1046.                                       can make it possible to load the 
  1047.                                       source file with two keystrokes.
  1048.  
  1049.                                       If not supported by an application, 
  1050.                                       should be ignored.
  1051.  
  1052. %@AB@%.freeze%@AE@% ##%@AB@%%@AE@%                            Indicates that the next ## lines 
  1053. %@AB@%:z%@AE@% ##                                 which follow are to be "frozen" as 
  1054.                                       the top line(s) on the help screen. 
  1055.                                       This is typically used to freeze a 
  1056.                                       row of cross-reference buttons at 
  1057.                                       the top of a help topic which might 
  1058.                                       be scrolled.
  1059.  
  1060.                                       The %@AB@%.freeze%@AE@% command, if present, 
  1061.                                       must precede all displayable help 
  1062.                                       text. If not supported, should be 
  1063.                                       ignored.
  1064.  
  1065. %@AB@%.mark %@AE@%%@AI@%text%@AE@% [##]%@AB@%%@AE@%                       Defines a "mark" immediately 
  1066. %@AB@%:m%@AE@%%@AI@%text%@AE@% [##]                           preceding the following line of text.
  1067.                                       An optional number, indicating 
  1068.                                       column location, may also be 
  1069.                                       included. Can be referenced by 
  1070.                                       Advisor Script commands (see Section
  1071.                                       2.4), usually to indicate that 
  1072.                                       display of a particular topic begins
  1073.                                       at the marked line, rather than the 
  1074.                                       first line.
  1075.  
  1076.                                       %@AB@%.mark%@AE@% names are unique (local) to 
  1077.                                       each topic. If not supported by an 
  1078.                                       application, should be ignored.
  1079.  
  1080. %@AB@%.length%@AE@% #%@AB@%%@AE@%                             Specifies the initial length of the 
  1081. %@AB@%:l%@AE@%#                                   topic when displayed. Applications 
  1082.                                       that can resize the window in which 
  1083.                                       help is displayed should attempt to 
  1084.                                       resize so that # number of lines are
  1085.                                       displayed.
  1086.  
  1087.                                       The %@AB@%.length%@AE@% command, if present, 
  1088.                                       must precede all displayable help 
  1089.                                       text. If not supported by an 
  1090.                                       application, should be ignored, and 
  1091.                                       the application must support a 
  1092.                                       reasonable default window or screen 
  1093.                                       size.
  1094.  
  1095. %@AB@%.list%@AE@%                                 Indicates that the current topic 
  1096. %@AB@%:i%@AE@%                                    contains a list of topics. This will
  1097.                                       cause a highlighted line to be 
  1098.                                       displayed. You can select a topic by
  1099.                                       moving the highlighted line over the
  1100.                                       desired topic, and then pressing the
  1101.                                       ENTER key. The first word of the 
  1102.                                       line will be used as the topic 
  1103.                                       string to search for.
  1104.  
  1105.                                       If not supported by an application, 
  1106.                                       the topic should 
  1107.                                       be displayed as any other help topic
  1108.                                       (i.e., %@AB@%.list%@AE@% can be ignored).
  1109.  
  1110. %@AB@%.next %@AE@%%@AI@%context%@AE@% %@AI@%string%@AE@%%@AB@%%@AE@%                  Indicates that the physically next 
  1111. %@AB@%:>%@AE@%%@AI@%context%@AE@% %@AI@%string%@AE@%                      topic should be looked up using the 
  1112.                                       supplied context string, rather than
  1113.                                       getting the actual next topic. This 
  1114.                                       is used to skip large blocks of %@AB@%%@AE@%
  1115.                                       %@AB@%.command%@AE@% or%@AB@% .popup%@AE@% topics quickly.
  1116.  
  1117.                                       The %@AB@%.next%@AE@% command, if present, must 
  1118.                                       precede all displayable help text. 
  1119.  
  1120. %@AB@%.previous %@AE@%%@AI@%context string%@AE@%%@AB@%%@AE@%              Tells the help system to look up the
  1121. %@AB@%:<%@AE@%%@AI@%context%@AE@% %@AI@%string%@AE@%                      physically previous topic using the 
  1122.                                       supplied context string rather than 
  1123.                                       get the actual previous topic. This 
  1124.                                       is used to skip large blocks of%@AB@% %@AE@%
  1125.                                       %@AB@%.command%@AE@% or %@AB@%.popup%@AE@% topics quickly.
  1126.  
  1127. %@AB@%.paste%@AE@% %@AI@%paste-name%@AE@%%@AB@%%@AE@%                     Begins a paste section, with the 
  1128. %@AB@%:p%@AE@%%@AI@%paste-name%@AE@%                          name appearing in QuickHelp's Paste 
  1129.                                       menu. If not supported by an 
  1130.                                       application, should be ignored.
  1131.  
  1132.                                       The %@AB@%.paste%@AE@% command, if present, must
  1133.                                       precede all displayable help text. 
  1134.  
  1135. %@AB@%.end%@AE@%                                  Ends a paste section. If not 
  1136. %@AB@%:e%@AE@%                                    supported by an application, this 
  1137.                                       command should be ignored.
  1138.  
  1139. %@AB@%.popup%@AE@%                                Indicates to QuickHelp that the 
  1140. %@AB@%:g%@AE@%                                    current topic is not to be loaded as
  1141.                                       a normal, scrollable topic. Instead 
  1142.                                       the number of lines in the current 
  1143.                                       topic is counted, and a box is 
  1144.                                       created with the topic displayed 
  1145.                                       within it. As soon as you press a 
  1146.                                       key or click the mouse button, the 
  1147.                                       popup box will go away. If you have 
  1148.                                       already loaded QuickHelp, the 
  1149.                                       previous topic is displayed. 
  1150.  
  1151.                                       When QuickHelp is first run, it 
  1152.                                       attempts to find a topic from the 
  1153.                                       word underneath the cursor. If that 
  1154.                                       topic is a popup topic, QuickHelp 
  1155.                                       displays the popup box, then returns
  1156.                                       without displaying its main window.
  1157.  
  1158.                                       The %@AB@%.popup%@AE@% command, if present, must
  1159.                                       precede all displayable help text. 
  1160.                                       If not supported by an application, 
  1161.                                       the topic can be displayed normally.
  1162.  
  1163. %@AB@%.ref%@AE@% [%@AI@%string%@AE@%], [%@AI@%string%@AE@%], ...%@AB@%%@AE@%          Contains a list of comma-separated 
  1164. %@AB@%:r%@AE@%[%@AI@%string%@AE@%], [%@AI@%string%@AE@%], ...             topics (i.e., functions and 
  1165.                                       structures) that appear in the 
  1166.                                       Reference menu, and will be 
  1167.                                       preloaded by the PreLoad thread. If 
  1168.                                       not supported by an application, 
  1169.                                       this command should be ignored.
  1170.  
  1171. %@AB@%.topic%@AE@% %@AI@%topic name%@AE@%%@AB@%%@AE@%                     If not supported by an application, 
  1172. %@AB@%:n%@AE@%%@AI@%topic name%@AE@%                          this command should be ignored, and 
  1173.                                       no title or name displayed.
  1174.  
  1175. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1176.  
  1177. %@TE: 211 13854 02 38 38 @%
  1178.  
  1179. %@NL@%
  1180. %@2@%%@CR:C6A00020007 @%%@AB@%2.4  Cross-Reference Commands%@AE@%%@EH@%%@NL@%
  1181. %@NL@%
  1182. Cross-reference commands extend hotspots beyond simply moving around in help
  1183. information. These commands actually carry out actions in response to user
  1184. selection.  %@NL@%
  1185. %@NL@%
  1186. Typically, when a hotspot is selected by the user of the help system, the
  1187. associated invisible text or "cross-reference" is simply "looked-up" as
  1188. another help request, and its associated topic displayed. A cross-reference
  1189. command (usually prefixed by an exclamation point) contains instead an
  1190. instruction to be carried out by the host application.  %@NL@%
  1191. %@NL@%
  1192. The executable command, or in some cases the command class, is defined by
  1193. its first character. Uppercase alphabetic and special character commands are
  1194. broadly classified as "Advisor Script Commands," and potentially applicable
  1195. to all help systems. Lowercase characters are used to define commands or
  1196. command classes of restricted applicability.  %@NL@%
  1197. %@NL@%
  1198. These commands are discussed in Table 2.2.  %@NL@%
  1199. %@NL@%
  1200. %@AB@%Table 2.2  %@AB@%HELPMAKE Cross-Reference Commands%@AE@%%@AE@%
  1201.  
  1202. %@TH: 107  6454 02 34 42 @%
  1203. Command                           Class
  1204. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1205. >%@AI@%string%@AE@%                           Indirection. The rest of the command is 
  1206.                                   a context string which should be looked 
  1207.                                   up, and whose topic contents should be 
  1208.                                   executed, line by line, as a series of 
  1209.                                   Advisor Script Commands. Such a topic is
  1210.                                   referred to as a script topic. The 
  1211.                                   initial exclamation point is not present
  1212.                                   on the commands contained within a 
  1213.                                   script topic.
  1214.  
  1215. space                             The rest of the command string should be
  1216.                                   executed visibly by the operating system.
  1217.                                   For example, "! DIR" causes the 
  1218.                                   operating system to print the contents 
  1219.                                   of the current directory.
  1220.  
  1221. !                                 The rest of the command string should be
  1222.                                   executed invisibly by the operating 
  1223.                                   system. For example, "!!COPY FILEA FILEB"
  1224.                                   causes the operating system to copy 
  1225.                                   FILEA to FILEB, with no visible output.
  1226.  
  1227. B                                 Back. The application is to redisplay 
  1228.                                   the previously viewed help topic. May be
  1229.                                   ignored if the historical backtrace list
  1230.                                   is exhausted, or if historical backtrace
  1231.                                   is not supported by the application.
  1232.  
  1233. C                                 Context. The rest of the command string 
  1234.                                   is a context string to be retrieved and 
  1235.                                   immediately displayed. (Intended for use
  1236.                                   within script topics.) This is 
  1237.                                   equivalent to a traditional 
  1238.                                   cross-reference that does not begin with
  1239.                                   a "!."
  1240.  
  1241. D                                 Delay. The rest of the command string is
  1242.                                   an ASCII encoded number, which is the 
  1243.                                   number of tenths of a second to delay. 
  1244.                                   When executed, the application simply 
  1245.                                   delays that much time before continuing.
  1246.                                   (Intended for use within script topics.)
  1247.  
  1248. Hs%@AI@%x1%@AE@%,%@AI@%y1%@AE@%, %@AI@%x2%@AE@%,%@AI@%y2%@AE@%                    Highlight. The rest of the command 
  1249.                                   specifies a region, and a highlighting 
  1250.                                   state "s" is replaced by either "E" to 
  1251.                                   enable highlighting on the region, or "D"
  1252.                                   to disable. The highlighted region is 
  1253.                                   from the upper left corner specified by 
  1254.                                   (%@AI@%x1%@AE@%,%@AI@%y1%@AE@%) to the lower right corner 
  1255.                                   specified by (%@AI@%x2%@AE@%,%@AI@%y2%@AE@%). All coordinates 
  1256.                                   are one-based. The actual visual effect 
  1257.                                   of highlighting is left up to the 
  1258.                                   application; however, reverse video is 
  1259.                                   the commonly accepted result.
  1260.  
  1261. K                                 Wait for any keystroke before proceeding.
  1262.  
  1263. K%@AI@%key%@AE@%                              Wait for specific keystroke before 
  1264.                                   proceeding; "key" is replaced by the key
  1265.                                   name. Beep until correct key is entered.
  1266.  
  1267. K%@AI@%key text%@AE@%                         Wait for specific keystroke before 
  1268.                                   proceeding; "key" is replaced by the key
  1269.                                   name. Display "text" if wrong key is 
  1270.                                   entered.
  1271.  
  1272. M%@AI@%text%@AE@%                             Mark. Position current topic such that 
  1273.                                   the line marked by "text" is the first 
  1274.                                   line displayed. (See topic commands for 
  1275.                                   a description of marked text.)
  1276.  
  1277. P%@AI@%text text%@AE@%                        Position. Combination of %@AB@%.context%@AE@% and %@AB@%%@AE@%
  1278.                                   %@AB@%.mark%@AE@% commands. The second "text" string
  1279.                                   is a context looked up and immediately 
  1280.                                   displayed. The first "text" string is a 
  1281.                                   mark at which the display of the topic 
  1282.                                   should begin.
  1283.  
  1284. b                                 Specific to Basic.
  1285.  
  1286. c                                 Specific to C.
  1287.  
  1288. CQ.HB                             Used in Microsoft QuickC(R) version 2.0.
  1289.                                   Indicates that the previously viewed 
  1290.                                   help topic should be redisplayed. 
  1291.                                   (Executes the QuickC version 2.0 "Help 
  1292.                                   Back" command.) This is equivalent to 
  1293.                                   the Advisor Script Command "back" listed
  1294.                                   above, and should also be supported by 
  1295.                                   applications requiring compatibility 
  1296.                                   with C and QuickC help files.
  1297.  
  1298. d                                 Specific to the Microsoft CodeView(R) 
  1299.                                   debugger.
  1300.  
  1301. m                                 The command is specific to the Microsoft
  1302.                                   Editor and/or Programmer's WorkBench 
  1303.                                   (PWB). The command is an editor macro 
  1304.                                   string, which is executed.
  1305.  
  1306. q                                 Specific to the QuickHelp utility.
  1307.  
  1308. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1309.  
  1310. %@TE: 107  6454 02 34 42 @%
  1311.  
  1312. %@NL@%
  1313. %@2@%%@CR:C6A00020008 @%%@AB@%2.5  Context Conventions%@AE@%%@EH@%%@NL@%
  1314. %@NL@%
  1315. Certain contexts are defined by convention across multiple product lines.
  1316. The intent is that multiple products can access the same types of help in
  1317. the same manner, while also providing mechanisms for truly product-specific
  1318. help to be readily identified as such.  %@NL@%
  1319. %@NL@%
  1320. Constructed context strings are kept small, to avoid unnecessary growth of
  1321. the context string table in each help file. In addition, many utilities
  1322. using the help system will display the context strings associated with help
  1323. topics. These conventions also define characteristics which allow such
  1324. utilities to present more intelligent information.  %@NL@%
  1325. %@NL@%
  1326. %@NL@%
  1327. %@3@%%@CR:C6A00020009 @%%@AB@%2.5.1  Contexts Covered by Convention%@AE@%%@EH@%%@NL@%
  1328. %@NL@%
  1329. Context strings beginning with "x." (where "x" is an arbitrary character,
  1330. and "." is a period) are defined to be "internal" or "constructed" help
  1331. context strings. They are unlikely to be explicitly requested, and you may
  1332. in fact be prevented from entering contexts of this form.  %@NL@%
  1333. %@NL@%
  1334. The following "lead" characters are defined:  %@NL@%
  1335. %@NL@%
  1336. %@AB@%Character%@AE@%                         %@AB@%Definition%@AE@%
  1337. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1338. h                                 Generic help. Prefixes miscellaneous 
  1339.                                   help contexts that may be constructed or
  1340.                                   otherwise hidden from the user. For 
  1341.                                   example, a "contents" menu item would 
  1342.                                   cause a reference to "h.contents."
  1343.  
  1344. m                                 Menu items. Contexts that relate to 
  1345.                                   product menu items are further defined 
  1346.                                   by their accelerator keys (for example, 
  1347.                                   the Open selection on the File menu is 
  1348.                                   referenced by "m.f.o").
  1349.  
  1350. d                                 Dialogs. Dialogs are assigned a number, 
  1351.                                   and the help context string is 
  1352.                                   constructed by "d." and the ASCII text 
  1353.                                   number (for example, "d.12").
  1354.  
  1355. e                                 Error numbers. Products that support the
  1356.                                   uniform error numbering scheme used 
  1357.                                   within languages would reference those 
  1358.                                   by prefixing the error number with "e." 
  1359.                                   (for example, "e.c1234").
  1360.  
  1361. !                                 Indicates a cross-reference command, as 
  1362.                                   defined in Table 2.2.
  1363.  
  1364. %@NL@%
  1365. %@3@%%@CR:C6A00020010 @%%@AB@%2.5.2  Required Contexts%@AE@%%@EH@%%@NL@%
  1366. %@NL@%
  1367. The following contexts should be provided in all help files:  %@NL@%
  1368. %@NL@%
  1369. %@AB@%Context%@AE@%                           %@AB@%Description%@AE@%
  1370. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1371. h.default                         This is the "most-default" help screen, 
  1372.                                   generally displayed in response to 
  1373.                                   pressing F1 at the "top level" in most 
  1374.                                   applications.
  1375.  
  1376. h.notfound                        This is the help-text applications 
  1377.                                   display when a search for a particular 
  1378.                                   context fails. Can be an index, topical 
  1379.                                   list, or general help. Applications may 
  1380.                                   alternately present error messages when 
  1381.                                   help cannot be found.
  1382.  
  1383. h.pg1                             Indicates the help text that is 
  1384.                                   logically the first "page" in the file. 
  1385.                                   Used by some applications in response to
  1386.                                   a "go to the beginning" request in help 
  1387.                                   manipulation.
  1388.  
  1389. h.pg$                             Indicates the help text which is 
  1390.                                   logically the last "page" in the file. 
  1391.                                   This is used by some applications in 
  1392.                                   response to a "go to the end" request in
  1393.                                   help manipulation.
  1394.  
  1395. %@NL@%
  1396. %@3@%%@CR:C6A00020011 @%%@AB@%2.5.3  Recommended Contexts%@AE@%%@EH@%%@NL@%
  1397. %@NL@%
  1398. The following contexts are not mandatory, but if used, should be of the
  1399. following defined forms:  %@NL@%
  1400. %@NL@%
  1401. %@AB@%Context%@AE@%                           %@AB@%Description%@AE@%
  1402. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1403. h.contents                        Help-file table of contents. In addition,
  1404.                                   the context string contents may also be 
  1405.                                   used by itself to allow direct reference
  1406.                                   by the user.
  1407.  
  1408. h.index                           Help-file index. In addition, the 
  1409.                                   context string index may also be used by
  1410.                                   itself to allow direct reference by the 
  1411.                                   user.
  1412.  
  1413. h.pg#                             Specific page number. "#" is replaced 
  1414.                                   with the page number of interest.
  1415.  
  1416. Care should be taken to maintain "common" usage when writing help that is
  1417. referenced from context strings such as these, since other applications may
  1418. access them in this manner.  %@NL@%
  1419. %@NL@%
  1420. %@NL@%
  1421. %@3@%%@CR:C6A00020012 @%%@AB@%2.5.4  Product-Specific Contexts%@AE@%%@EH@%%@NL@%
  1422. %@NL@%
  1423. When multiple products use the same naming mechanisms for the same
  1424. operations, confusion can arise when one product help file is made available
  1425. for use by another product. For example, search order might be the only
  1426. factor determining which product's help appears when a request for help is
  1427. made from a File:Open menu and multiple product help files are available.
  1428. All products would reference the context string "m.f.o" by convention, and
  1429. it would be in both help files.  %@NL@%
  1430. %@NL@%
  1431. As defined elsewhere, contexts can be prefixed by a file name. The original
  1432. help-file file names are also embedded in each help file, and preserved
  1433. regardless of what you rename the help file. This allows product-specific
  1434. contexts to be dereferenced by prefixing the original help-file name to the
  1435. context string.  %@NL@%
  1436. %@NL@%
  1437. For example, in PWB, QB.HLP, QC.HLP, and PWB.HLP are available. All have a
  1438. "m.f.o" context entry. When you request help on the File:Open menu, however,
  1439. PWB prefixes that string with "pwb.hlp!", creating "pwb.hlp!m.f.o" which
  1440. completely specifies that the help comes from the PWB help file.  %@NL@%
  1441. %@NL@%
  1442. %@NL@%
  1443. %@2@%%@CR:C6A00020013 @%%@AB@%2.6  Hierarchical Contexts%@AE@%%@EH@%%@NL@%
  1444. %@NL@%
  1445. Hierarchical context strings should be manufactured by concatenating context
  1446. strings with period separators to form longer context strings. For example:
  1447. %@NL@%
  1448. %@NL@%
  1449. %@AS@%  cc.error.c1876%@AE@%%@NL@%
  1450. %@NL@%
  1451. could represent help relating to a C compiler error number c1876. The
  1452. application could manufacture a help look-up request based on its current
  1453. state, such as currently viewing errors on a C compiler, where c1876 is the
  1454. currently viewed error.  %@NL@%
  1455. %@NL@%
  1456. For space reasons, it may also be advisable to shorten contexts as much as
  1457. possible, when the context string will never be seen by the user. This is
  1458. the shortened example:  %@NL@%
  1459. %@NL@%
  1460. %@AS@%  c.e.1876%@AE@%%@NL@%
  1461. %@NL@%
  1462. It is important to note that the help engine does not infer anything from
  1463. the fact that the context string may be viewed elsewhere as a concatenated
  1464. hierarchy. Only a help topic whose entire context string matches exactly
  1465. will correspond to such a request.  %@NL@%
  1466. %@NL@%
  1467. %@NL@%
  1468. %@2@%%@CR:C6A00020014 @%%@AB@%2.7  Environment Support%@AE@%%@EH@%%@NL@%
  1469. %@NL@%
  1470. File names used within the help engine may include explicit path
  1471. specifications or explicit environment variable specifications, or it may
  1472. default to being opened on the PATH environment variable. The support for
  1473. each of these is provided by the client application. For example:  %@NL@%
  1474. %@NL@%
  1475. %@AB@%Path%@AE@%                              %@AB@%Description%@AE@%
  1476. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1477. %@AS@%c:\lib\qb.hlp%@AE@%                     Explicit path
  1478.  
  1479. %@AS@%$INCLUDE:qb.hlp%@AE@%                   Explicit environment variable
  1480.  
  1481. %@AS@%qb.hlp%@AE@%                            Implicit PATH search
  1482.  
  1483. Applications may also elect to support the HELPFILES environment variable
  1484. that specifies the help files to be used. When used, the syntax of this
  1485. variable should be  %@NL@%
  1486. %@NL@%
  1487. %@AS@%  SET HELPFILES=QB.HLP;QC.HLP;CV.HLP%@AE@%%@NL@%
  1488. %@NL@%
  1489. This example instructs applications to use the three help files, QB.HLP,
  1490. QC.HLP, and CV.HLP, in that order. This may be overridden within the
  1491. application.  %@NL@%
  1492. %@NL@%
  1493. %@NL@%
  1494. %@NL@%
  1495. %@NL@%
  1496. %@NL@%
  1497. %@NL@%
  1498. %@CR:C6A00030001 @%%@1@%%@AB@%Chapter 3  The HELPMAKE Program%@AE@%%@EH@%%@NL@%
  1499. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1500. %@NL@%
  1501. HELPMAKE is a general support program that manipulates help files. It can
  1502. dump a help file to RTF text format for editing, and compress an RTF,
  1503. QuickHelp, or modified ASCII formatted text file into help-file format.  %@NL@%
  1504. %@NL@%
  1505. HELPMAKE is a distributed utility; further documentation is available in the
  1506. C 6.0 Compiler or Microsoft QuickC 2.0 Compiler products. Use HELPMAKE when
  1507. you want to modify Microsoft-supplied help or to compress user-supplied help
  1508. files.  %@NL@%
  1509. %@NL@%
  1510. %@NL@%
  1511. %@2@%%@CR:C6A00030002 @%%@AB@%3.1  HELPMAKE Options%@AE@%%@EH@%%@NL@%
  1512. %@NL@%
  1513. The syntax for HELPMAKE is as follows:  %@NL@%
  1514. %@NL@%
  1515. %@AS@%  HELPMAKE { /E[n] [/Ac] [/C] [/L] [/N name] [/Sn] [/Wwidth] 
  1516. %@AS@%  | /D[U|S] | /H }
  1517. %@AS@%              [/T][ [/V[n» [/Odestfile] sourcefile(s)%@AE@%%@NL@%
  1518. %@NL@%
  1519. At least one source file and either the "/E" (for Encode) or "/D" (for
  1520. Decode) must be present.  %@NL@%
  1521. %@NL@%
  1522. %@NL@%
  1523. %@3@%%@CR:C6A00030003 @%%@AB@%3.1.1  Encoding Options%@AE@%%@EH@%%@NL@%
  1524. %@NL@%
  1525. When encoding (/E) to create a help file, the /O parameter must be present.
  1526. Multiple source files may be specified, including wild cards.  %@NL@%
  1527. %@NL@%
  1528. The optional %@AI@%n%@AE@% parameter on /E indicates the amount of compression to take
  1529. place. Successive powers of two indicate various compression techniques to
  1530. use, as in the following list:  %@NL@%
  1531. %@NL@%
  1532. %@TH:   7   372 02 22 54 @%
  1533. Parameter             Technique
  1534. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1535. 0                     No compression
  1536. 1                     Run-length compression
  1537. 2                     Keyword compression
  1538. 4                     Extended keyword compression
  1539. 8                     Huffman compression
  1540. %@TE:   7   372 02 22 54 @%
  1541.  
  1542. For example, to use both run-length and keyword compression, specify /E3.
  1543. The default is all compression-selected.  %@NL@%
  1544. %@NL@%
  1545. Mixing the types of compression allows HELPMAKE to be maximally fast while
  1546. developing help files, or at the user's option when used in the field.  %@NL@%
  1547. %@NL@%
  1548. %@NL@%
  1549. %@3@%%@CR:C6A00030004 @%%@AB@%3.1.2  Other HELPMAKE Options%@AE@%%@EH@%%@NL@%
  1550. %@NL@%
  1551. Other options that apply when encoding are listed below:  %@NL@%
  1552. %@NL@%
  1553. %@TH:  92  3508 02 08 34 34 @%
  1554. Option  Action
  1555. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1556. /A      Specifies the 
  1557.         application-specific control 
  1558.         character 
  1559.         for the file. This is used with 
  1560.         the %@AB@%HelpGetCells%@AE@%, %@AB@%HelpGetLine%@AE@%, 
  1561.         and %@AB@%HelpGetLineAttr%@AE@% calls to 
  1562.         ignore lines that begin with 
  1563.         this character. This feature 
  1564.         allows you to embed control 
  1565.         information into the help topics.
  1566.         Such information can then be 
  1567.         automatically stripped out by 
  1568.         other applications without 
  1569.         determining the format.
  1570.  
  1571. /C      Indicates that the context 
  1572.         strings for this help file are 
  1573.         case sensitive. All look-ups at 
  1574.         run time are case sensitive if 
  1575.         this switch has been set.
  1576.  
  1577. /W      When specified, indicates the 
  1578.         fixed width of the resulting 
  1579.         help text, in characters. The 
  1580.         default value is 76. When 
  1581.         HELPMAKE is run to encode RTF 
  1582.         source, HELPMAKE automatically 
  1583.         formats the text to this width. 
  1584.         When used with QuickHelp or 
  1585.         Minimal ASCII, lines are 
  1586.         truncated to this width.
  1587.  
  1588. /L      Locks the generated file so that
  1589.         it cannot be decoded by HELPMAKE
  1590.         later.
  1591.  
  1592. /S%@AI@%n%@AE@%     Specifies the type of input 
  1593.         file:
  1594.  
  1595.         Option                            File Type
  1596.  
  1597.         1                                 RTF ASCII
  1598.  
  1599.         2                                 QuickHelp ASCII (default)
  1600.  
  1601.         3                                 Minimally formatted (>) ASCII
  1602.  
  1603. /N      Specifies a "name" or title for 
  1604.         the help files, subsequently 
  1605.         available to applications via 
  1606.         the HelpGetInfo interface. 
  1607.         Multiple word titles may be 
  1608.         enclosed in quotes.
  1609.  
  1610. /D      Decodes a help file. The 
  1611.         destination file need not be 
  1612.         present, in which case the help 
  1613.         file is decoded to standard 
  1614.         output. Help files are decoded 
  1615.         into QuickHelp ASCII format.
  1616.  
  1617.         Option                            Effect
  1618.  
  1619.         /DS                               "Decode split." Splits a 
  1620.                                           concatenated help file back into
  1621.                                           its component files. No actual 
  1622.                                           decoding is done, as the 
  1623.                                           resulting help files, written to
  1624.                                           their original file names (as 
  1625.                                           encoded in each help-file header)
  1626.                                           remain compressed.
  1627.  
  1628.         /DU                               "Decode unformatted." Creates a 
  1629.                                           plain ASCII text file from a 
  1630.                                           help file. All formatting 
  1631.                                           information, such as color and 
  1632.                                           cross-referencing, is lost 
  1633.                                           except for %@AB@%.context%@AE@% statements.
  1634.  
  1635. /T      Translates between topic 
  1636.         commands in "English" 
  1637.         dot-command form, and the terser
  1638.         form. See the section in Chapter
  1639.         2 on topic commands for more 
  1640.         details. This switch is valid in
  1641.         both encoding and decoding.
  1642.  
  1643. /H      Causes HELPMAKE to display a 
  1644.         summary of usage and exit.
  1645.  
  1646. %@TE:  92  3508 02 08 34 34 @%
  1647.  
  1648. %@NL@%
  1649. %@NL@%
  1650. %@NL@%
  1651. %@NL@%
  1652. %@NL@%
  1653. %@CR:C6A00040001 @%%@1@%%@AB@%Chapter 4  Applications Interface%@AE@%%@EH@%%@NL@%
  1654. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1655. %@NL@%
  1656. The embedded help library provides the following functionality to client
  1657. applications:  %@NL@%
  1658. %@NL@%
  1659. %@NL@%
  1660.   ■   Help-file location and multiple file management (Open, Close)%@NL@%
  1661. %@NL@%
  1662.   ■   Context look-up and help topic retrieval%@NL@%
  1663. %@NL@%
  1664.   ■   Browsing functions (Next, Back)%@NL@%
  1665. %@NL@%
  1666.   ■   Display utilities%@NL@%
  1667. %@NL@%
  1668. %@NL@%
  1669. %@NL@%
  1670. %@2@%%@CR:C6A00040002 @%%@AB@%4.1  Defining the Interface%@AE@%%@EH@%%@NL@%
  1671. %@NL@%
  1672. The help "engine" is a library of database tools that control retrieval of
  1673. text based on reference words (context strings), indexes (context numbers),
  1674. or position. The applications interface is to this help engine. This section
  1675. defines the help engine's procedural interface. The engine handles the
  1676. decompression of the help file and physical file I/O.  %@NL@%
  1677. %@NL@%
  1678. %@AB@%Term%@AE@%                              %@AB@%Definition%@AE@%
  1679. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1680. Convention                        All routines are FAR PASCAL.
  1681.  
  1682. Pointers                          All pointers are FAR.
  1683.  
  1684. "nc" type                         An unsigned long "context number." All 
  1685.                                   referenceable keywords or phrases 
  1686.                                   (contexts) map to context numbers. A 
  1687.                                   context number identifies both the 
  1688.                                   source help file and the help context 
  1689.                                   itself.
  1690.  
  1691. "f" type                          A Boolean.
  1692.  
  1693. "PB" type                         A "pointer to a buffer." In most 
  1694.                                   versions of the help engine, this is a 
  1695.                                   far pointer (%@AB@%void far *%@AE@%). In 
  1696.                                   handle-based versions of the engine, 
  1697.                                   this is a long, containing a memory 
  1698.                                   handle in the upper word, and an offset 
  1699.                                   in the lower word. The memory handle is 
  1700.                                   passed to %@AB@%HelpLock%@AE@% for dereferencing, 
  1701.                                   and the offset is then added to the 
  1702.                                   result to form the actual physical 
  1703.                                   memory address used by the help engine.
  1704.  
  1705. %@NL@%
  1706. %@2@%%@CR:C6A00040003 @%%@AB@%4.2  Base File Management%@AE@%%@EH@%%@NL@%
  1707. %@NL@%
  1708. %@NL@%
  1709. %@4@%%@AB@%HelpOpen%@AE@%%@EH@%%@NL@%
  1710. %@NL@%
  1711. %@AS@%  nc pascal far HelpOpen (char far *lpszName)%@AE@%%@NL@%
  1712. %@NL@%
  1713. Given a help-file name, this function opens a help file and returns an
  1714. initial context, or an error code on failure. Up to 25 help files can be
  1715. open at a time. The application-provided routine %@AB@%OpenFileOnPath%@AE@% is used to
  1716. open the file; typically that routine uses the PATH environment variable to
  1717. locate the file.  %@NL@%
  1718. %@NL@%
  1719. The value returned by %@AB@%HelpOpen%@AE@%, if less than HELPERR_MAX (defined in
  1720. HELP.H), is an error code that displays the reason the file could not be
  1721. opened.  %@NL@%
  1722. %@NL@%
  1723. Concatenated help files count against the upper help-file limit once for
  1724. each concatenated portion. The initial context returned is the context for
  1725. the first physical topic in the help file. %@AB@%HelpOpen%@AE@% itself does not attempt
  1726. to automatically append any extension to the file name.  %@NL@%
  1727. %@NL@%
  1728. %@NL@%
  1729. %@4@%%@AB@%HelpClose%@AE@%%@EH@%%@NL@%
  1730. %@NL@%
  1731. %@AS@%  void pascal far HelpClose (nc ncCur)%@AE@%%@NL@%
  1732. %@NL@%
  1733. Given a context, this function closes the help file associated with it and
  1734. deallocates all associated memory. Calling with %@AS@% ncCur %@AE@% of zero closes all
  1735. open help files.  %@NL@%
  1736. %@NL@%
  1737. %@NL@%
  1738. %@2@%%@CR:C6A00040004 @%%@AB@%4.3  Context String Management%@AE@%%@EH@%%@NL@%
  1739. %@NL@%
  1740. %@NL@%
  1741. %@4@%%@AB@%HelpNc%@AE@%%@EH@%%@NL@%
  1742. %@NL@%
  1743. %@AS@%  nc pascal far HelpNc (char far *lpszContext, nc ncInitial)%@AE@%%@NL@%
  1744. %@NL@%
  1745. Given a pointer to a context string, this function looks up the word and
  1746. returns its nonzero context number. This can be used as a Boolean, returning
  1747. FALSE if a help entry does not exist for that context string.  %@NL@%
  1748. %@NL@%
  1749. Here, %@AS@% ncInitial %@AE@% is the context from which the search for the help topic
  1750. begins. This context references a particular help file and help topic, and
  1751. the search commences there.  %@NL@%
  1752. %@NL@%
  1753. Where concatenated help files are used and %@AS@% ncInitial %@AE@% references something
  1754. other than the first of the concatenated files, those preceding it are not
  1755. searched. Similarly, if %@AS@% ncInitial %@AE@% references a help context in the middle
  1756. of the help file, those contexts preceding it will not be searched.  %@NL@%
  1757. %@NL@%
  1758. The initial context returned by %@AB@%HelpOpen%@AE@% (which references the first topic
  1759. in the file), should be saved and used for this call.  %@NL@%
  1760. %@NL@%
  1761. Context strings are of the form  %@NL@%
  1762. %@NL@%
  1763. %@AS@%  [filename!][context]%@AE@%%@NL@%
  1764. %@NL@%
  1765. where %@AS@% filename %@AE@% is the help file containing the cross-reference and allows
  1766. cross-references to cross help files. The help file is located at reference
  1767. time by using %@AB@%HelpOpen%@AE@%, and thus is located on the PATH; %@AS@% context %@AE@% is the
  1768. context string to be referenced. If no context is present, then %@AS@% filename! %@AE@%
  1769. must be present, and the file is assumed to be unformatted ASCII and to
  1770. contain the entire topic.  %@NL@%
  1771. %@NL@%
  1772. Context strings may also be of an internal form returned by %@AB@%HelpXref%@AE@%. See
  1773. %@AB@%HelpXref%@AE@% in Section 4.7 for more details.  %@NL@%
  1774. %@NL@%
  1775. %@NL@%
  1776. %@4@%%@AB@%HelpNcCmp%@AE@%%@EH@%%@NL@%
  1777. %@NL@%
  1778. %@AS@%  nc pascal far HelpNcCmp (char far *fpszContext,nc ncInitial,
  1779. %@AS@%                           f (pascal far *lpfnCmp) (uchar far *,
  1780. %@AS@%                              uchar far *, ushort, f, f));%@AE@%%@NL@%
  1781. %@NL@%
  1782. Like %@AB@%HelpNc%@AE@%, when given an ASCII string, this function determines the
  1783. context number of that string. %@AB@%HelpNcCmp%@AE@% uses a caller-supplied comparison
  1784. routine; %@AS@%lpfnCmp %@AE@% is a far pointer to the comparison routine that takes the
  1785. following parameters:  %@NL@%
  1786. %@NL@%
  1787. %@AB@%Parameter%@AE@%                         %@AB@%Description%@AE@%
  1788. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1789. %@AS@%fpsz1%@AE@%                             Far pointer to string 1. Normally the 
  1790.                                   constant string being "looked up."
  1791.  
  1792. %@AS@%fpsz2%@AE@%                             Far pointer to string 2. This is usually
  1793.                                   a string in the help file's string table
  1794.                                   (compressed) or an actual segment of the
  1795.                                   help file (formatted ASCII) being 
  1796.                                   searched.
  1797.  
  1798. %@AS@%cbCmp%@AE@%                             Maximum number of bytes to compare. 
  1799.                                   Normally the strings above are 
  1800.                                   zero-terminated, and this value is 
  1801.                                   passed as 255. In ASCII files, this 
  1802.                                   value may represent the number of bytes 
  1803.                                   in the second string actually being 
  1804.                                   compared. This value can be used as a 
  1805.                                   max comparison count, regardless of file
  1806.                                   type.
  1807.  
  1808. %@AS@%fCase%@AE@%                             TRUE if search is to be case insensitive.
  1809.                                   This is the setting of the case 
  1810.                                   sensitivity flag in the help file being 
  1811.                                   processed.
  1812.  
  1813. %@AS@%fTerm%@AE@%                             TRUE if special termination processing 
  1814.                                   is allowed. In this case, if any white 
  1815.                                   space is encountered in the second 
  1816.                                   string when NULL is found in the first, 
  1817.                                   a match is declared.
  1818.  
  1819. %@NL@%
  1820. %@4@%%@AB@%HelpSzContext%@AE@%%@EH@%%@NL@%
  1821. %@NL@%
  1822. %@AS@%  f pascal far HelpSzContext (char far *pBuffer, nc ncCur)%@AE@%%@NL@%
  1823. %@NL@%
  1824. Given a context and a pointer to a buffer, this function places the first
  1825. context string associated with that help topic in the buffer and returns
  1826. TRUE on success.  %@NL@%
  1827. %@NL@%
  1828. The format of the string is as described for %@AB@%HelpNc%@AE@%, except that the
  1829. file-name part is always present (but does not include any leading path).
  1830. The file-name part references the original file name created by HELPMAKE,
  1831. not the current open file name if the help file was renamed, or if the file
  1832. was concatenated with other help files.  %@NL@%
  1833. %@NL@%
  1834. %@NL@%
  1835. %@2@%%@CR:C6A00040005 @%%@AB@%4.4  Topic Look-Up and Decompression%@AE@%%@EH@%%@NL@%
  1836. %@NL@%
  1837. %@NL@%
  1838. %@4@%%@AB@%HelpNcCb%@AE@%%@EH@%%@NL@%
  1839. %@NL@%
  1840. %@AS@%  unsigned pascal far HelpNcCb (nc nContext)%@AE@%%@NL@%
  1841. %@NL@%
  1842. Given a context number, this function returns the size in bytes of the
  1843. compressed topic.  %@NL@%
  1844. %@NL@%
  1845. %@NL@%
  1846. %@4@%%@AB@%HelpLook%@AE@%%@EH@%%@NL@%
  1847. %@NL@%
  1848. %@AS@%  unsigned pascal far HelpLook (nc nContext, PB pbDest)%@AE@%%@NL@%
  1849. %@NL@%
  1850. Given a context number, this function places the topic text into the passed
  1851. buffer, which must be of sufficient size. %@AB@%HelpLook%@AE@% returns count of bytes in
  1852. an uncompressed topic or zero on error.  %@NL@%
  1853. %@NL@%
  1854. %@NL@%
  1855. %@4@%%@AB@%HelpDecomp%@AE@%%@EH@%%@NL@%
  1856. %@NL@%
  1857. %@AS@%  f pascal far HelpDecomp (PB pbTopic, PB pbDest, nc ncContext)%@AE@%%@NL@%
  1858. %@NL@%
  1859. Given a compressed topic as returned by %@AB@%HelpLook%@AE@% (above) and its context
  1860. number, this function decompresses it into the destination buffer. The
  1861. decompressed text in the destination buffer is prefixed by the following
  1862. topic header structure:  %@NL@%
  1863. %@NL@%
  1864. %@AS@%  typedef struct {
  1865. %@AS@%   uchar appchar;
  1866. %@AS@%   uchar linchar;
  1867. %@AS@%   uchar filetype;
  1868. %@AS@%   ushort reserved[2];
  1869. %@AS@%   } topichdr;%@AE@%%@NL@%
  1870. %@NL@%
  1871. where %@AB@%uchar%@AE@% is defined as follows:  %@NL@%
  1872. %@NL@%
  1873. %@AB@%Character%@AE@%                         %@AB@%Description%@AE@%
  1874. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1875. %@AS@%appchar%@AE@%                           The character specified by the /A switch
  1876.                                   when the help file was created by 
  1877.                                   HELPMAKE.
  1878.  
  1879. %@AS@%linchar%@AE@%                           Line-removal character. Lines beginning 
  1880.                                   with this character are ignored by the %@AB@%%@AE@%
  1881.                                   %@AB@%HelpGet%@AE@% routines described in Section 
  1882.                                   4.6.
  1883.  
  1884. %@AS@%filetype%@AE@%                          The type of file that the topic came 
  1885.                                   from. Values are:
  1886.  
  1887.                                   0           Unformatted ASCII
  1888.  
  1889.                                   1           Minimally formatted ASCII
  1890.  
  1891.                                   3           Fully compressed
  1892.  
  1893. %@AS@%reserved%@AE@%                          Reserved for use by the %@AB@%HelpGet%@AE@% routines
  1894.                                   (see Section 4.6).
  1895.  
  1896. Access to this data structure is currently present for compatibility only
  1897. (see %@AB@%HelpCtl%@AE@% for manipulation of the %@AS@% linchar %@AE@% byte). %@AB@%HelpDecomp%@AE@% returns
  1898. TRUE on error.  %@NL@%
  1899. %@NL@%
  1900. %@NL@%
  1901. %@2@%%@CR:C6A00040006 @%%@AB@%4.5  Context Maneuvering%@AE@%%@EH@%%@NL@%
  1902. %@NL@%
  1903. %@NL@%
  1904. %@4@%%@AB@%HelpNcNext%@AE@%%@EH@%%@NL@%
  1905. %@NL@%
  1906. %@AS@%  nc pascal far HelpNcNext (nc ncCur)%@AE@%%@NL@%
  1907. %@NL@%
  1908. Given a context, this function returns the context number for the next help
  1909. topic, or NULL on catastrophic failure.  %@NL@%
  1910. %@NL@%
  1911. %@NL@%
  1912. %@4@%%@AB@%HelpNcPrev%@AE@%%@EH@%%@NL@%
  1913. %@NL@%
  1914. %@AS@%  nc pascal far HelpNcPrev (nc ncCur)%@AE@%%@NL@%
  1915. %@NL@%
  1916. Given a current context, this function returns the context number for the
  1917. "physically previous" help topic in the help file, or NULL on catastrophic
  1918. failure.  %@NL@%
  1919. %@NL@%
  1920. This function is present for those applications that present a "previous"
  1921. function in a physical, rather than historical, manner.  %@NL@%
  1922. %@NL@%
  1923. %@NL@%
  1924. %@4@%%@AB@%HelpNcRecord%@AE@%%@EH@%%@NL@%
  1925. %@NL@%
  1926. %@AS@%  void pascal far HelpNcRecord (nc ncCur)%@AE@%%@NL@%
  1927. %@NL@%
  1928. The %@AB@%HelpNcRecord%@AE@% function records a context number in the help engine
  1929. backtrace list. Numbers are not automatically recorded by the help engine,
  1930. but must be explicitly recorded by client applications. This routine and
  1931. %@AB@%HelpNcBack%@AE@% (below) maintain a Last In First Out (LIFO) list of context
  1932. numbers used to maintain the historical backtrace list.  %@NL@%
  1933. %@NL@%
  1934. %@NL@%
  1935. %@4@%%@AB@%HelpNcBack%@AE@%%@EH@%%@NL@%
  1936. %@NL@%
  1937. %@AS@%  nc pascal far HelpNcBack ()%@AE@%%@NL@%
  1938. %@NL@%
  1939. Given a current context, this function returns the context number for the
  1940. "historically previous" help topic. These are the context numbers previously
  1941. saved by calls to %@AB@%HelpNcRecord%@AE@%.  %@NL@%
  1942. %@NL@%
  1943. %@NL@%
  1944. %@4@%%@AB@%HelpNcUniq%@AE@%%@EH@%%@NL@%
  1945. %@NL@%
  1946. %@AS@%  nc pascal far HelpNcUniq (nc ncCur);%@AE@%%@NL@%
  1947. %@NL@%
  1948. The %@AB@%HelpNcUniq%@AE@% function transforms a context number into a context number
  1949. guaranteed unique for each topic in the file. That is, given that many
  1950. context strings (and hence many context numbers) may map to the same topic,
  1951. %@AB@%HelpNcUniq%@AE@% transforms all the context numbers that refer to a particular
  1952. topic into the same context number. The information on the context string
  1953. originally used is lost. This function returns NULL on any error.  %@NL@%
  1954. %@NL@%
  1955. %@NL@%
  1956. %@2@%%@CR:C6A00040007 @%%@AB@%4.6  Topic Display%@AE@%%@EH@%%@NL@%
  1957. %@NL@%
  1958. Help text returned by the help engine contains encoding information. The
  1959. following routines are provided to aid interpretation.  %@NL@%
  1960. %@NL@%
  1961. %@NL@%
  1962. %@4@%%@AB@%HelpGetCells%@AE@%%@EH@%%@NL@%
  1963. %@NL@%
  1964. %@AS@%  int pascal far HelpGetCells (ushort ln ,int cbMax , PB pbDst, 
  1965. %@AS@%  
  1966. %@AS@%                               uchar far *pbTopic, uchar far *prgAttr)%@AE@%%@NL@%
  1967. %@NL@%
  1968. %@AB@%HelpGetCells%@AE@% interprets the help file's stored format and returns character
  1969. and attribute information a line at a time.  %@NL@%
  1970. %@NL@%
  1971. %@AB@%Character%@AE@%                         %@AB@%Description%@AE@%
  1972. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1973. %@AS@%ln%@AE@%                                The one-based line number to return. 
  1974.  
  1975. %@AS@%cbMax%@AE@%                             The maximum number of bytes to transfer.
  1976.  
  1977. %@AS@%pbDst%@AE@%                             A pointer to the destination. 
  1978.  
  1979. %@AS@%pbTopic%@AE@%                           A pointer to the topic text. 
  1980.  
  1981. %@AS@%prgAttr%@AE@%                           A pointer to array of character 
  1982.                                   attributes. Internal attribute indexes 
  1983.                                   are mapped to physical attributes 
  1984.                                   through this table.
  1985.  
  1986. Returns number of characters transferred, or -1 if that line does not exist.
  1987. %@NL@%
  1988. %@NL@%
  1989. %@NL@%
  1990. %@4@%%@AB@%HelpGetLine%@AE@%%@EH@%%@NL@%
  1991. %@NL@%
  1992. %@AS@%  ushort pascal far HelpGetLine (ushort ln, ushort cbMax,
  1993. %@AS@%                                char far *pszDst, PB pbTopic);%@AE@%%@NL@%
  1994. %@NL@%
  1995. This function interprets the format of a topic previously read and
  1996. decompressed and returns ASCII text a line at a time.  %@NL@%
  1997. %@NL@%
  1998. The %@AB@%HelpGetLine%@AE@% function places characters into %@AB@%pszDst%@AE@% up to %@AB@%cbMax-1%@AE@% for the
  1999. line specified by %@AI@%ln%@AE@% in the help topic pointed to by %@AB@%pbTopic%@AE@%. The line is
  2000. zeroterminated and the function returns the number of characters placed in
  2001. buffer.  %@NL@%
  2002. %@NL@%
  2003. %@NL@%
  2004. %@4@%%@AB@%HelpGetLineAttr%@AE@%%@EH@%%@NL@%
  2005. %@NL@%
  2006. %@AS@%  ushort pascal far HelpGetLineAttr (ushort ln, ushort cbMax,
  2007. %@AS@%                                     LINEATTR far *rgAttrs,
  2008. %@AS@%                                     PB pbTopic);%@AE@%%@NL@%
  2009. %@NL@%
  2010. This function fills %@AI@%rgAttrs%@AE@% buffer with line attributes for a line defined
  2011. by %@AI@%ln%@AE@%. A line attribute is a word containing an attribute index followed by
  2012. count of characters of the attribute.  %@NL@%
  2013. %@NL@%
  2014. %@AS@%  LineAttr      STRUC
  2015. %@AS@%      LA_attr   dw       ?      ;color attribute
  2016. %@AS@%      LA_cb     dw       ?      ;count of chars
  2017. %@AS@%                                ;with attribute
  2018. %@AS@%  LineAttr      ENDS%@AE@%%@NL@%
  2019. %@NL@%
  2020. The array %@AI@%rgAttr%@AE@% may be terminated by an attribute of FFFF. Alternatively,
  2021. if %@AI@%cb%@AE@% is FFFF, the attribute is used for the rest of the line. %@AI@%cbMax%@AE@% is the
  2022. maximum size for the %@AI@%rgAttr%@AE@% buffer, and the function returns 0 if the buffer
  2023. is too small for attributes; otherwise, it returns nonzero.  %@NL@%
  2024. %@NL@%
  2025. %@NL@%
  2026. %@4@%%@AB@%HelpcLines%@AE@%%@EH@%%@NL@%
  2027. %@NL@%
  2028. %@AS@%  int pascal far HelpcLines (PB pbTopic);%@AE@%%@NL@%
  2029. %@NL@%
  2030. This function returns the number of text lines in the topic pointed to by
  2031. %@AB@%pbTopic%@AE@%.  %@NL@%
  2032. %@NL@%
  2033. %@NL@%
  2034. %@2@%%@CR:C6A00040008 @%%@AB@%4.7  Cross-References%@AE@%%@EH@%%@NL@%
  2035. %@NL@%
  2036. %@NL@%
  2037. %@4@%%@AB@%HelpXRef%@AE@%%@EH@%%@NL@%
  2038. %@NL@%
  2039. %@AS@%  char far * pascal far HelpXRef (PB pbTopic, hotspot far *photspot)%@AE@%%@NL@%
  2040. %@NL@%
  2041. Given a row, column (in the hotspot structure defined below), and topic,
  2042. this function returns a pointer to a cross-reference string. %@AI@%pbTopic%@AE@% is the
  2043. pointer to the topic text, and %@AI@%photspot%@AE@% is a pointer to a hotspot structure
  2044. to update.  %@NL@%
  2045. %@NL@%
  2046. The %@AB@%HelpXRef%@AE@% function returns a far pointer into the topic text of a
  2047. cross-reference string and updates the contents of the hotspot structure. It
  2048. returns NULL if no cross-reference exists for that line.  %@NL@%
  2049. %@NL@%
  2050. A "hotspot" structure defines the position of an embedded cross-reference,
  2051. defined as follows:  %@NL@%
  2052. %@NL@%
  2053. %@AS@%  typedef struct {
  2054. %@AS@%      ushort line;  /* the topic line with an xref  */
  2055. %@AS@%      ushort col;  /* the starting column of xref  */
  2056. %@AS@%      ushort ecol;  /* the ending column of xref  */
  2057. %@AS@%      uchar far *pXref;   /* pointer to xref string  */
  2058. %@AS@%      } hotspot;%@AE@%%@NL@%
  2059. %@NL@%
  2060. ────────────────────────────────────────────────────────────────────────────%@NL@%
  2061. IMPORTANT
  2062.  
  2063. %@AI@%The cross-reference string can take either of two forms: a normal,
  2064. %@AI@%nullterminated ASCII string, or a three-byte data structure whose first byte
  2065. %@AI@%is NULL. It is important that the first byte be checked before copying the
  2066. %@AI@%string, because normal string copy routines will not copy the three-byte
  2067. %@AI@%data structure correctly. (The three-byte data structure is a
  2068. %@AI@%cross-reference to a "local context.")%@AE@%%@NL@%
  2069. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  2070. %@NL@%
  2071. %@NL@%
  2072. %@4@%%@AB@%HelpHlNext%@AE@%%@EH@%%@NL@%
  2073. %@NL@%
  2074. %@AS@%  f pascal far HelpHlNext (int cLead, PB pbTopic,
  2075. %@AS@%                          hotspot far *photspot);%@AE@%%@NL@%
  2076. %@NL@%
  2077. This function locates the next cross-reference in the help topic. Given a
  2078. starting position in the passed hotspot structure, %@AB@%HelpHlNext%@AE@% locates either
  2079. the next physical cross-reference, or the next reference beginning with a
  2080. particular character (case insensitive); it locates either forward or
  2081. backward.  %@NL@%
  2082. %@NL@%
  2083. One of the following can be %@AS@% cLead%@AE@%:  %@NL@%
  2084. %@NL@%
  2085. NULL                              The next hot-link searching forward from
  2086.                                   the specified position is returned.
  2087.  
  2088. -1                                The next hot-link searching backward 
  2089.                                   from the specified position is returned.
  2090.  
  2091. char                              If positive and non-NULL, the next 
  2092.                                   hot-link following the specified 
  2093.                                   position whose on-screen keyword begins 
  2094.                                   with the character %@AS@% cLead %@AE@% is returned (%@AS@%%@AE@%
  2095.                                   %@AS@%cLead %@AE@% must be uppercase).
  2096.  
  2097. -char                             If negative and not -1, the next 
  2098.                                   hot-link before the specified position 
  2099.                                   whose on-screen keyword begins with the 
  2100.                                   character %@AS@% -cLead %@AE@% is returned (%@AS@%cLead%@AE@% 
  2101.                                   must be uppercase).
  2102.  
  2103. Here, %@AS@% pbTopic %@AE@% is a pointer to the topic text; %@AS@% photspot %@AE@% is a pointer to a
  2104. hotspot structure to receive information; %@AS@%line %@AE@% and %@AS@% col %@AE@% indicate a
  2105. starting point.  %@NL@%
  2106. %@NL@%
  2107. The %@AB@%HelpHlNext%@AE@% function returns TRUE if a cross-reference is found or if a
  2108. hotspot structure is updated; it returns NULL if no such cross-reference.  %@NL@%
  2109. %@NL@%
  2110. %@NL@%
  2111. %@2@%%@CR:C6A00040009 @%%@AB@%4.8  Utility%@AE@%%@EH@%%@NL@%
  2112. %@NL@%
  2113. %@NL@%
  2114. %@4@%%@AB@%HelpCtl%@AE@%%@EH@%%@NL@%
  2115. %@NL@%
  2116. %@AS@%  void pascal far HelpCtl (PB pbTopic, flag);%@AE@%%@NL@%
  2117. %@NL@%
  2118. Here, %@AS@% pbTopic %@AE@% is a pointer to the topic text about to be retrieved. If the
  2119. flag is TRUE, %@AB@%HelpGetLine%@AE@% (and family) subsequently returns all lines of
  2120. text in the topic. If the flag is FALSE, %@AB@%HelpGetLine%@AE@% returns only those
  2121. lines that do not begin with the application-specific control character, as
  2122. specified by the /A parameter to HELPMAKE when the file was compressed.
  2123. (%@AB@%HelpGetLine%@AE@% "and family" refers to all line-retrieval, cross-reference, and
  2124. line-counting routines that operate on the decompressed topic text.)  %@NL@%
  2125. %@NL@%
  2126. ────────────────────────────────────────────────────────────────────────────%@NL@%
  2127. NOTE
  2128.  
  2129. %@AI@%%@AB@%HelpCtl%@AE@%%@AI@% is provided to clarify the speed-optimization behavior in these
  2130. %@AI@%routines. The current method in most applications is to replace a character
  2131. %@AI@%in the topic header (setting it to FF) prior to calling the line-retrieval
  2132. %@AI@%routines, which confuses the optimization. This new interface hides the
  2133. %@AI@%internal data structures that would otherwise also be modified.%@AE@%%@AE@%%@NL@%
  2134. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  2135. %@NL@%
  2136. %@NL@%
  2137. %@4@%%@AB@%HelpGetInfo%@AE@%%@EH@%%@NL@%
  2138. %@NL@%
  2139. %@AS@%  int pascal far HelpGetInfo (struct helpinfo far *fpDest,
  2140. %@AS@%                              int cbDest);%@AE@%%@NL@%
  2141. %@NL@%
  2142. This utility copies a %@AS@% helpinfo %@AE@% structure relating to the specified nc to
  2143. the specified buffer. Here,%@AS@% cbDest %@AE@% is the maximum length of the data to be
  2144. copied. If %@AB@%HelpGetInfo%@AE@% cannot copy the data because the buffer is too small,
  2145. it returns the required buffer size. Otherwise, it returns 0, indicating
  2146. success.  %@NL@%
  2147. %@NL@%
  2148. %@NL@%
  2149. %@4@%%@AB@%HelpInit%@AE@%%@EH@%%@NL@%
  2150. %@NL@%
  2151. %@AS@%  void pascal far HelpInit (void)%@AE@%%@NL@%
  2152. %@NL@%
  2153. This call initializes data internal to the help engine. It should be called
  2154. once, at program startup.  %@NL@%
  2155. %@NL@%
  2156. ────────────────────────────────────────────────────────────────────────────%@NL@%
  2157. NOTE 
  2158.  
  2159. %@AI@%This function is used only in versions of the help library that do not have
  2160. %@AI@%preinitialized data. For convenience, all libraries distributed outside of
  2161. %@AI@%Microsoft have initialized data (this function is not included).%@AE@%%@NL@%
  2162. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  2163. %@NL@%
  2164. %@NL@%
  2165. %@4@%%@AB@%HelpShrink%@AE@%%@EH@%%@NL@%
  2166. %@NL@%
  2167. %@AS@%  void pascal far HelpShrink (void)%@AE@%%@NL@%
  2168. %@NL@%
  2169. When called, this function causes the help engine to free all memory whose
  2170. data can be regenerated. This frees up indexes and keyword tables loaded
  2171. from help files. The next help access can cause one or more of these tables
  2172. to be reloaded. If there are no open help files, the engine has no memory
  2173. allocated, and this call does nothing.  %@NL@%
  2174. %@NL@%
  2175. %@NL@%
  2176. %@2@%%@CR:C6A00040010 @%%@AB@%4.9  Help Engine Callbacks%@AE@%%@EH@%%@NL@%
  2177. %@NL@%
  2178. The help engine requires some support from the application environment for
  2179. file and memory management.  %@NL@%
  2180. %@NL@%
  2181. In the discussions below, "mh" is an unsigned short memory handle. "DOS
  2182. only" indicates that the call is used only in those versions of the help
  2183. engine that are run under MS-DOS, and not in OS/2-specific versions.  %@NL@%
  2184. %@NL@%
  2185. Because of the limitations of some client applications, memory management
  2186. within the help engine is such that the engine holds no locked memory when
  2187. an allocation is performed.  %@NL@%
  2188. %@NL@%
  2189. %@NL@%
  2190. %@4@%%@AB@%HelpAlloc%@AE@%%@EH@%%@NL@%
  2191. %@NL@%
  2192. %@AS@%  mh pascal far HelpAlloc (ushort cbMem)%@AE@%%@NL@%
  2193. %@NL@%
  2194. This function allocates a block of memory. The memory may be movable, and
  2195. outside of the default data segment. %@AB@%HelpAlloc%@AE@% returns NULL on failure, or
  2196. if %@AS@%cbMem %@AE@% is 0. %@AI@%DOS only%@AE@%.  %@NL@%
  2197. %@NL@%
  2198. %@NL@%
  2199. %@4@%%@AB@%HelpDealloc%@AE@%%@EH@%%@NL@%
  2200. %@NL@%
  2201. %@AS@%  void pascal far HelpDealloc (mh)%@AE@%%@NL@%
  2202. %@NL@%
  2203. This function deallocates a block of memory. %@AI@%DOS only%@AE@%.  %@NL@%
  2204. %@NL@%
  2205. %@NL@%
  2206. %@4@%%@AB@%HelpLock%@AE@%%@EH@%%@NL@%
  2207. %@NL@%
  2208. %@AS@%  char far * pascal far HelpLock (mh)%@AE@%%@NL@%
  2209. %@NL@%
  2210. This function returns a far pointer to the base of the memory referenced by
  2211. the handle. In the case of movable memory, the memory is also locked. If the
  2212. memory handle passed is invalid or NULL, NULL should be returned. %@AI@%DOS only%@AE@%.
  2213. %@NL@%
  2214. %@NL@%
  2215. %@NL@%
  2216. %@4@%%@AB@%HelpUnlock%@AE@%%@EH@%%@NL@%
  2217. %@NL@%
  2218. %@AS@%  void pascal far HelpUnlock (mh)%@AE@%%@NL@%
  2219. %@NL@%
  2220. This function unlocks the memory referenced by the handle. %@AI@%DOS only%@AE@%.  %@NL@%
  2221. %@NL@%
  2222. %@NL@%
  2223. %@4@%%@AB@%OpenFileOnPath%@AE@%%@EH@%%@NL@%
  2224. %@NL@%
  2225. %@AS@%  fhandle pascal far OpenFileOnPath (char *fname, f fWrite);%@AE@%%@NL@%
  2226. %@NL@%
  2227. The file name is of the following form:  %@NL@%
  2228. %@NL@%
  2229. %@AS@%  [$ENVVAR: | path]filename.ext%@AE@%%@NL@%
  2230. %@NL@%
  2231. %@AB@%If%@AE@%                                %@AB@%Then%@AE@%
  2232. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2233. %@AS@%$ENVVAR: %@AE@% is present              The file does not exist in the current 
  2234.                                   directory; it should be located on the 
  2235.                                   path-formatted environment variable 
  2236.                                   specified. 
  2237.  
  2238. %@AS@%path %@AE@% is not present              The file does not exist in the current 
  2239.                                   directory; it should be located on the 
  2240.                                   PATH environment variable.
  2241.  
  2242. %@AS@%path %@AE@% is present                  The file is simply opened. %@AI@%DOS only%@AE@%.
  2243.  
  2244. %@NL@%
  2245. %@4@%%@AB@%ReadHelpFile%@AE@%%@EH@%%@NL@%
  2246. %@NL@%
  2247. %@AS@%  ulong pascal far ReadHelpFile (int fhandle, ulong fpos, char 
  2248. %@AS@%  far *pData, ushort cbBytes);%@AE@%%@NL@%
  2249. %@NL@%
  2250. %@AB@%ReadHelpFile%@AE@% reads %@AB@% %@AS@%cbBytes%@AE@% %@AE@% of data, placing it beginning at %@AS@% pData %@AE@% from
  2251. the file whose handle is %@AB@% %@AS@%fhandle%@AE@%%@AE@%, beginning at file offset %@AS@% fpos%@AE@%. It
  2252. returns the number of bytes read.  %@NL@%
  2253. %@NL@%
  2254. If %@AS@% cbBytes %@AE@% is zero, then the routine should return the size in bytes of
  2255. the referenced file. %@AI@%DOS only%@AE@%.  %@NL@%
  2256. %@NL@%
  2257. %@NL@%
  2258. %@4@%%@AB@%HelpCloseFile%@AE@%%@EH@%%@NL@%
  2259. %@NL@%
  2260. %@AS@%  void pascal far HelpCloseFile (int fhandle)%@AE@%%@NL@%
  2261. %@NL@%
  2262. This function closes the file whose handle is passed. %@AI@%DOS only%@AE@%.  %@NL@%
  2263. %@NL@%
  2264. %@NL@%
  2265. %@4@%%@AB@%Callback Notes%@AE@%%@EH@%%@NL@%
  2266. %@NL@%
  2267. Each call by an application to %@AB@%HelpOpen%@AE@% results in a call by the engine to
  2268. %@AB@%OpenFileOnPath%@AE@% if the file referenced is not already open. %@AB@%CloseFile%@AE@% will
  2269. not be called until a %@AB@%HelpClose%@AE@% operation is performed on that file.  %@NL@%
  2270. %@NL@%
  2271. To reduce the number of concurrently open file handles (for applications
  2272. which support multiple simultaneous help files), the handle returned by
  2273. %@AB@%HelpOpen%@AE@% (and used by %@AB@%ReadHelpFile%@AE@% and %@AB@%CloseFile%@AE@%) should be a "virtual"
  2274. handle. Also, some form of currently open file "handle caching" should be
  2275. performed. By keeping only the most recently accessed file physically open
  2276. at the DOS level, and by closing or opening when a request against a new
  2277. virtual handle is made, the help system can be guaranteed to only have one
  2278. file handle open at a time.  %@NL@%
  2279. %@NL@%
  2280. %@NL@%
  2281. %@2@%%@CR:C6A00040011 @%%@AB@%4.10  Interface Usage%@AE@%%@EH@%%@NL@%
  2282. %@NL@%
  2283. For simple context-string-to-help-topic-text retrieval, the following steps
  2284. outline the process. Assume that the help file has been opened via %@AB@%HelpOpen%@AE@%:
  2285. %@NL@%
  2286. %@NL@%
  2287. %@NL@%
  2288.   1.  Call %@AB@%HelpNc %@AE@%to get a context number for the string on which help is
  2289.       desired.%@NL@%
  2290. %@NL@%
  2291.   2.  Call %@AB@%HelpNcCb%@AE@% to determine the amount of memory required by the
  2292.       compressed topic. If appropriate, allocate this memory.%@NL@%
  2293. %@NL@%
  2294.   3.  Call %@AB@%HelpLook%@AE@% to retrieve the compressed topic from the help file.
  2295.       This call also returns the size of the uncompressed topic. If
  2296.       appropriate, allocate this memory.%@NL@%
  2297. %@NL@%
  2298.   4.  Call %@AB@%HelpDecomp%@AE@% to decompress the topic text. Once completed, the
  2299.       memory for the compressed topic text may be deleted.%@NL@%
  2300. %@NL@%
  2301.   5.  Call %@AB@%HelpGetCells%@AE@% or %@AB@%HelpGetLine%@AE@% and %@AB@%HelpGetLineAttr%@AE@% to extract the
  2302.       topic text and formatting information one line at a time.%@NL@%
  2303. %@NL@%
  2304. %@NL@%
  2305. Given any valid context number returned by the help engine, you can also:  %@NL@%
  2306. %@NL@%
  2307. %@NL@%
  2308.   1.  Call %@AB@%HelpNcNext %@AE@%to get the context number for the next sequential
  2309.       topic in the file.%@NL@%
  2310. %@NL@%
  2311.   2.  Call %@AB@%HelpNcPrev%@AE@% to get the context number for the previous sequential
  2312.       topic in the file.%@NL@%
  2313. %@NL@%
  2314.   3.  Use %@AB@%HelpNcRecord%@AE@% and %@AB@%HelpNcBack%@AE@% to manage a history list of context
  2315.       numbers.%@NL@%
  2316. %@NL@%
  2317. %@NL@%
  2318. %@NL@%
  2319. %@NL@%
  2320. %@NL@%
  2321. %@NL@%
  2322. %@NL@%
  2323. %@CR:C6A00050001 @%%@1@%%@AB@%Chapter 5  Size and Performance%@AE@%%@EH@%%@NL@%
  2324. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2325. %@NL@%
  2326. %@NL@%
  2327. %@2@%%@CR:C6A00050002 @%%@AB@%5.1  Help Engine%@AE@%%@EH@%%@NL@%
  2328. %@NL@%
  2329. The help engine itself varies in size based on functions used (and hence
  2330. linked in) and on memory model or environment selected. In general, it
  2331. ranges in size from 4K to 6K of code. In addition, the application requires
  2332. around 4K of code to interface the help engine to its own environment.  %@NL@%
  2333. %@NL@%
  2334. The help engine maintains 104 bytes of static data. All other data is
  2335. allocated dynamically, based on the number of help files being opened. For
  2336. each help file open, 115 bytes of dynamic memory is allocated. This memory
  2337. is not freed until the file is actually closed with the %@AB@%HelpClose%@AE@% function.
  2338. Note also that concatenated files count separately. That is, each
  2339. concatenated portion counts as a single separate file.  %@NL@%
  2340. %@NL@%
  2341. When accessing a help file, several tables are read in from the actual help
  2342. file. These tables are discardable under most circumstances by calling
  2343. %@AB@%HelpShrink%@AE@%. The tables vary in size based on the size of the help file
  2344. itself. The information in Table 5.1 presents the relevant numbers for the
  2345. file QC.HLP, a file shipped with QuickC 2.0, and some indication of what
  2346. each is dependent on.  %@NL@%
  2347. %@NL@%
  2348. At decompression time, the Keyphrase and Huffman tables must be resident in
  2349. memory simultaneously. This is checked by the engine. In all other cases,
  2350. %@AB@%HelpShrink%@AE@% may be called during %@AB@%HelpAlloc%@AE@% to discard unneeded or rebuildable
  2351. memory.  %@NL@%
  2352. %@NL@%
  2353. At decompression time, memory is also required for both the compressed and
  2354. decompressed topic texts.  %@NL@%
  2355. %@NL@%
  2356. %@AB@%Table 5.1  %@AB@%QC.HLP File Information%@AE@%%@AE@%
  2357.  
  2358. %@TH:  32  1767 02 17 17 42 @%
  2359. Type             Size (in Bytes)  Description
  2360. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2361. File size        355,940          Dependent on all of the tables below, 
  2362.                                   plus the volume of help actually 
  2363.                                   provided. File size has no bearing on 
  2364.                                   the memory requirements of applications.
  2365.  
  2366. Topic index      3,084            Four times the number of help topics in 
  2367.                                   the file. QC.HLP has 771 topics.
  2368.  
  2369. Context strings  4,700            Total length of all context strings 
  2370.                                   supported by the help file.
  2371.  
  2372. Context map      1,168            Two times the number of context strings 
  2373.                                   supported. QC.HLP has 584 context 
  2374.                                   strings.
  2375.  
  2376. Keyphrase table  8,087            Number plus 2,048 actually allocated at 
  2377.                                   decompression time. This table is 
  2378.                                   proportional to the size of the 
  2379.                                   compressible key phrases identified in 
  2380.                                   the file at compression time. This is 
  2381.                                   limited to 1,024 words, but the 
  2382.                                   individual words may be of arbitrary 
  2383.                                   length.
  2384.  
  2385. Huffman table    1,024            Occasionally smaller than this, but in 
  2386.                                   most cases quickly growing to this size.
  2387.                                   It is never larger.
  2388.  
  2389. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2390.  
  2391. %@TE:  32  1767 02 17 17 42 @%
  2392.  
  2393. %@NL@%
  2394. %@2@%%@CR:C6A00050003 @%%@AB@%5.2  HELPMAKE.EXE%@AE@%%@EH@%%@NL@%
  2395. %@NL@%
  2396. HELPMAKE.EXE is a bound program around 60K in size. It requires 256K
  2397. available memory to run. When compressing, it requires free disk space up to
  2398. 2.5 times the size of the input file(s).  %@NL@%
  2399. %@NL@%
  2400. %@NL@%
  2401. %@NL@%
  2402. %@NL@%
  2403. %@NL@%
  2404. %@NL@%
  2405. %@NL@%
  2406. %@CR:C6A-A0004   @%%@1@%%@AB@%Glossary%@AE@%%@EH@%%@NL@%
  2407. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@NL@%
  2408. %@NL@%
  2409. %@2@%%@AB@%Advisor%@AE@%%@EH@%%@NL@%
  2410. %@3@%The Microsoft Advisor is the name given to the help system as actually%@EH@%
  2411. implemented in many Microsoft language products.%@NL@%%@NL@%
  2412. %@NL@%
  2413. %@2@%%@AB@%Application-Specific Character%@AE@%%@EH@%%@NL@%
  2414. %@3@%A character agreed upon by the applications developer and help-file author%@EH@%
  2415. that signifies that the rest of the line following it is a topic command
  2416. line, and not a line of actual help text to be displayed. Specified to
  2417. HELPMAKE using the /A parameter.%@NL@%%@NL@%
  2418. %@NL@%
  2419. %@2@%%@AB@%Context%@AE@%%@EH@%%@NL@%
  2420. %@3@%A keyword or phrase which is recognized by the help system and relates to a%@EH@%
  2421. topic.%@NL@%%@NL@%
  2422. %@NL@%
  2423. %@2@%%@AB@%Context Map%@AE@%%@EH@%%@NL@%
  2424. %@3@%A table which maps a %@AI@%context number%@AE@% to a %@AI@%topic index%@AE@%.%@NL@%%@NL@%%@EH@%
  2425. %@NL@%
  2426. %@2@%%@AB@%Context Number%@AE@%%@EH@%%@NL@%
  2427. %@3@%A number in the range 1-32,767 that uniquely identifies a %@AI@%context%@AE@%.%@NL@%%@NL@%%@EH@%
  2428. %@NL@%
  2429. %@2@%%@AB@%Cross Reference%@AE@%%@EH@%%@NL@%
  2430. %@3@%A string associated with a "hotspot" or location in displayed help text.%@EH@%
  2431. When activated, the cross-reference string may reference another help
  2432. context or help file, or it may cause the application to take some other
  2433. kind of action.%@NL@%%@NL@%
  2434. %@NL@%
  2435. %@2@%%@AB@%Cross-Reference Command%@AE@%%@EH@%%@NL@%
  2436. %@3@%A context string which, when looked up by the application, usually in%@EH@%
  2437. response to a hotspot selection, does not cause additional help to be
  2438. retrieved. Instead it executes a DOS command or causes some other
  2439. application-specific action to occur.%@NL@%%@NL@%
  2440. %@NL@%
  2441. %@2@%%@AB@%Dot Command%@AE@%%@EH@%%@NL@%
  2442. %@3@%English form of topic command used within QuickHelp-formatted databases.%@NL@%%@NL@%%@EH@%
  2443. %@NL@%
  2444. %@2@%%@AB@%Executable Context%@AE@%%@EH@%%@NL@%
  2445. %@3@%See %@AI@%Cross-Reference Command%@AE@%. %@NL@%%@NL@%%@EH@%
  2446. %@NL@%
  2447. %@2@%%@AB@%Executable Cross-Reference Command%@AE@%%@EH@%%@NL@%
  2448. %@3@%See %@AI@%Cross-Reference Command%@AE@%.%@NL@%%@NL@%%@EH@%
  2449. %@NL@%
  2450. %@2@%%@AB@%Help Database%@AE@%%@EH@%%@NL@%
  2451. %@3@%The single compressed file output by HELPMAKE. Also, that single help file,%@EH@%
  2452. when concatenated with others.%@NL@%%@NL@%
  2453. %@NL@%
  2454. %@2@%%@AB@%Help File%@AE@%%@EH@%%@NL@%
  2455. %@3@%A collection of one or more help databases that constitutes a single%@EH@%
  2456. physical file. Also, a single minimally formatted ASCII file.%@NL@%%@NL@%
  2457. %@NL@%
  2458. %@2@%%@AB@%Help Item%@AE@%%@EH@%%@NL@%
  2459. %@3@%See %@AI@%Topic%@AE@%.%@NL@%%@NL@%%@EH@%
  2460. %@NL@%
  2461. %@2@%%@AB@%Help Screen%@AE@%%@EH@%%@NL@%
  2462. %@3@%An application-provided window on a single topic. A help screen should be%@EH@%
  2463. scrollable to allow viewing of the entire topic, should it exceed the size
  2464. of a single screen.%@NL@%%@NL@%
  2465. %@NL@%
  2466. %@2@%%@AB@%Hotspot%@AE@%%@EH@%%@NL@%
  2467. %@3@%The location in topic text to which a cross-reference has been attached.%@EH@%
  2468. Hotspots are normally highlighted in some fashion when displayed, and define
  2469. areas within the displayed topic that activate the cross-reference when
  2470. selected.%@NL@%%@NL@%
  2471. %@NL@%
  2472. %@2@%%@AB@%Keyphrase%@AE@%%@EH@%%@NL@%
  2473. %@3@%A word or phrase extracted from the help text and replaced by a token during%@EH@%
  2474. compression.%@NL@%%@NL@%
  2475. %@NL@%
  2476. %@2@%%@AB@%Label%@AE@%%@EH@%%@NL@%
  2477. %@3@%See %@AI@%Context String%@AE@%.%@NL@%%@NL@%%@EH@%
  2478. %@NL@%
  2479. %@2@%%@AB@%Local Context%@AE@%%@EH@%%@NL@%
  2480. %@3@%A context that has no associated context string in the help file, and is%@EH@%
  2481. referenced only by a hotspot elsewhere in the same help file.%@NL@%%@NL@%
  2482. %@NL@%
  2483. %@2@%%@AB@%Node%@AE@%%@EH@%%@NL@%
  2484. %@3@%See %@AI@%Topic%@AE@%.%@NL@%%@NL@%%@EH@%
  2485. %@NL@%
  2486. %@2@%%@AB@%Node Name%@AE@%%@EH@%%@NL@%
  2487. %@3@%See %@AI@%Context String%@AE@%.%@NL@%%@NL@%%@EH@%
  2488. %@NL@%
  2489. %@2@%%@AB@%RTF%@AE@%%@EH@%%@NL@%
  2490. %@3@%Rich Text Format. An ASCII text format for storing documents and their%@EH@%
  2491. formatting information.%@NL@%%@NL@%
  2492. %@NL@%
  2493. %@2@%%@AB@%Script Topic%@AE@%%@EH@%%@NL@%
  2494. %@3@%A topic whose contents are executable cross-reference commands.%@NL@%%@NL@%%@EH@%
  2495. %@NL@%
  2496. %@2@%%@AB@%Topic%@AE@%%@EH@%%@NL@%
  2497. %@3@%The text displayed as a help entry. May be up to 64K of encoded text.%@NL@%%@NL@%%@EH@%
  2498. %@NL@%
  2499. %@2@%%@AB@%Topic Command%@AE@%%@EH@%%@NL@%
  2500. %@3@%A control line embedded into help text which contains control information or%@EH@%
  2501. instructions for the application displaying help, as opposed to help text to
  2502. be displayed.%@NL@%%@NL@%
  2503. %@NL@%
  2504. %@2@%%@AB@%Topic Index%@AE@%%@EH@%%@NL@%
  2505. %@3@%A number corresponding to a sequential topic entry in the help file. Also,%@EH@%
  2506. the table that maps these numbers to actual file positions.%@NL@%%@NL@%
  2507. %@NL@%
  2508. %@NL@%
  2509. %@NL@%
  2510. %@NL@%
  2511.