3 * Copyright 1991 by the Massachusetts Institute of Technology.
5 * For further information on copyright and distribution
6 * see the file mit-copyright.h
9 #include <mit-copyright.h>
19 FILE *helpfile = NULL;
20 char buf[1024], key[32], *msg, helpbuf[10240], *filename;
21 char *realloc(), *getenv();
23 sprintf(key, "*%s\n", node);
24 filename = resources.help_file;
27 helpfile = fopen(filename, "r");
28 if (helpfile == NULL) {
29 display_error("Sorry, help is currently unavailable.\n");
32 while (fgets(buf, sizeof(buf), helpfile))
33 if (!strcmp(buf, key))
35 if (strcmp(buf, key)) {
36 sprintf(buf, "Sorry, unable to find help on topic \"%s\".\n", node);
42 while (fgets(buf, sizeof(buf), helpfile))
47 if (!strcmp(buf, "\n"))
49 msg = realloc(msg, strlen(msg) + strlen(buf));
62 help_form_callback(dummy, form)
69 /* undocumented Motif internal routine to advance in tab group.
70 * In this case we're going backwards because for some reason
71 * the form advances whenever this button is pressed.
72 * However, it doesn't seem to go backwards even though source
73 * implies that it should. So we go forward until we wrap.
76 for (p = form->inputlines; *p; p++)
77 if (!((*p)->insensitive))
80 _XmMgrTraversal(form->formpointer, XmTRAVERSE_PREV_TAB_GROUP);