aboutsummaryrefslogtreecommitdiff
path: root/jim-package.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-11-06 23:21:48 +1000
committerSteve Bennett <steveb@workware.net.au>2011-11-07 15:31:29 +1000
commit5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96 (patch)
tree3b010fb2fc159e74b3f5eb14dc273179a159e36d /jim-package.c
parent5e7859e24d9534bf1e7e745bf1e2906afcf83633 (diff)
downloadjimtcl-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-package.c')
-rw-r--r--jim-package.c45
1 files changed, 27 insertions, 18 deletions
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)