Annotation of 43BSDReno/usr.sbin/lpr/lpc/cmdtab.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1983 Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * Redistribution and use in source and binary forms are permitted provided
                      6:  * that: (1) source distributions retain this entire copyright notice and
                      7:  * comment, and (2) distributions including binaries display the following
                      8:  * acknowledgement:  ``This product includes software developed by the
                      9:  * University of California, Berkeley and its contributors'' in the
                     10:  * documentation or other materials provided with the distribution and in
                     11:  * all advertising materials mentioning features or use of this software.
                     12:  * Neither the name of the University nor the names of its contributors may
                     13:  * be used to endorse or promote products derived from this software without
                     14:  * specific prior written permission.
                     15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     16:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     17:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     18:  */
                     19: 
                     20: #ifndef lint
                     21: static char sccsid[] = "@(#)cmdtab.c   5.4 (Berkeley) 6/1/90";
                     22: #endif /* not lint */
                     23: 
                     24: /*
                     25:  * lpc -- command tables
                     26:  */
                     27: 
                     28: #include "lpc.h"
                     29: 
                     30: int    abort(), clean(), enable(), disable(), down(), help();
                     31: int    quit(), restart(), start(), status(), stop(), topq(), up();
                     32: 
                     33: char   aborthelp[] =   "terminate a spooling daemon immediately and disable printing";
                     34: char   cleanhelp[] =   "remove cruft files from a queue";
                     35: char   enablehelp[] =  "turn a spooling queue on";
                     36: char   disablehelp[] = "turn a spooling queue off";
                     37: char   downhelp[] =    "do a 'stop' followed by 'disable' and put a message in status";
                     38: char   helphelp[] =    "get help on commands";
                     39: char   quithelp[] =    "exit lpc";
                     40: char   restarthelp[] = "kill (if possible) and restart a spooling daemon";
                     41: char   starthelp[] =   "enable printing and start a spooling daemon";
                     42: char   statushelp[] =  "show status of daemon and queue";
                     43: char   stophelp[] =    "stop a spooling daemon after current job completes and disable printing";
                     44: char   topqhelp[] =    "put job at top of printer queue";
                     45: char   uphelp[] =      "enable everything and restart spooling daemon";
                     46: 
                     47: struct cmd cmdtab[] = {
                     48:        { "abort",      aborthelp,      abort,          1 },
                     49:        { "clean",      cleanhelp,      clean,          1 },
                     50:        { "enable",     enablehelp,     enable,         1 },
                     51:        { "exit",       quithelp,       quit,           0 },
                     52:        { "disable",    disablehelp,    disable,        1 },
                     53:        { "down",       downhelp,       down,           1 },
                     54:        { "help",       helphelp,       help,           0 },
                     55:        { "quit",       quithelp,       quit,           0 },
                     56:        { "restart",    restarthelp,    restart,        0 },
                     57:        { "start",      starthelp,      start,          1 },
                     58:        { "status",     statushelp,     status,         0 },
                     59:        { "stop",       stophelp,       stop,           1 },
                     60:        { "topq",       topqhelp,       topq,           1 },
                     61:        { "up",         uphelp,         up,             1 },
                     62:        { "?",          helphelp,       help,           0 },
                     63:        { 0 },
                     64: };
                     65: 
                     66: int    NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);

unix.superglobalmegacorp.com

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