aboutsummaryrefslogtreecommitdiff
path: root/jim.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts>2005-03-08 15:10:16 +0000
committerpatthoyts <patthoyts>2005-03-08 15:10:16 +0000
commit4e213d5078ebbd043fdd9e8c8593ec8949c3cf92 (patch)
tree5e613d9239663b75e6c5d77f8e85fead9e61da69 /jim.c
parent13e52adb1dea991b724c50d4e2019eda1f517cd5 (diff)
downloadjimtcl-4e213d5078ebbd043fdd9e8c8593ec8949c3cf92.zip
jimtcl-4e213d5078ebbd043fdd9e8c8593ec8949c3cf92.tar.gz
jimtcl-4e213d5078ebbd043fdd9e8c8593ec8949c3cf92.tar.bz2
JIM_VERSION is to be an integer value which we present as MAJOR.MINOR to
users. MAJOR is JIM_VERSION / 100
Diffstat (limited to 'jim.c')
-rw-r--r--jim.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/jim.c b/jim.c
index 0507294..190af76 100644
--- a/jim.c
+++ b/jim.c
@@ -1,7 +1,7 @@
/* Jim - A small embeddable Tcl interpreter
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
*
- * $Id: jim.c,v 1.81 2005/03/08 13:45:20 patthoyts Exp $
+ * $Id: jim.c,v 1.82 2005/03/08 15:10:16 patthoyts Exp $
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -9211,10 +9211,10 @@ static int Jim_InfoCoreCommand(Jim_Interp *interp, int argc,
int cmd, result = JIM_OK;
static const char *commands[] = {
"body", "commands", "exists", "globals", "level", "locals",
- "vars", "version", "patchlevel", NULL
+ "vars", "version", NULL
};
enum {INFO_BODY, INFO_COMMANDS, INFO_EXISTS, INFO_GLOBALS, INFO_LEVEL,
- INFO_LOCALS, INFO_VARS, INFO_VERSION, INFO_PATCHLEVEL};
+ INFO_LOCALS, INFO_VARS, INFO_VERSION};
if (argc < 2) {
Jim_WrongNumArgs(interp, 1, argv, "command ?args ...?");
@@ -9302,11 +9302,10 @@ static int Jim_InfoCoreCommand(Jim_Interp *interp, int argc,
Jim_SetResult(interp, argv[2]->internalRep.cmdValue.cmdPtr->bodyObjPtr);
break;
}
- case INFO_PATCHLEVEL: /* tcl compatability */
case INFO_VERSION: {
- char buf[(JIM_INTEGER_SPACE * 3) + 1];
- sprintf(buf, "%d.%d.%d",
- JIM_MAJOR_VERSION, JIM_MINOR_VERSION, JIM_PATCH_LEVEL);
+ char buf[(JIM_INTEGER_SPACE * 2) + 1];
+ sprintf(buf, "%d.%d",
+ JIM_VERSION / 100, JIM_VERSION % 100);
Jim_SetResultString(interp, buf, -1);
break;
}
@@ -9573,9 +9572,9 @@ int Jim_InteractivePrompt(Jim_Interp *interp)
{
int retcode = JIM_OK;
- printf("Welcome to Jim version %d.%d.%d, "
+ printf("Welcome to Jim version %d.%d, "
"Copyright (c) 2005 Salvatore Sanfilippo\n",
- JIM_MAJOR_VERSION, JIM_MINOR_VERSION, JIM_PATCH_LEVEL);
+ JIM_VERSION / 100, JIM_VERSION % 100);
while (1) {
char prg[1024];
const char *result;