diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-11-06 23:21:48 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-11-07 15:31:29 +1000 |
commit | 5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96 (patch) | |
tree | 3b010fb2fc159e74b3f5eb14dc273179a159e36d /jim-subcmd.h | |
parent | 5e7859e24d9534bf1e7e745bf1e2906afcf83633 (diff) | |
download | jimtcl-5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96.zip jimtcl-5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96.tar.gz jimtcl-5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96.tar.bz2 |
Remove use of designated initialisers
For better compatibility c89 compatibility.
Also simplify jim-subcmd. Remove -usage and command descriptions.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-subcmd.h')
-rw-r--r-- | jim-subcmd.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/jim-subcmd.h b/jim-subcmd.h index 3a672eb..f10f5f6 100644 --- a/jim-subcmd.h +++ b/jim-subcmd.h @@ -28,8 +28,7 @@ typedef struct { tclmod_cmd_function *function; /* Function implementing the subcommand */ short minargs; /* Minimum required arguments */ short maxargs; /* Maximum allowed arguments or -1 if no limit */ - unsigned flags; /* JIM_MODFLAG_... plus custom flags */ - const char *description; /* Description of the subcommand */ + unsigned short flags; /* JIM_MODFLAG_... plus custom flags */ } jim_subcmd_type; /** @@ -71,20 +70,6 @@ int Jim_SubCmdProc(Jim_Interp *interp, int argc, Jim_Obj *const *argv); */ int Jim_CallSubCmd(Jim_Interp *interp, const jim_subcmd_type *ct, int argc, Jim_Obj *const *argv); -/** - * Standard processing for a command. - * - * This does the '-help' and '-usage' check and the number of args checks. - * for a top level command against a single 'jim_subcmd_type' structure. - * - * Additionally, if command_table->function is set, it should point to a sub command table - * and '-subhelp ?subcmd?', '-subusage' and '-subcommands' are then also recognised. - * - * Returns 0 if user requested usage, -1 on arg error, 1 if OK to process. - */ -int -Jim_CheckCmdUsage(Jim_Interp *interp, const jim_subcmd_type *command_table, int argc, Jim_Obj *const *argv); - #ifdef __cplusplus } #endif |