1 #ifndef lint 2 static char sccsid[] = "@(#)cmdtab.c 4.6 (Berkeley) 07/24/84"; 3 #endif 4 5 /* 6 * lpc -- command tables 7 */ 8 9 #include "lpc.h" 10 11 int abort(), clean(), enable(), disable(), down(), help(); 12 int quit(), restart(), start(), status(), stop(), topq(), up(); 13 14 char aborthelp[] = "terminate a spooling daemon immediately and disable printing"; 15 char cleanhelp[] = "remove cruft files from a queue"; 16 char enablehelp[] = "turn a spooling queue on"; 17 char disablehelp[] = "turn a spooling queue off"; 18 char downhelp[] = "do a 'stop' followed by 'disable' and put a message in status"; 19 char helphelp[] = "get help on commands"; 20 char quithelp[] = "exit lpc"; 21 char restarthelp[] = "kill (if possible) and restart a spooling daemon"; 22 char starthelp[] = "enable printing and start a spooling daemon"; 23 char statushelp[] = "show status of daemon and queue"; 24 char stophelp[] = "stop a spooling daemon after current job completes and disable printing"; 25 char topqhelp[] = "put job at top of printer queue"; 26 char uphelp[] = "enable everything and restart spooling daemon"; 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 { "up", uphelp, up, 1 }, 43 { "?", helphelp, help, 0 }, 44 { 0 }, 45 }; 46 47 int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); 48