|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T h
Length: 712 (0x2c8)
Types: TextFile
Names: »htest.c«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
└─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z«
└─⟦036c765ac⟧
└─⟦this⟧ »TeX3.0/TeXcontrib/gnutex/Help/htest.c«
#include <stdio.h>
#include "help.h"
main() /* test out the help function */
{
char buf[BUFSIZ];
char *hfpn = "helpfile"; /* help file path name */
char *ahfpn = "alt-helpfile"; /* alternate help file name */
printf("Type control-D to quit.\n");
printf("Help on: ");
while (fgets(buf, sizeof buf, stdin) != NULL)
{
switch (help(buf, hfpn)) {
case H_FOUND:
/* already printed the help info; do nothing */
break;
case H_NOTFOUND:
printf("Sorry, no help for %s", buf);
help(buf, ahfpn); /* try other help file */
break;
case H_ERROR:
perror(hfpn);
break;
default: /* defensive programming */
printf("Can't happen\n");
break;
}
printf("Help on: ");
}
exit(0);
}