/
umud/DOC/
umud/DOC/examples/
umud/DOC/internals/
umud/DOC/wizard/
umud/MISC/
umud/MISC/dbchk/
umud/RWHO/rwhod/
#ifndef	_INCL_CMD_H

/*
structure of a command table entry. commands are all installed in 'cmd.c'
and are easily added by making an entry in the table there. each command
here has a unique name, argument count, flags, a function pointer, and a
string that is its "help"/usage message (short error message). the argc
field specifies the *minimum* number of tokens the command expects to be
called with (IE: 0 for none) - more can be provided, if the CM_FIXARG
parameter is NOT set in 'flgs'. the CM_PRIV flag implies that only
privileged users can call this command - is the user is not privileged,
they should not even be aware of its existence!

the CM_EXACT flag means that the command should only be "visible" if
there is an exact match.

the idea is to localize the adding of new functions to one piece of
code: the command table in 'cmd.c'.
*/
typedef	struct	{
	char	*name;
	int	argc;
	int	flgs;
	int	(*func)();
	char	*usage;
} Cmd;

#define	CM_NOFLG	000
#define	CM_PRIV		001	/* requires permissions */
#define	CM_FIXARG	002	/* arg count must match exactly */
#define	CM_EXACT	004	/* don't allow prefix-only */
#define	CM_NOWHERE	010	/* permitted if players aren't anyplace */

extern	Cmd	*cmdlookup();

#define	_INCL_CMD_H
#endif