122425Sdist /* 222425Sdist * Copyright (c) 1983 Regents of the University of California. 3*34203Sbostic * All rights reserved. 4*34203Sbostic * 5*34203Sbostic * Redistribution and use in source and binary forms are permitted 6*34203Sbostic * provided that this notice is preserved and that due credit is given 7*34203Sbostic * to the University of California at Berkeley. The name of the University 8*34203Sbostic * may not be used to endorse or promote products derived from this 9*34203Sbostic * software without specific prior written permission. This software 10*34203Sbostic * is provided ``as is'' without express or implied warranty. 1122425Sdist */ 1222425Sdist 1312383Sralph #ifndef lint 14*34203Sbostic static char sccsid[] = "@(#)cmdtab.c 5.2 (Berkeley) 05/05/88"; 15*34203Sbostic #endif /* not lint */ 1612383Sralph 1712383Sralph /* 1812383Sralph * lpc -- command tables 1912383Sralph */ 2012383Sralph 2112383Sralph #include "lpc.h" 2212383Sralph 2316754Sralph int abort(), clean(), enable(), disable(), down(), help(); 2416754Sralph int quit(), restart(), start(), status(), stop(), topq(), up(); 2512383Sralph 2612383Sralph char aborthelp[] = "terminate a spooling daemon immediately and disable printing"; 2712383Sralph char cleanhelp[] = "remove cruft files from a queue"; 2812383Sralph char enablehelp[] = "turn a spooling queue on"; 2912383Sralph char disablehelp[] = "turn a spooling queue off"; 3016754Sralph char downhelp[] = "do a 'stop' followed by 'disable' and put a message in status"; 3112383Sralph char helphelp[] = "get help on commands"; 3212383Sralph char quithelp[] = "exit lpc"; 3316754Sralph char restarthelp[] = "kill (if possible) and restart a spooling daemon"; 3412383Sralph char starthelp[] = "enable printing and start a spooling daemon"; 3516754Sralph char statushelp[] = "show status of daemon and queue"; 3612383Sralph char stophelp[] = "stop a spooling daemon after current job completes and disable printing"; 3713727Sroot char topqhelp[] = "put job at top of printer queue"; 3816754Sralph char uphelp[] = "enable everything and restart spooling daemon"; 3912383Sralph 4012383Sralph struct cmd cmdtab[] = { 4112383Sralph { "abort", aborthelp, abort, 1 }, 4212383Sralph { "clean", cleanhelp, clean, 1 }, 4312383Sralph { "enable", enablehelp, enable, 1 }, 4412383Sralph { "exit", quithelp, quit, 0 }, 4512383Sralph { "disable", disablehelp, disable, 1 }, 4615908Sralph { "down", downhelp, down, 1 }, 4712383Sralph { "help", helphelp, help, 0 }, 4812383Sralph { "quit", quithelp, quit, 0 }, 4912383Sralph { "restart", restarthelp, restart, 0 }, 5012383Sralph { "start", starthelp, start, 1 }, 5112383Sralph { "status", statushelp, status, 0 }, 5212383Sralph { "stop", stophelp, stop, 1 }, 5314092Sralph { "topq", topqhelp, topq, 1 }, 5416754Sralph { "up", uphelp, up, 1 }, 5512383Sralph { "?", helphelp, help, 0 }, 5612383Sralph { 0 }, 5712383Sralph }; 5812383Sralph 5912383Sralph int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); 60