1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #if defined(DOSCCS) && !defined(lint)
   8: static char sccsid[] = "@(#)cmdtab.c	5.1.1 (2.11BSD GTE) 1/1/94";
   9: #endif not lint
  10: 
  11: /*
  12:  * lpc -- command tables
  13:  */
  14: 
  15: #include "lpc.h"
  16: 
  17: int abort(), clean(), enable(), disable(), down(), help();
  18: int quit(), restart(), start(), status(), stop(), topq(), up();
  19: 
  20: char    aborthelp[] =   "terminate a spooling daemon immediately and disable printing";
  21: char    cleanhelp[] =   "remove cruft files from a queue";
  22: char    enablehelp[] =  "turn a spooling queue on";
  23: char    disablehelp[] = "turn a spooling queue off";
  24: char    downhelp[] =    "do a 'stop' followed by 'disable' and put a message in status";
  25: char    helphelp[] =    "get help on commands";
  26: char    quithelp[] =    "exit lpc";
  27: char    restarthelp[] = "kill (if possible) and restart a spooling daemon";
  28: char    starthelp[] =   "enable printing and start a spooling daemon";
  29: char    statushelp[] =  "show status of daemon and queue";
  30: char    stophelp[] =    "stop a spooling daemon after current job completes and disable printing";
  31: char    topqhelp[] =    "put job at top of printer queue";
  32: char    uphelp[] =  "enable everything and restart spooling daemon";
  33: 
  34: struct cmd cmdtab[] = {
  35:     { "abort",  aborthelp,  abort,      1 },
  36:     { "clean",  cleanhelp,  clean,      1 },
  37:     { "enable", enablehelp, enable,     1 },
  38:     { "exit",   quithelp,   quit,       0 },
  39:     { "disable",    disablehelp,    disable,    1 },
  40:     { "down",   downhelp,   down,       1 },
  41:     { "help",   helphelp,   help,       0 },
  42:     { "quit",   quithelp,   quit,       0 },
  43:     { "restart",    restarthelp,    restart,    0 },
  44:     { "start",  starthelp,  start,      1 },
  45:     { "status", statushelp, status,     0 },
  46:     { "stop",   stophelp,   stop,       1 },
  47:     { "topq",   topqhelp,   topq,       1 },
  48:     { "up",     uphelp,     up,     1 },
  49:     { "?",      helphelp,   help,       0 },
  50:     { 0 },
  51: };
  52: 
  53: int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);

Defined variables

NCMDS defined in line 53; never used
aborthelp defined in line 20; used 1 times
  • in line 35
cleanhelp defined in line 21; used 1 times
  • in line 36
cmdtab defined in line 34; used 7 times
disablehelp defined in line 23; used 1 times
  • in line 39
downhelp defined in line 24; used 1 times
  • in line 40
enablehelp defined in line 22; used 1 times
  • in line 37
helphelp defined in line 25; used 2 times
quithelp defined in line 26; used 2 times
restarthelp defined in line 27; used 1 times
  • in line 43
sccsid defined in line 8; never used
starthelp defined in line 28; used 1 times
  • in line 44
statushelp defined in line 29; used 1 times
  • in line 45
stophelp defined in line 30; used 1 times
  • in line 46
topqhelp defined in line 31; used 1 times
  • in line 47
uphelp defined in line 32; used 1 times
  • in line 48
Last modified: 1994-01-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2705
Valid CSS Valid XHTML 1.0 Strict