00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00037 #ifndef __commands_h_seen__
00038 #define __commands_h_seen__
00039
00041 enum arg_type {
00042 instance_arg,
00043 definition_arg,
00044 id_arg,
00045 shell_arg
00046 };
00047
00048 #define MAX_COMMAND_ARGS 4
00049
00051 extern void InitializeCommands(void);
00060 extern void DestroyCommands(void);
00063 typedef void (*InterfaceCommandF) (void);
00066 extern void AddCommand(int dummy, ...);
00079 extern unsigned long NumberCommands(void);
00082 extern CONST char *CommandName(unsigned long cmd_number);
00089 extern CONST char *CommandHelp(unsigned long cmd_number);
00096 extern void CommandFunc(unsigned long int cmd_number, InterfaceCommandF *func);
00104 extern int CommandTerminate(unsigned long cmd_number);
00111 extern int CommandNumArgs(unsigned long cmd_number);
00118 extern enum arg_type CommandArgument(unsigned long cmd_number, int n);
00125 extern void CommandArgsPrint(FILE *fp, unsigned long int cmd_number);
00132 extern void LimitCommand(unsigned long *lower,
00133 unsigned long *upper,
00134 CONST char *str,
00135 int place);
00144 extern void CompleteCommand(unsigned long lower,
00145 unsigned long upper,
00146 char *str,
00147 int *place);
00153 extern unsigned long FindCommand(CONST char *string);
00159 #endif
00160