xref: /original-bsd/usr.sbin/timed/timedc/cmdtab.c (revision d0e3910b)
1 /*
2  * Copyright (c) 1983 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  */
12 
13 #ifndef lint
14 static char sccsid[] = "@(#)cmdtab.c	2.4 (Berkeley) 12/23/87";
15 #endif /* not lint */
16 
17 #include "timedc.h"
18 
19 int	clockdiff(), help(), msite(), quit(), testing(), tracing();
20 
21 char	clockdiffhelp[] =	"measures clock differences between machines";
22 char	helphelp[] =		"gets help on commands";
23 char	msitehelp[] =		"finds location of master";
24 char	quithelp[] =		"exits timedc";
25 char	testinghelp[] =		"causes election timers to expire";
26 char	tracinghelp[] =		"turns tracing on or off";
27 
28 struct cmd cmdtab[] = {
29 	{ "clockdiff",	clockdiffhelp,	clockdiff,	0 },
30 	{ "election",	testinghelp,	testing,	1 },
31 	{ "help",	helphelp,	help,		0 },
32 	{ "msite",	msitehelp,	msite,		0 },
33 	{ "quit",	quithelp,	quit,		0 },
34 	{ "trace",	tracinghelp,	tracing,	1 },
35 	{ "?",		helphelp,	help,		0 },
36 };
37 
38 int	NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);
39