xref: /csrg-svn/usr.sbin/lpr/lpc/cmdtab.c (revision 42801)
122425Sdist /*
222425Sdist  * Copyright (c) 1983 Regents of the University of California.
334203Sbostic  * All rights reserved.
434203Sbostic  *
5*42801Sbostic  * %sccs.include.redist.c%
622425Sdist  */
722425Sdist 
812383Sralph #ifndef lint
9*42801Sbostic static char sccsid[] = "@(#)cmdtab.c	5.4 (Berkeley) 06/01/90";
1034203Sbostic #endif /* not lint */
1112383Sralph 
1212383Sralph /*
1312383Sralph  * lpc -- command tables
1412383Sralph  */
1512383Sralph 
1612383Sralph #include "lpc.h"
1712383Sralph 
1816754Sralph int	abort(), clean(), enable(), disable(), down(), help();
1916754Sralph int	quit(), restart(), start(), status(), stop(), topq(), up();
2012383Sralph 
2112383Sralph char	aborthelp[] =	"terminate a spooling daemon immediately and disable printing";
2212383Sralph char	cleanhelp[] =	"remove cruft files from a queue";
2312383Sralph char	enablehelp[] =	"turn a spooling queue on";
2412383Sralph char	disablehelp[] =	"turn a spooling queue off";
2516754Sralph char	downhelp[] =	"do a 'stop' followed by 'disable' and put a message in status";
2612383Sralph char	helphelp[] =	"get help on commands";
2712383Sralph char	quithelp[] =	"exit lpc";
2816754Sralph char	restarthelp[] =	"kill (if possible) and restart a spooling daemon";
2912383Sralph char	starthelp[] =	"enable printing and start a spooling daemon";
3016754Sralph char	statushelp[] =	"show status of daemon and queue";
3112383Sralph char	stophelp[] =	"stop a spooling daemon after current job completes and disable printing";
3213727Sroot char	topqhelp[] =	"put job at top of printer queue";
3316754Sralph char	uphelp[] =	"enable everything and restart spooling daemon";
3412383Sralph 
3512383Sralph struct cmd cmdtab[] = {
3612383Sralph 	{ "abort",	aborthelp,	abort,		1 },
3712383Sralph 	{ "clean",	cleanhelp,	clean,		1 },
3812383Sralph 	{ "enable",	enablehelp,	enable,		1 },
3912383Sralph 	{ "exit",	quithelp,	quit,		0 },
4012383Sralph 	{ "disable",	disablehelp,	disable,	1 },
4115908Sralph 	{ "down",	downhelp,	down,		1 },
4212383Sralph 	{ "help",	helphelp,	help,		0 },
4312383Sralph 	{ "quit",	quithelp,	quit,		0 },
4412383Sralph 	{ "restart",	restarthelp,	restart,	0 },
4512383Sralph 	{ "start",	starthelp,	start,		1 },
4612383Sralph 	{ "status",	statushelp,	status,		0 },
4712383Sralph 	{ "stop",	stophelp,	stop,		1 },
4814092Sralph 	{ "topq",	topqhelp,	topq,		1 },
4916754Sralph 	{ "up",		uphelp,		up,		1 },
5012383Sralph 	{ "?",		helphelp,	help,		0 },
5112383Sralph 	{ 0 },
5212383Sralph };
5312383Sralph 
5412383Sralph int	NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);
55