aboutsummaryrefslogtreecommitdiff
path: root/jim-load.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2009-07-28 15:46:40 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 10:11:02 +1000
commit462954132b1830a7e470436bf751fe8e86291c72 (patch)
treee4a917e94147dda69ecf9b74df2a9f2605edc99c /jim-load.c
parent981bd5980a5f2ef5e1a527dd3bd90d9f6cfaa632 (diff)
downloadjimtcl-462954132b1830a7e470436bf751fe8e86291c72.zip
jimtcl-462954132b1830a7e470436bf751fe8e86291c72.tar.gz
jimtcl-462954132b1830a7e470436bf751fe8e86291c72.tar.bz2
Lots of improvements
jim --- Add a unique id facility to jim (Jim_GetId()) Remove unused jim_vasprintf(), Jim_AppendString_sprintf() Remove duplicate output in Jim_Panic() Add support for catch -signal aio --- Use this for aio handles aio automatically creates stdin, stdout and stderr channels Jim_AioFilehandle() returns the 'FILE *' filehandle for a channel If JIM_TCL_COMPAT is set, create top level open, close, read, puts, etc. load ---- load core command split out into jim-load.c package ------- package core command split out into jim-package.c added 'package list' posix ----- Remove os.sleep, os.usleep, os.sethostname, os.signal, pit, Jpit Most of these are in 'signal'
Diffstat (limited to 'jim-load.c')
-rw-r--r--jim-load.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/jim-load.c b/jim-load.c
index 8572405..ebd6b63 100644
--- a/jim-load.c
+++ b/jim-load.c
@@ -116,3 +116,19 @@ int Jim_LoadLibrary(Jim_Interp *interp, const char *pathName)
}
#endif/* JIM_DYNLIB */
+/* [load] */
+static int Jim_LoadCoreCommand(Jim_Interp *interp, int argc,
+ Jim_Obj *const *argv)
+{
+ if (argc < 2) {
+ Jim_WrongNumArgs(interp, 1, argv, "libaryFile");
+ return JIM_ERR;
+ }
+ return Jim_LoadLibrary(interp, Jim_GetString(argv[1], NULL));
+}
+
+int Jim_loadInit(Jim_Interp *interp)
+{
+ Jim_CreateCommand(interp, "load", Jim_LoadCoreCommand, NULL, NULL);
+ return JIM_OK;
+}