DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T h

⟦ffffa455b⟧ TextFile

    Length: 2097 (0x831)
    Types: TextFile
    Names: »help.3«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« 
        └─⟦036c765ac⟧ 
            └─⟦this⟧ »TeX3.0/Man-pages/other-manuals/help.3« 
            └─⟦this⟧ »TeX3.0/TeXcontrib/gnutex/Help/help.3« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z« 
        └─⟦c58930e5c⟧ 
            └─⟦this⟧ »TeX3.14/Man-pages/other-manuals/help.3« 

TextFile

.TH HELP 3:LOCAL "January 1986"
.SH NAME
help \- provide help message about a topic
.SH SYNOPSIS
.nf
.ft B
#include "help.h"

help(keyword, helpfile)
char *keyword;
char *helpfile;
.ft R
.fi
.SH DESCRIPTION
The
.I help
call looks up the
.I keyword
in the specified
.IR helpfile .
If an entry matching the desired
.I keyword
is found, its corresponding description is sent to the standard output.
Thus, you can customize a program's help information merely by editing the
.IR helpfile
instead of re-compiling the program sources.
If
.I helpfile
doesn't change from one call to the next,
.I help
avoids re-opening the file.
.PP
The
.I keyword
should have a trailing newline, and must end with a NULL character.
The format of the
.I helpfile
is (with question marks in column 1 on each line):
.PP
.nf
?keyword
This line is printed when help on \fBkeyword\fP is requested.
?Topic
?topic
These lines are printed when help on \fBTopic\fP or \fBtopic\fP is
requested.  No keywords are casefolded before processing, and each
help message may have more than one key that matches it.
?
??
These lines are printed out when a null keyword (really just a newline)
or a keyword of \fB?\fP is requested.  Typically, this help message is
a command summary or overview.
.fi
.SH EXAMPLE
.nf
	/* `buf' contains the user's reply */
	switch (help(buf, "/usr/local/lib/helpfile")) {
	case H_FOUND:
		/* already printed the help info; do nothing */
		break;
	case H_NOTFOUND:
		printf("Sorry, no help for %s", buf);
		break;
	case H_ERROR:
		perror("/usr/local/lib/helpfile");
		break;
	default:
		cannot_happen("help");
		break;
	}
.fi
.SH DIAGNOSTICS
A return of H_FOUND, defined in ``help.h'', means help was given:
the keyword was found and a message was printed.
A return of H_NOTFOUND means no help was given because the
.I keyword
wasn't found in the
.I helpfile.
A return of H_ERROR means there was an error opening the
.IR helpfile .
H_ERROR returns can be handled by the caller:
write a message to standard error, typically using
.IR perror (),
or call
.IR help ()
using a different pathname in
.IR helpfile .