diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-04-09 09:13:50 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-04-14 10:51:13 +1000 |
commit | e6bf60412c25c48b07159610da2b338b6fd87ca1 (patch) | |
tree | 6517953f98d0eec890e0eda2565e924f63480b84 /jimsh.c | |
parent | 2daf648450364ae286295a8355c5c270cff23212 (diff) | |
download | jimtcl-e6bf60412c25c48b07159610da2b338b6fd87ca1.zip jimtcl-e6bf60412c25c48b07159610da2b338b6fd87ca1.tar.gz jimtcl-e6bf60412c25c48b07159610da2b338b6fd87ca1.tar.bz2 |
Support 'jimsh --version'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jimsh.c')
-rw-r--r-- | jimsh.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -67,6 +67,11 @@ int main(int argc, char *const argv[]) int retcode; Jim_Interp *interp; + if (argc > 1 && strcmp(argv[1], "--version") == 0) { + printf("%d.%d\n", JIM_VERSION / 100, JIM_VERSION % 100); + return 0; + } + /* Create and initialize the interpreter */ interp = Jim_CreateInterp(); Jim_RegisterCoreCommands(interp); |