Annotation of 43BSD/contrib/notes/src/help.c, revision 1.1

1.1     ! root        1: #include "parms.h"
        !             2: #include "structs.h"
        !             3: 
        !             4: #ifdef RCSIDENT
        !             5: static char rcsid[] = "$Header: help.c,v 1.7 85/01/18 15:13:16 notes Exp $";
        !             6: #endif RCSIDENT
        !             7: 
        !             8: /*
        !             9:  *     help(file) char *file;
        !            10:  *     prints the specified help file using more and then
        !            11:  *     does a pause with 'hit any key to continue.
        !            12:  *     
        !            13:  *     Original idea:  Rob Kolstad January 1982
        !            14:  */
        !            15: 
        !            16: help (file)
        !            17: char   *file;
        !            18: {
        !            19:     char    cmdline[CMDLEN];                           /* line buffer */
        !            20:     char   *command;
        !            21: 
        !            22:     if ((command = getenv ("PAGER")) == NULL)          /* see if overridden */
        !            23:        command = PAGER;                                /* assign default */
        !            24: #ifndef        FASTFORK
        !            25:     sprintf (cmdline, "%s < %s/%s/%s", command, Mstdir, UTILITY, file);
        !            26:     dounix (cmdline, 1, 1);                            /* set tty flags */
        !            27: #else
        !            28:     sprintf (cmdline, "%s/%s/%s", Mstdir, UTILITY, file);
        !            29:     dounix (1, 1, command, cmdline, 0, 0, 0);
        !            30: #endif
        !            31:                                                        /* and to his uid */
        !            32:     printf ("  --Hit any key to continue--");
        !            33:     gchar ();
        !            34: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.