|
|
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 w
Length: 2601 (0xa29)
Types: TextFile
Names: »widgethelp.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/others/quipu/uips/widget/widgethelp.c«
/* widgethelp.c - Display of assorted help texts */
#ifndef lint
static char *rcsid = "$Header: /f/osi/others/quipu/uips/widget/RCS/widgethelp.c,v 6.0 89/03/18 23:34:58 mrose Rel $";
#endif
/*
* $Header: /f/osi/others/quipu/uips/widget/RCS/widgethelp.c,v 6.0 89/03/18 23:34:58 mrose Rel $
*
*
* $Log: widgethelp.c,v $
* Revision 6.0 89/03/18 23:34:58 mrose
* Release 5.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
#include <stdio.h>
#include "quipu/util.h"
#define BUFLEN 512
#ifdef lint
#define ETCDIR "/etc"
#endif
static FILE *helpfp;
helpfile(fname)
char *fname;
{
static char progname[512];
cleartext();
(void) strcpy (progname,"/usr/ucb/more");
(void) strcat (progname, " ");
(void) strcat (progname, fname);
(void) system (progname);
}
helplist()
{
cleartext();
eprint(" q - quit this program.\n");
eprint(" ? - get Help on using this program.\n\n");
eprint(" g - Goto an entry in the tree.\n");
eprint(" r - Read the attributes of the current location.\n");
eprint(" m - Modify the attributes of the current location.\n");
eprint(" l - List the next level down.\n");
eprint(" s - Search for an object.\n");
}
sethelpfile()
{
char helpbuf [BUFLEN];
(void) strcpy (helpbuf,ETCDIR);
(void) strcat (helpbuf,"widgethelp");
if ((helpfp = fopen(helpbuf, "r")) == (FILE *)NULL ) {
tprint("Can't open help file '%s'.\n",helpbuf);
}
}
help_connect()
{
get_help("---CONNECT\n");
}
help_modify()
{
get_help("---MODIFY\n");
}
help_search()
{
get_help("---SEARCH\n");
}
help_list()
{
get_help("---LIST\n");
}
help_read()
{
get_help("---READ\n");
}
get_help(startstr)
char *startstr;
{
char str[BUFLEN+2];
if (helpfp == (FILE *)NULL) {
eprint("Sorry - no help file available.\n");
return;
}
for (;;)
if (fgets(str, BUFLEN, helpfp) != (char *) NULL)
if (strncmp(str,startstr,strlen(startstr)) == 0)
break;
while (fgets(str, BUFLEN, helpfp) != (char *) NULL)
if (strncmp(str, "---***---",9) == 0)
break;
else
tprint(str);
(void) fseek(helpfp, 0L, 0);
}
help_cncs()
{
cleartext();
helplist ();
}
help_dtld()
{
char helpbuf [BUFLEN];
(void) strcpy (helpbuf,ETCDIR);
(void) strcat (helpbuf,"widgetdetail");
cleartext();
helpfile(helpbuf);
}