|
|
BSD 4.3
#include "parms.h"
#include "structs.h"
#ifdef RCSIDENT
static char rcsid[] = "$Header: /var/lib/cvsd/repos/CSRG/43BSD/contrib/notes/src/help.c,v 1.1.1.1 2018/04/24 16:12:54 root Exp $";
#endif RCSIDENT
/*
* help(file) char *file;
* prints the specified help file using more and then
* does a pause with 'hit any key to continue.
*
* Original idea: Rob Kolstad January 1982
*/
help (file)
char *file;
{
char cmdline[CMDLEN]; /* line buffer */
char *command;
if ((command = getenv ("PAGER")) == NULL) /* see if overridden */
command = PAGER; /* assign default */
#ifndef FASTFORK
sprintf (cmdline, "%s < %s/%s/%s", command, Mstdir, UTILITY, file);
dounix (cmdline, 1, 1); /* set tty flags */
#else
sprintf (cmdline, "%s/%s/%s", Mstdir, UTILITY, file);
dounix (1, 1, command, cmdline, 0, 0, 0);
#endif
/* and to his uid */
printf (" --Hit any key to continue--");
gchar ();
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.