122425Sdist /* 2*61843Sbostic * Copyright (c) 1983, 1993 3*61843Sbostic * The Regents of the University of California. All rights reserved. 434203Sbostic * 542801Sbostic * %sccs.include.redist.c% 622425Sdist */ 722425Sdist 812383Sralph #ifndef lint 9*61843Sbostic static char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 06/06/93"; 1034203Sbostic #endif /* not lint */ 1112383Sralph 1255472Sbostic #include <sys/cdefs.h> 1355472Sbostic 1455472Sbostic #include "lpc.h" 1555472Sbostic #include "extern.h" 1655472Sbostic 1712383Sralph /* 1812383Sralph * lpc -- command tables 1912383Sralph */ 2012383Sralph char aborthelp[] = "terminate a spooling daemon immediately and disable printing"; 2112383Sralph char cleanhelp[] = "remove cruft files from a queue"; 2212383Sralph char enablehelp[] = "turn a spooling queue on"; 2312383Sralph char disablehelp[] = "turn a spooling queue off"; 2416754Sralph char downhelp[] = "do a 'stop' followed by 'disable' and put a message in status"; 2512383Sralph char helphelp[] = "get help on commands"; 2612383Sralph char quithelp[] = "exit lpc"; 2716754Sralph char restarthelp[] = "kill (if possible) and restart a spooling daemon"; 2812383Sralph char starthelp[] = "enable printing and start a spooling daemon"; 2916754Sralph char statushelp[] = "show status of daemon and queue"; 3012383Sralph char stophelp[] = "stop a spooling daemon after current job completes and disable printing"; 3113727Sroot char topqhelp[] = "put job at top of printer queue"; 3216754Sralph char uphelp[] = "enable everything and restart spooling daemon"; 3312383Sralph 3412383Sralph struct cmd cmdtab[] = { 3555472Sbostic { "abort", aborthelp, doabort, 1 }, 3612383Sralph { "clean", cleanhelp, clean, 1 }, 3712383Sralph { "enable", enablehelp, enable, 1 }, 3812383Sralph { "exit", quithelp, quit, 0 }, 3912383Sralph { "disable", disablehelp, disable, 1 }, 4015908Sralph { "down", downhelp, down, 1 }, 4112383Sralph { "help", helphelp, help, 0 }, 4212383Sralph { "quit", quithelp, quit, 0 }, 4312383Sralph { "restart", restarthelp, restart, 0 }, 4458985Sralph { "start", starthelp, startcmd, 1 }, 4512383Sralph { "status", statushelp, status, 0 }, 4612383Sralph { "stop", stophelp, stop, 1 }, 4714092Sralph { "topq", topqhelp, topq, 1 }, 4816754Sralph { "up", uphelp, up, 1 }, 4912383Sralph { "?", helphelp, help, 0 }, 5012383Sralph { 0 }, 5112383Sralph }; 5212383Sralph 5312383Sralph int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); 54