File: hc.txt

package info (click to toggle)
xfractint 20.4.10-2
  • links: PTS
  • area: non-free
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 4,712 kB
  • ctags: 8,020
  • sloc: ansic: 77,316; asm: 430; cpp: 425; makefile: 379; sh: 38
file content (534 lines) | stat: -rw-r--r-- 17,114 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534

... First version documentation is followed by additional notes
... for features added in subsequent versions.


	       FRACTINT Help Compiler Source File Format



0. Contents

    1.0     Help compiler input/output.
    1.1       The source input file.
    1.2       The header (.H) output file.
    1.3       The binary (.HLP) output file.
    2.0     Source (.SRC) file format.
    2.1       Comments.
    2.2       Defining the output filenames.
    2.3       Defining the help file version.
    2.4.0     Help topics.
    2.4.1	Starting a help topic.
    2.4.2.0	The help text.
    2.4.2.1	  Special characters.
    2.4.3	Starting another page.
    2.5.0     Labels.
    2.5.1	The help index label (HELP_INDEX).
    2.5.2	Private labels.
    2.6.0     Hot-links.
    2.6.1	Special hot-links.
    2.7       Tables.


1.0 Help compiler input/output.

    The Help Compiler converts a source file into two output files: a "C"
  header file which is #included in FRACTINT and a binary file used at run-
  time.


1.1 The source input file.

    The Help compiler takes as input a help source file (.SRC).  See x.x.x
  for the .SRC file format.  HELP.SRC is FRACTINT's help file source.


1.2 The header (.H) output file.

    The header (.H) file contains a #define macro for each non-private label
  (see 2.5.0) and for the help file version (see 2.3).	The .H file is
  included in FRACTINT and the macros are used to set the current help mode.

    The Help Compiler will only modify the .H file when a non-private label
  (see 2.5.0) is added or deleted or when the help file version (see 2.3)
  is changed.  This minimizes the times when FRACTINT will need to be re-
  compiled.  However, when the Help Compiler does modify the .H file it is
  necessary to re-compile FRACTINT.

  In FRACTINT this file is named HELPDEFS.H

1.3 The binary (.HLP) output file.

    The .HLP file is the binary file where compiled help informnation is
  stored.  See HC.C and HELP.C if you're interested in the file format.  In
  FRACTINT the file is named FRACTINT.HLP.  This file may be appended to
  FRACTINT.EXE for distribution, see the Help Compiler command-line help
  (type "HC" at the DOS prompt) more info.


2.0 Source (.SRC) file format.

    The source file defines output files, help file version, topics, labels
  and hypertext-style hot-links with commands and hot-links.  Commands start
  with a tilde ('~') in the first column of a line and continue to the end
  of the line.	Hot-links, defined within the text, are surrounded by curly-
  braces ('{' and '}').  Comment lines, which may appear anywhere in the
  file, start with a semicolon (';') in the first column and continue to
  the end of the line.


2.1 Comments.

    Any line starting with a semicolon (;) is a comment.  The comment
  continues to the end of the line and may appear anywhere in the file.
  The semicolon must be in the first column of the line.


2.2 Defining the output filenames.

    The output filenames are defined in the source file by the following
  commands:

	~HdrFile=H_FILE
	~HlpFile=HLP_FILE

  H_FILE is the .H filename and HLP_FILE is the .HLP filename.	These
  commands must appear before the first topic.


2.3 Defining the help file version.

    The help file version number is stored in a special #define in the .H
  file (named HELP_VERSION) and stored in the .HLP file header.  If the
  version number in HELP_VERSION does not match the version in the .HLP file
  the file will not be used.  This is mainly to make sure FRACTINT doesn't
  try to read a help file other than the one the .EXE is expecting.  To
  define the help version:

	~Version=nnn

  Where nnn is a positive decimal version number.  (Suggested format is 100
  for version 1.00, 150 for version 1.50, etc.)  This command must appear
  before the first help topic.	-1 will be used if the version is not defined
  in the .SRC file.


2.4.0 Help topics.

    The help topics come after the HdrFile=, HlpFile= and Version= commands
  and continue until end-of-file.


2.4.1 Starting a help topic.

  To start a new help topic use the following format:

	~Topic=TITLE

  "~Topic=" is the command to start a topic and TITLE is the text to display
  at the top of each page.  The title continues to the '\n' and may contain
  up to 65 characters.

    In the example:

	~Title=Command Keys available while in Display Mode

  "Command Keys avail..." is the TITLE which would displayed at the top of
  each page.


2.4.2.0 The help text.

    The help text for each topic can be several pages long. Each page is 22
  rows by 78 columns.  The first and last rows should be blank for the best
  appearance.


2.4.2.1 Special characters.

    To insert reserved characters (like ';', '~', '\' and '{') into the help
  text precede the character with a backslash ('\').  To insert any character
  (except null) into the text follow a backslash with a decimal (not hex
  or octal) ASCII character code.  For example:

	\~  - puts a tilde in the text.
	\24 - places an up-arrow in the text.


2.4.3 Starting another page.

    To start a new page in the same topic put two tildes (~~) at the start
  of a line.  No other text is allowed on the line.  Each page can be up to
  22 lines long.  (The Help Compiler will warn you if any page gets longer
  than 22 lines.)  For the best appearance the first and last lines should
  be blank.


2.5.0 Labels.

    A label is a name which in used to refer to a help topic.  A label is
  used in hot-links or in FRACTINT for context-sensitive help.	When help
  goes to a label (when a hot-link is selected or context-sensitive help
  is called from FRACTINT) it goes to the page of the topic where the label
  was defined.

    To define a label for a topic insert the following command into the
  topic's text:

	~(NAME)

  NAME is the name of the label.  The name follows "C"-style conventions
  for variable names.  Case is significant.  The label should start at the
  beginning of a line and have no text following it on the line.  The line
  line will not appear in the help text.

    For example, if this line:

  ~(HELPPLASMA)

  was placed in page three of a topic using it in a hot-link (see 2.6.0)
  or as context-sensitive help would "go to" page three of that topic.  The
  user would then be free to page up and down through the entire topic.

    Each topic must have at least one label otherwise it could not be
  referred to.


2.5.1 The help index label (HELP_INDEX).

    When the user wants to go to the "help index" (by pressing F1 while
  in help) help will go to a special label named "HELP_INDEX".  Other than
  the requirement that it be in every .SRC file you may treat it as any
  other label.	It can be used in links or as context-sensitive help.


2.5.2 Private labels.

    A private label is a label which is local to the help file.  It can be
  used in hot-links but cannot be used as context-sensitive help.  A private
  label is a label with an "at sign" ('@') as the first character of its
  name.  The "at sign" is part of the name.  In the example:

	~(@HELPPLASMA)

  "@HELPPLASMA" is a private label.

    Private labels are not included in the .H file so you may add or delete
  private labels without re-compiling FRACTINT.  Each non-private label
  takes up some memory (4 bytes) in FRACTINT so it's best to use private
  labels whenever possible.  Use private labels except when you want to use
  the label as context-sensitive help.


2.6.0 Hot-links.

    A hypertext-style hot-link to a label can appear anywhere in the help
    text.  To define a hot-link use the following syntax:

	{LABEL TEXT}

  LABEL is the label to link to and TEXT is the text that will be highlighted.
  Only the TEXT field will appear on the help screen.  No blanks are allowed
  before the LABEL.  In the sample hot-link:

	{HELPMAIN Command Keys in display mode}

  "HELPMAIN" is the LABEL and "Command keys in display mode" is the
  TEXT to will be hightlighted.


2.6.1 Special hot-links.

    In addition to normal hot-links to labels "special" links to custom
  functions (built into HELP.C) are allowed.  These hot-links have a
  negative number (-2..) in place of the LABEL.  No special hot-links are
  currently supported in FRACTINT.


2.7 Tables.

    A table is a way of arranging a group of hot-links into evenly-spaced
  columns.  The format for a table is:

	~Table=WIDTH COLS INDENT

	<< LINKS... >>

	~EndTable

  WIDTH is the width of each item, COLS is the number of columns in the
  table and INDENT is the number of spaces to indent the table.  LINKS is
  a list of hot-links (see 2.6.0) which will be arranged.  Only blanks and
  new-lines are allowed between the hot-links; other characters generate
  an error.

    In the example table:

	~Table=20 3 9
	{@ONE One}
	{@TWO Two}
	{@THREE Three}
	{@FOUR Four}
	{@FIVE Five}
	{SIX Six}
	{SEVEN Seven}
	{EIGHT Eight}
	~EndTable

  20 is the WIDTH, 3 is COLS and INDENT is 9.  The following text would
  be produced by the table:

	One		    Two 		Three
	Four		    Five		Six
	Seven		    Eight

  Each item would be a hot-link linking to its corresponding label (@ONE for
  "One", etc.)  Any legal hot-link (to private or non-private labels) may be
  used in a table.

    The same effect could be produced by arranging the hot-links into
  columns yourself but using a table is usually easier (especially if the
  label names vary in length).



... Second version additional documentation:

		  New features of the Help Compiler (HC)
		  ======================================


Expanded command format
=======================

    Several commands may be "strung together" by separating them with commas.
  For example:

       ~Topic=Help on help, Label=HELPONHELP, Format-

  To have a comma as part of a command (like in a topic) precede it with a
  backslash.

    Commands can be imbedded in the text with the following format:

       ~(command)

  The text before the tilde and immediately after the ending parend will be
  part of the help text.


New commands
============

    Format[+/-]        L   turns formatting on/off.
    Online[+/-]        L   enables/disables display of text in the online
			   help.
    Doc[+/-]	       L   enables/disables display of text in the printed
			   document.  (Currently ignored.)
    FormatExclude=NUM  G/L Set the column number in which formatting is
			   automatically disabled.  (ie. all text after
			   column NUM is unformatted.)	If before any topics
			   sets global value, if in a topic sets only for
			   that topic.
    FormatExclude=n    G/L Turn this feature off.  This is the default at the
			   start of the source file.  Global if before topic,
			   local otherwise
    FormatExclude[+/-] G/L Temporarily enable/disable this feature.  Has no
			   effect if "FormatDisable=n" is in effect.
    FormatExclude=     L   Resets FormatExclude to its global value.
    Center[+/-]        L   Enable/Disable automatic centering of text.

    All commands with a "L" are local in scope -- they effect only the current
  topic.  All commands with a "G" are global in scope.  Commands with "G/L" are
  global if used before any topics are defined and local otherwise.  At the
  start of each topic the following local settings are in effect:

       ~Online+,Doc+,FormatExclude=,Format+,Center-


Modified commands
=================

  Label=NAME		replaces the ~(...) command
  FF			replaces the ~~ command


Hot-Links
=========

  Hot-links have been expanded to support "implicit" links.  These are links
  which link to the topic whose title matches the highlighted text.  They have
  no label field.  In the example:

       Press <C> to goto {Color Cycling Mode}.

  The link will link to the topic whose title is "Color Cycling Mode".  The
  link must match the topics' title exactly except for case and leading or
  trailing blanks.

  Normal "explicit" hot-links to labels must now have an equal sign
  immediately after the opening curly-brace.  For example:

       {=HELPONHELP How do I use help?}


  Links to the label named "HELPONHELP".  (The equal sign is not part of the
  labels name.)


Paragraph formatting
====================

  The HC determines the end of a paragraph when it encounters:

    o a blank line.
    o a change of indentation after the second line of a paragraph.
    o a line ending with a backslash ('\').
    o If FormatExclude is enabled any line starting beyond the cut-off
      value.

  The HC only looks at the left margin of the text to determine paragraph
  breaks.  If your not sure the HC can determine a paragraph boundry
  append a backslash to the end of the last line of the paragraph.

  The following examples illustrate when you need to use a backslash to make
  HC format correctly:

  1. Paragraph headings.

	Heading
	Text which follows the heading.  This text is supposed
	to be a separate "paragraph" from the heading but the HC
	doesn't know that!

  This text would be formatted into a single paragraph.  (The word "Text"
  would immediately follow "Heading".)  To make it format correctly append
  a backslash to the end of "Heading".

  2. Single-line bullets.

	o Don't branch.
	o Use string instructions, but don't go much out of your way
	  to do so.
	o Keep memory accesses to a minimum by avoiding memory operands
	  and keeping instructions short.

    Since the HC cannot tell that the first bullet is a separate paragraph
  from the second bullet it would put both bullets into one paragraph.	Any
  bullet of two lines or more (assuming the intentation for the second line
  of the bullet is different from the first) is OK.  Always add a backslash
  to the end of single-line bullets.

    In general, if you cannot determine where a paragraph boundry is by
  looking at the indentation of each line use a backslash to force a
  paragraph break.




... Third version additional documentation:

  New Commands
  ============

  ~Comment, ~EndComment
    Use to start/end multi-line comments.

  ~CompressSpaces[+/-]
    Turn on/off the automatic compression of spaces.  Used for data topics
    and when reading normal topics with read_topic()

  ~Data=label_name
    Starts a topic which contains data.  Think of it as a macro for:

      ~Topic=, Label=label_name, Format-, CompressSpaces-

    Data labels cannot be part of the document or displayed as online help.

  ~BinInc filename
    Includes a file in binray format (no processing) into a data topic.
    This command only works for data topics.  Example:
	~Data=TPLUS_DAT
	~BinInc tplus.dat

  ~DocContents
    Defines the documents table of contents.  Text is allowed.	Table of
    content entries have the following format:

      { id, indent, name, [topic, ...] [, FF] }

    id	   is it's identification (ie, 1.2.1)
    indent is the indentation level, (ie. 2)
    name   is the text to display to display (ie. Fractint Commands)
	   If name is in quotes it is also assumed to also be the
	   title of the first topic.
    topic  list of 0 or more topics to print under this item.  Entries
	   in quotes are assumed to be the title of a topic, other
	   entries are assumed to be labels.
    FF	   If this keyword is present the entry will start on a new page in
	   the document.
    It isn't as complex as it sounds; see "~DocContents" in HELP.SRC for
    examples.


  Quoted implicit hot-links
  =========================

    HC will ignore quotes areound implicit hot-links when searching for
    the matching title.  This allows hot-links like:

      {"Video adapter notes"}

    intead of:

      "{Video adapter notes}"

    This is so that the hot-link page numbers don't end up inside the
    quotes like: "Video adapter notes (p. 21)".  It also keeps quotes from
    being separated from the text in the online-help.


  Document printing
  =================

    The new /p command-line option compiles the .SRC file and prints the
    document.  It does NOT write the .HLP file.

    The old /p option (set swap path) has been changed to /r.


   Printing the document
   =====================

   The function prototype (in HELP.C) to print the document is:

	void print_document(char *outfname, int (*msg_func)(int,int),
			    int save_extraseg);

   outfname is the file to "print" to (usually "FRACTINT.DOC"), msg_func
   is a function which is called at the top of each page, and save_extraseg
   is true if the data in the extraseg should be preserved.

   See print_doc_msg_func() in HELP.C for an example of how to use msg_func.
   If msg_func is NULL no msg_func is called.


   Printing from help
   ==================

   There are hooks to print the document from a help topic by selecting a
   "special" hot-link. I suggest a format like:

	~Topic=Generating FRACINT.DOC

	Explain that selecting yes will print the document, etc...

	{=-2  Yes, generate FRACTINT.DOC now. }
	{=-1  No, do NOT generate FRACTINT.DOC. }

   Selecting yes will generate the document and then return to the previous
   topic.  Selecting no will simply return to the previous topic (like
   backspace does.)