manual page first distributed with 4.3BSD
[unix-history] / usr / src / usr.sbin / lpr / lpc / cmdtab.c
CommitLineData
c5364086 1#ifndef lint
66697c8d 2static char sccsid[] = "@(#)cmdtab.c 4.6 (Berkeley) %G%";
c5364086
RC
3#endif
4
5/*
6 * lpc -- command tables
7 */
8
9#include "lpc.h"
10
66697c8d
RC
11int abort(), clean(), enable(), disable(), down(), help();
12int quit(), restart(), start(), status(), stop(), topq(), up();
c5364086
RC
13
14char aborthelp[] = "terminate a spooling daemon immediately and disable printing";
15char cleanhelp[] = "remove cruft files from a queue";
16char enablehelp[] = "turn a spooling queue on";
17char disablehelp[] = "turn a spooling queue off";
66697c8d 18char downhelp[] = "do a 'stop' followed by 'disable' and put a message in status";
c5364086
RC
19char helphelp[] = "get help on commands";
20char quithelp[] = "exit lpc";
66697c8d 21char restarthelp[] = "kill (if possible) and restart a spooling daemon";
c5364086 22char starthelp[] = "enable printing and start a spooling daemon";
66697c8d 23char statushelp[] = "show status of daemon and queue";
c5364086 24char stophelp[] = "stop a spooling daemon after current job completes and disable printing";
25e0cdec 25char topqhelp[] = "put job at top of printer queue";
66697c8d 26char uphelp[] = "enable everything and restart spooling daemon";
c5364086
RC
27
28struct cmd cmdtab[] = {
29 { "abort", aborthelp, abort, 1 },
30 { "clean", cleanhelp, clean, 1 },
31 { "enable", enablehelp, enable, 1 },
32 { "exit", quithelp, quit, 0 },
33 { "disable", disablehelp, disable, 1 },
815c5da6 34 { "down", downhelp, down, 1 },
c5364086
RC
35 { "help", helphelp, help, 0 },
36 { "quit", quithelp, quit, 0 },
37 { "restart", restarthelp, restart, 0 },
38 { "start", starthelp, start, 1 },
39 { "status", statushelp, status, 0 },
40 { "stop", stophelp, stop, 1 },
03953fc4 41 { "topq", topqhelp, topq, 1 },
66697c8d 42 { "up", uphelp, up, 1 },
c5364086
RC
43 { "?", helphelp, help, 0 },
44 { 0 },
45};
46
47int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);