aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-01-24 10:40:18 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:39 +1000
commit16360e9b8aded842ab0d343969eb13354750b5bb (patch)
treede8e8c532fa5e28804360919f0a651a2be8650cf
parentb6cb7fb49a02a24d4c9435d3c010bb1606c3d6fe (diff)
downloadjimtcl-16360e9b8aded842ab0d343969eb13354750b5bb.zip
jimtcl-16360e9b8aded842ab0d343969eb13354750b5bb.tar.gz
jimtcl-16360e9b8aded842ab0d343969eb13354750b5bb.tar.bz2
Fix a couple of bugs
Fix unset ::var properly this time Ensure that jimsh exits with the correct exit code *: Previously a script that did 'exit 0' would exit with 7!
-rw-r--r--jim.c1
-rw-r--r--jimsh.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 03fcb43..9b1f4d6 100644
--- a/jim.c
+++ b/jim.c
@@ -121,6 +121,7 @@ static char *JimEmptyStringRep = (char*) "";
* ---------------------------------------------------------------------------*/
static void JimChangeCallFrameId(Jim_Interp *interp, Jim_CallFrame *cf);
static void JimFreeCallFrame(Jim_Interp *interp, Jim_CallFrame *cf, int flags);
+static int ListSetIndex(Jim_Interp *interp, Jim_Obj *listPtr, int index, Jim_Obj *newObjPtr, int flags);
static Jim_HashTableType JimVariablesHashTableType;
diff --git a/jimsh.c b/jimsh.c
index 464f943..d94668d 100644
--- a/jimsh.c
+++ b/jimsh.c
@@ -159,7 +159,8 @@ int main(int argc, char *const argv[])
} else {
Jim_SetVariableStr(interp, "argv0", Jim_NewStringObj(interp, argv[1], -1));
Jim_SetVariableStrWithStr(interp, JIM_INTERACTIVE, "0");
- if ((retcode = Jim_EvalFile(interp, argv[1])) == JIM_ERR) {
+ retcode = Jim_EvalFile(interp, argv[1]);
+ if (retcode == JIM_ERR || retcode == JIM_ERR_ADDSTACK) {
Jim_PrintErrorMessage(interp);
}
}