xref: /original-bsd/usr.sbin/lpr/lpc/cmdtab.c (revision 6d35f901)
1 /*
2  * Copyright (c) 1983, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)cmdtab.c	8.1 (Berkeley) 06/06/93";
10 #endif /* not lint */
11 
12 #include <sys/cdefs.h>
13 
14 #include "lpc.h"
15 #include "extern.h"
16 
17 /*
18  * lpc -- command tables
19  */
20 char	aborthelp[] =	"terminate a spooling daemon immediately and disable printing";
21 char	cleanhelp[] =	"remove cruft files from a queue";
22 char	enablehelp[] =	"turn a spooling queue on";
23 char	disablehelp[] =	"turn a spooling queue off";
24 char	downhelp[] =	"do a 'stop' followed by 'disable' and put a message in status";
25 char	helphelp[] =	"get help on commands";
26 char	quithelp[] =	"exit lpc";
27 char	restarthelp[] =	"kill (if possible) and restart a spooling daemon";
28 char	starthelp[] =	"enable printing and start a spooling daemon";
29 char	statushelp[] =	"show status of daemon and queue";
30 char	stophelp[] =	"stop a spooling daemon after current job completes and disable printing";
31 char	topqhelp[] =	"put job at top of printer queue";
32 char	uphelp[] =	"enable everything and restart spooling daemon";
33 
34 struct cmd cmdtab[] = {
35 	{ "abort",	aborthelp,	doabort,	1 },
36 	{ "clean",	cleanhelp,	clean,		1 },
37 	{ "enable",	enablehelp,	enable,		1 },
38 	{ "exit",	quithelp,	quit,		0 },
39 	{ "disable",	disablehelp,	disable,	1 },
40 	{ "down",	downhelp,	down,		1 },
41 	{ "help",	helphelp,	help,		0 },
42 	{ "quit",	quithelp,	quit,		0 },
43 	{ "restart",	restarthelp,	restart,	0 },
44 	{ "start",	starthelp,	startcmd,	1 },
45 	{ "status",	statushelp,	status,		0 },
46 	{ "stop",	stophelp,	stop,		1 },
47 	{ "topq",	topqhelp,	topq,		1 },
48 	{ "up",		uphelp,		up,		1 },
49 	{ "?",		helphelp,	help,		0 },
50 	{ 0 },
51 };
52 
53 int	NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);
54