11.6.3 Minimally Formatted ASCII Format

A minimally formatted ASCII text file comprises a sequence of topics, each preceded by one or more unique context definitions. Each context definition must be on a separate line beginning with a help delimiter (>>). Subsequent lines up to the next context definition constitute the topic text.

Summary: Minimally formatted ASCII files cannot contain highlighting.

There are two ways to use a minimally formatted ASCII file. You can compress it with HELPMAKE, creating a help database, or an application can access the uncompressed file directly. Compressing minimally formatted ASCII files increases search speed. Uncompressed files are somewhat larger and slower to search. Minimally formatted ASCII files have a fixed width, and they cannot contain highlighting (or other nondefault attributes) or explicit cross-references.

The following example, coded in minimally formatted ASCII, shows the same text as the QuickHelp example presented earlier in this section. The first line of the example defines open as a context string. The minimally formatted ASCII help file must begin with the help delimiter (>>), so that HELPMAKE or the application can verify that the file is indeed an ASCII help file.

>>>>open

Include: <fcntl.h>, <io.h>, <sys\types.h>, <sys\stat.h>

Prototype: int open(char *path, int flag[, int mode]);

oflag: O_APPEND O_BINARY O_CREAT O_EXCL O_RDONLY

O_RDWR O_TEXT O_TRUNC O_WRONLY

(can be joined by |)

pmode: S_IWRITE S_IREAD S_IREAD | S_IWRITE

Returns: a handle if successful, or -1 if not.

errno: EACCES, EEXIST, EMFILE, ENOENT

See also: access, chmod, close, creat, dup, dup2, fopen, sopen, umask

When displayed, the help information appears exactly as it is typed into the file. Any formatting codes are treated as ASCII text.