SHOWTEXT C-3

NAME

showtext - display help file text on terminal

SYNOPSIS

int showtext (helpfile, category, subject, more)

char *helpfile;

char *category;

char *subject;

int more;

DESCRIPTION

The function showtext displays text from helpfile according to the specified category and subject.

When more is true (non-zero), showtext displays the following message after displaying the help text:

--more help-- [Press SPACE to continue or q to quit]

When more is false (zero), showtext displays the following message after displaying the help text:

--End of Help-- [Press any key to continue]

The value returned by showtext specifies whether the operator has requested more help. If the operator pressed q to quit, the return value is 0. If the operator pressed SPACE for more help, the return value is greater than 0.

If there are several subject and category pairs that are relevant to the operator's request, you can call showtext several times. Pass true (non-zero) for more on all but the last call, and call showtext only if the preceding call returned a value greater than zero. For example:

showtext ("helpfile", "cat1", "subj1", 1) > 0

&& showtext ("helpfile", "cat2", "subj2", 1) > 0

&& showtext ("helpfile", "cat3", "subj3", 0);

SEE ALSO

Chapter 7,

Creating Helpfiles

DIAGNOSTICS

Showtext returns a negative number if an error occurred while opening or reading helpfile, or if category or subject could not be found in helpfile.