aboutsummaryrefslogtreecommitdiff
path: root/jimsh.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-01-24 12:44:43 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:44 +1000
commita230afdc68bcad14a9dfd0f9c8c6955980669cd6 (patch)
tree7f0824345c96818381a7e8c4f919d1aadce44322 /jimsh.c
parent9652302fec62f76bf894c6b9eb849bda6994c293 (diff)
downloadjimtcl-a230afdc68bcad14a9dfd0f9c8c6955980669cd6.zip
jimtcl-a230afdc68bcad14a9dfd0f9c8c6955980669cd6.tar.gz
jimtcl-a230afdc68bcad14a9dfd0f9c8c6955980669cd6.tar.bz2
Many improvements, bug fixes
*: Allow math functions to be enabled via configure *: Allow support for references to be removed *: Documentation updates *: Jim_ListLength() now returns the result directly *: Optimise list -> dict conversion *: Consistent capitalisation of some structures, functions *: Add support for abbreviations to Jim_GetEnum() *: The commands to 'info' may be abbreviated *: Use abbreviation support in parsing options to 'subst' *: Use Jim_GetEnum() to parse return code names *: Optimise 'array get', 'array set' if no conversion needed *: Import Tcl string.test *: string compare now returns -1,0,1 like Tcl *: Fix 'string last' with index=0 *: Add support for 'string reverse' *: Add -nocase option to 'string equal' *: Fix infinite loop in 'string repeat str -1' *: Support braced patterns in glob *: glob should not return dot files unless the pattern starts with . *: Simplify glob.tcl by using some new features *: When creating C extensions from Tcl, preserve newlines and invoke with Jim_Eval_Named() to produce more meaningful error messages. *: Also remove all comments, not just those starting in the first column *: Add support for 'n+n' and 'n-n' in string/list indexes (Tcl 8.5) *: Add a level to the stack trace for 'return -code error' *: 'return -code' should also affect the return from 'source' (see Tcl docs) *: Fix lsort -command *: Some systems don't have INFINITY
Diffstat (limited to 'jimsh.c')
-rw-r--r--jimsh.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/jimsh.c b/jimsh.c
index 732bec9..46c4110 100644
--- a/jimsh.c
+++ b/jimsh.c
@@ -18,37 +18,16 @@
* limitations under the License.
*/
-#ifdef WIN32
-#define STRICT
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif /* WIN32 */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define JIM_EMBEDDED
#include "jim.h"
/* JimGetExePath try to get the absolute path of the directory
* of the jim binary, in order to add this path to the library path.
* Likely shipped libraries are in the same path too. */
-
-/* That's simple on windows: */
-#ifdef WIN32
-static Jim_Obj *JimGetExePath(Jim_Interp *interp, const char *argv0)
-{
- char path[MAX_PATH+1], *p;
- JIM_NOTUSED(argv0);
-
- GetModuleFileNameA(NULL, path, MAX_PATH);
- if ((p = strrchr(path, '\\')) != NULL)
- *p = 0;
- return Jim_NewStringObj(interp, path, -1);
-}
-#else /* WIN32 */
#ifndef JIM_ANSIC
/* A bit complex on POSIX */
#include <unistd.h>
@@ -96,7 +75,6 @@ static Jim_Obj *JimGetExePath(Jim_Interp *interp, const char *argv0)
return Jim_NewStringObj(interp, "/usr/local/lib/jim/", -1);
}
#endif /* JIM_ANSIC */
-#endif /* WIN32 */
static void JimLoadJimRc(Jim_Interp *interp)
{
@@ -125,7 +103,7 @@ static void JimSetArgv(Jim_Interp *interp, int argc, char *const argv[])
int n;
Jim_Obj *listObj = Jim_NewListObj(interp, NULL, 0);
- /* Populate argv and argv0 global vars */
+ /* Populate argv global var */
for (n = 0; n < argc; n++) {
Jim_Obj *obj = Jim_NewStringObj(interp, argv[n], -1);
Jim_ListAppendElement(interp, listObj, obj);