xref: /csrg-svn/usr.sbin/lpr/lpc/cmdtab.c (revision 22425)
1*22425Sdist /*
2*22425Sdist  * Copyright (c) 1983 Regents of the University of California.
3*22425Sdist  * All rights reserved.  The Berkeley software License Agreement
4*22425Sdist  * specifies the terms and conditions for redistribution.
5*22425Sdist  */
6*22425Sdist 
712383Sralph #ifndef lint
8*22425Sdist static char sccsid[] = "@(#)cmdtab.c	5.1 (Berkeley) 06/06/85";
9*22425Sdist #endif not lint
1012383Sralph 
1112383Sralph /*
1212383Sralph  * lpc -- command tables
1312383Sralph  */
1412383Sralph 
1512383Sralph #include "lpc.h"
1612383Sralph 
1716754Sralph int	abort(), clean(), enable(), disable(), down(), help();
1816754Sralph int	quit(), restart(), start(), status(), stop(), topq(), up();
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[] = {
3512383Sralph 	{ "abort",	aborthelp,	abort,		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 },
4412383Sralph 	{ "start",	starthelp,	start,		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