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