1 #ifndef lint 2 static char sccsid[] = "@(#)cmdtab.c 4.5 (Berkeley) 01/30/84"; 3 #endif 4 5 /* 6 * lpc -- command tables 7 */ 8 9 #include "lpc.h" 10 11 int abort(), clean(), enable(), disable(), help(); 12 int quit(), restart(), start(), status(), stop(); 13 int topq(), down(); 14 15 char aborthelp[] = "terminate a spooling daemon immediately and disable printing"; 16 char cleanhelp[] = "remove cruft files from a queue"; 17 char enablehelp[] = "turn a spooling queue on"; 18 char disablehelp[] = "turn a spooling queue off"; 19 char helphelp[] = "get help on commands"; 20 char quithelp[] = "exit lpc"; 21 char restarthelp[] = "restart a spooling daemon that has died"; 22 char starthelp[] = "enable printing and start a spooling daemon"; 23 char statushelp[] = "show status of daemon"; 24 char stophelp[] = "stop a spooling daemon after current job completes and disable printing"; 25 char downhelp[] = "do a 'stop' followed by 'disable' and put a message in status"; 26 char topqhelp[] = "put job at top of printer queue"; 27 28 struct cmd cmdtab[] = { 29 { "abort", aborthelp, abort, 1 }, 30 { "clean", cleanhelp, clean, 1 }, 31 { "enable", enablehelp, enable, 1 }, 32 { "exit", quithelp, quit, 0 }, 33 { "disable", disablehelp, disable, 1 }, 34 { "down", downhelp, down, 1 }, 35 { "help", helphelp, help, 0 }, 36 { "quit", quithelp, quit, 0 }, 37 { "restart", restarthelp, restart, 0 }, 38 { "start", starthelp, start, 1 }, 39 { "status", statushelp, status, 0 }, 40 { "stop", stophelp, stop, 1 }, 41 { "topq", topqhelp, topq, 1 }, 42 { "?", helphelp, help, 0 }, 43 { 0 }, 44 }; 45 46 int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); 47