diff options
author | Steve Bennett <steveb@workware.net.au> | 2009-07-28 23:27:07 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 10:11:02 +1000 |
commit | 6d4a1fed22fa67739a2b51d9ee9f343cbd70f300 (patch) | |
tree | 0779f449d9eb3a4a1a625cc3529f9bc34127556f /jim-subcmd.c | |
parent | 190223fa72351ee07c5006b46eee3a9194605cda (diff) | |
download | jimtcl-6d4a1fed22fa67739a2b51d9ee9f343cbd70f300.zip jimtcl-6d4a1fed22fa67739a2b51d9ee9f343cbd70f300.tar.gz jimtcl-6d4a1fed22fa67739a2b51d9ee9f343cbd70f300.tar.bz2 |
Convert jim-aio.c to use subcmd
Also:
- make stream.server set SO_REUSEADDR
- do object reference properly for callbacks
- white space cleanup in jim-eventloop.c
- fix the pwd command
- add support for JIM_MODFLAG_FULLARGV to subcmd
- make verbose runtests easier to read
- bio might not be available
Diffstat (limited to 'jim-subcmd.c')
-rw-r--r-- | jim-subcmd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/jim-subcmd.c b/jim-subcmd.c index 044c8c9..3859606 100644 --- a/jim-subcmd.c +++ b/jim-subcmd.c @@ -175,7 +175,12 @@ int Jim_CallSubCmd(Jim_Interp *interp, const jim_subcmd_type *ct, int argc, Jim_ int ret = JIM_ERR; if (ct) { - ret = ct->function(interp, argc - 2, argv + 2); + if (ct->flags & JIM_MODFLAG_FULLARGV) { + ret = ct->function(interp, argc, argv); + } + else { + ret = ct->function(interp, argc - 2, argv + 2); + } if (ret < 0) { Jim_SetResultString(interp, "wrong # args: should be \"", -1); add_subcmd_usage(interp, ct, argc, argv); |