MUNDI - Info: hhelp/programming_with_hhelp
5th June 2001
[Up]
Using the HHELP System in Your Own Programs
===========================================
If you wish to use the hhelp system in your own C programs, you must
prepare a directory structure in the UNIX filesystem that contains all
the relevant help-text, arranged heirachically in directories with the
names of the folders in which you wish the help screen to be located.
Then compile your program with the library hhelp (ie. append the word
"-lhhelp" to the linking line of your compilation procedure). This
will ensure that the hhelp code is included in your program.
Your program should include the following function-calls:
init_hhelp (pathname)
Pathname is the UNIX pathname of the root directory of
your heirachical help directory structure. The
function init_hhelp() does not return a value. It
must be called before handle_hhelp() is used.
handle_hhelp (string)
String is the comand that you want hhelp to execute,
(in the extended sense of the word "command" that
includes help-text names as commands meaning to list
that piece of help-text). The return value of
handle_hhelp() is a string containing the result of
the command, (normally the required help-text or
folder-listing), or a NULL pointer if the command sent
was "quit" or "suspend". Hhelp itself looks after the
maintenance of the current folder.
For more detailed and technical information, see the manual entry.
If your system does not have this manual entry, or indeed the hhelp
library, contact mirk@uk.ac.warwick.cs by email, for source code.