1 #ifndef lint 2 static char sccsid[] = "@(#)cmdtab.c 4.1 (Berkeley) 05/11/83"; 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 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 helphelp[] = "get help on commands"; 19 char quithelp[] = "exit lpc"; 20 char restarthelp[] = "restart a spooling daemon that has died"; 21 char starthelp[] = "enable printing and start a spooling daemon"; 22 char statushelp[] = "show status of daemon"; 23 char stophelp[] = "stop a spooling daemon after current job completes and disable printing"; 24 25 struct cmd cmdtab[] = { 26 { "abort", aborthelp, abort, 1 }, 27 { "clean", cleanhelp, clean, 1 }, 28 { "enable", enablehelp, enable, 1 }, 29 { "exit", quithelp, quit, 0 }, 30 { "disable", disablehelp, disable, 1 }, 31 { "help", helphelp, help, 0 }, 32 { "quit", quithelp, quit, 0 }, 33 { "restart", restarthelp, restart, 0 }, 34 { "start", starthelp, start, 1 }, 35 { "status", statushelp, status, 0 }, 36 { "stop", stophelp, stop, 1 }, 37 { "?", helphelp, help, 0 }, 38 { 0 }, 39 }; 40 41 int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); 42