xref: /csrg-svn/usr.sbin/lpr/lpc/cmdtab.c (revision 15908)
112383Sralph #ifndef lint
2*15908Sralph static char sccsid[] = "@(#)cmdtab.c	4.5 (Berkeley) 01/30/84";
312383Sralph #endif
412383Sralph 
512383Sralph /*
612383Sralph  * lpc -- command tables
712383Sralph  */
812383Sralph 
912383Sralph #include "lpc.h"
1012383Sralph 
1112383Sralph int	abort(), clean(), enable(), disable(), help();
1212383Sralph int	quit(), restart(), start(), status(), stop();
13*15908Sralph int	topq(), down();
1412383Sralph 
1512383Sralph char	aborthelp[] =	"terminate a spooling daemon immediately and disable printing";
1612383Sralph char	cleanhelp[] =	"remove cruft files from a queue";
1712383Sralph char	enablehelp[] =	"turn a spooling queue on";
1812383Sralph char	disablehelp[] =	"turn a spooling queue off";
1912383Sralph char	helphelp[] =	"get help on commands";
2012383Sralph char	quithelp[] =	"exit lpc";
2112383Sralph char	restarthelp[] =	"restart a spooling daemon that has died";
2212383Sralph char	starthelp[] =	"enable printing and start a spooling daemon";
2312383Sralph char	statushelp[] =	"show status of daemon";
2412383Sralph char	stophelp[] =	"stop a spooling daemon after current job completes and disable printing";
25*15908Sralph char	downhelp[] =	"do a 'stop' followed by 'disable' and put a message in status";
2613727Sroot char	topqhelp[] =	"put job at top of printer queue";
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 },
34*15908Sralph 	{ "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 },
4212383Sralph 	{ "?",		helphelp,	help,		0 },
4312383Sralph 	{ 0 },
4412383Sralph };
4512383Sralph 
4612383Sralph int	NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);
47