From 5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sun, 6 Nov 2011 23:21:48 +1000 Subject: Remove use of designated initialisers For better compatibility c89 compatibility. Also simplify jim-subcmd. Remove -usage and command descriptions. Signed-off-by: Steve Bennett --- jim-package.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'jim-package.c') diff --git a/jim-package.c b/jim-package.c index 9caec0d..83582ea 100644 --- a/jim-package.c +++ b/jim-package.c @@ -232,24 +232,33 @@ static int package_cmd_list(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } static const jim_subcmd_type package_command_table[] = { - {.cmd = "provide", - .args = "name ?version?", - .function = package_cmd_provide, - .minargs = 1, - .maxargs = 2, - .description = "Indicates that the current script provides the given package"}, - {.cmd = "require", - .args = "name ?version?", - .function = package_cmd_require, - .minargs = 1, - .maxargs = 2, - .description = "Loads the given package by looking in standard places"}, - {.cmd = "list", - .function = package_cmd_list, - .minargs = 0, - .maxargs = 0, - .description = "Lists all known packages"}, - {0} + { + "provide", + "name ?version?", + package_cmd_provide, + 1, + 2, + /* Description: Indicates that the current script provides the given package */ + }, + { + "require", + "name ?version?", + package_cmd_require, + 1, + 2, + /* Description: Loads the given package by looking in standard places */ + }, + { + "list", + NULL, + package_cmd_list, + 0, + 0, + /* Description: Lists all known packages */ + }, + { + NULL + } }; int Jim_packageInit(Jim_Interp *interp) -- cgit v1.1