xref: /csrg-svn/usr.sbin/lpr/lpc/cmdtab.c (revision 16754)
112383Sralph #ifndef lint
2*16754Sralph static char sccsid[] = "@(#)cmdtab.c	4.6 (Berkeley) 07/24/84";
312383Sralph #endif
412383Sralph 
512383Sralph /*
612383Sralph  * lpc -- command tables
712383Sralph  */
812383Sralph 
912383Sralph #include "lpc.h"
1012383Sralph 
11*16754Sralph int	abort(), clean(), enable(), disable(), down(), help();
12*16754Sralph int	quit(), restart(), start(), status(), stop(), topq(), up();
1312383Sralph 
1412383Sralph char	aborthelp[] =	"terminate a spooling daemon immediately and disable printing";
1512383Sralph char	cleanhelp[] =	"remove cruft files from a queue";
1612383Sralph char	enablehelp[] =	"turn a spooling queue on";
1712383Sralph char	disablehelp[] =	"turn a spooling queue off";
18*16754Sralph char	downhelp[] =	"do a 'stop' followed by 'disable' and put a message in status";
1912383Sralph char	helphelp[] =	"get help on commands";
2012383Sralph char	quithelp[] =	"exit lpc";
21*16754Sralph char	restarthelp[] =	"kill (if possible) and restart a spooling daemon";
2212383Sralph char	starthelp[] =	"enable printing and start a spooling daemon";
23*16754Sralph char	statushelp[] =	"show status of daemon and queue";
2412383Sralph char	stophelp[] =	"stop a spooling daemon after current job completes and disable printing";
2513727Sroot char	topqhelp[] =	"put job at top of printer queue";
26*16754Sralph char	uphelp[] =	"enable everything and restart spooling daemon";
2712383Sralph 
2812383Sralph struct cmd cmdtab[] = {
2912383Sralph 	{ "abort",	aborthelp,	abort,		1 },
3012383Sralph 	{ "clean",	cleanhelp,	clean,		1 },
3112383Sralph 	{ "enable",	enablehelp,	enable,		1 },
3212383Sralph 	{ "exit",	quithelp,	quit,		0 },
3312383Sralph 	{ "disable",	disablehelp,	disable,	1 },
3415908Sralph 	{ "down",	downhelp,	down,		1 },
3512383Sralph 	{ "help",	helphelp,	help,		0 },
3612383Sralph 	{ "quit",	quithelp,	quit,		0 },
3712383Sralph 	{ "restart",	restarthelp,	restart,	0 },
3812383Sralph 	{ "start",	starthelp,	start,		1 },
3912383Sralph 	{ "status",	statushelp,	status,		0 },
4012383Sralph 	{ "stop",	stophelp,	stop,		1 },
4114092Sralph 	{ "topq",	topqhelp,	topq,		1 },
42*16754Sralph 	{ "up",		uphelp,		up,		1 },
4312383Sralph 	{ "?",		helphelp,	help,		0 },
4412383Sralph 	{ 0 },
4512383Sralph };
4612383Sralph 
4712383Sralph int	NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);
48