aboutsummaryrefslogtreecommitdiff
path: root/jim.h
AgeCommit message (Collapse)AuthorFilesLines
2011-07-08Better proc optional arg handlingSteve Bennett1-7/+13
Allows args and optional parameters in any location, in addition to being smaller and faster. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-28Don't try to store an int into a (void *)Steve Bennett1-4/+7
Instead do it properly with a union Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Add --maintainer optionSteve Bennett1-1/+0
Enables [debug] and JimPanic() JimPanic() is an assertion feature which is generally only of interest to developers, so disable it by default to save space and time.
2011-06-10Unload dlopen() handles on freeing interpreterSteve Bennett1-0/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Always define strtoull as strtoul if no 64 bit intsSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Add TclX-compatible loop commandSteve Bennett1-2/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-09Better handling of environ on Mac OS XSteve Bennett1-0/+4
Shared libraries can't access environ directly, so use _NSGetEnviron() on Mac OS X Also, load modules with (RTLD_NOW | RTLD_LOCAL) instead of RTLD_LAZY Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-09Use autosetup instead of autoconfSteve Bennett1-8/+0
Faster, simpler auto-configuration Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-01Add [upcall] commandSteve Bennett1-0/+1
Allows previous command definitions to be invoked when otherwise hidden via [local] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-01Use a union for Jim_Cmd fieldsSteve Bennett1-12/+21
There is no overlap between proc command fields and native command fields, so overlap them with a union. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-01local procs now keep and restore previous defnSteve Bennett1-0/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-01Add Jim_String() macroSteve Bennett1-0/+1
It is very common to get the string value without the length. Jim_String() is a macro which does that. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-23Remove some unused codeSteve Bennett1-1/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-18Rename more internal functionsSteve Bennett1-2/+3
In general, use Jim_ only for public APIs. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-22[package require] should load at the global levelSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-22Simplify the accounting of call frame levelsSteve Bennett1-4/+3
Store the level directly in the call frame rather than counting it separately. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-05Bump version to 0.71Steve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-21Bump version to 0.70Steve Bennett1-1/+1
In preparation for the next release Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-15Fix an object sharing bug for arraysSteve Bennett1-0/+2
Commands which modify variables in place such as append, lappend, incr and lset did not correctly account for modifying a shared array through an array element (dict sugar). Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-24Add support for [dict] size, merge, withSteve Bennett1-0/+3
Implement 'dict with' and 'dict merge' as scripts since this is simpler. Use 'dict size' to implement 'array size' Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17For ctype macros, cast to unsigned charSteve Bennett1-0/+2
Instead of unsigned. Add UCHAR() macro for this. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add UTF-8 support to JimSteve Bennett1-8/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-09Allow jim to be used as an autoconf subdirSteve Bennett1-1/+1
Ensure that no public headers include the autoconf header, jimautoconf.h, as it leads to problems with redefined symbols. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-08Don't hardcode /lib/jimSteve Bennett1-5/+0
Instead, set TCL_LIBRARY based on where jim is installed. This defaults to /usr/local (thus /usr/local/lib/jim), or can be modified with either configure or make. e.g. ./configure --prefix=/usr or make prefix=/usr install Now auto_path is initialised only to TCL_LIBRARY, and doesn't include "." which could be undesirable. At the same time, simplify jimsh initialisation using a script instead of C code. Add the path to the executable to auto_path. Also, no longer use JIM_TCL_COMPAT. Always use the tcl-compatible names, $auto_path and $tcl_interactive. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-30Allow extensions to be built/installed as modulesSteve Bennett1-34/+21
This includes C extensions and Tcl extensions Also adds windows support (mingw32 and cygwin) Now the sqlite*, readline and win32 extensions are supported Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-30Determine platform_tcl() settings with configureSteve Bennett1-0/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-29Update version to 0.64Steve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Add support for 'dict keys'Steve Bennett1-0/+1
And implement 'array names' in terms of it Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Licence wording updates.Steve Bennett1-2/+0
Per v0.51, don't refer to the FreeBSD licence Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix -Wshadow warningsSteve Bennett1-2/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Portability fixesSteve Bennett1-0/+3
Especially for eCos, mingw32 and cygwin Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Remove dependence of jim core on stderrSteve Bennett1-1/+1
Remove Jim_PrintErrorMessage() and create Jim_MakeErrorMessage() instead. Move errorInfo to stdlib since it is now required. Also move lassign from tclcompat to stdlib as a core command. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add install target to MakefileSteve Bennett1-1/+1
This also respects CFLAGS and LDFLAGS from configure and allows them to be overriden on the make command line Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Reduce max nesting depth to 1000Steve Bennett1-1/+1
Helps to avoid overrunning stack
2010-10-15Make jim more reentrantSteve Bennett1-1/+2
Make the exec wait table allocated and per-interpeter Use reentrant variants of some libc calls Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Improvements to script internal repSteve Bennett1-0/+4
No need to keep line number info on every script token Instead add it into the 'LINE' token Also remember the first line number of the script in the script object Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15eventloop improvements and enhancementsSteve Bennett1-3/+2
Move Jim_EvalObjBackground() out of the core to eventloop Time events are now kept and triggered in time order Time handlers are removed before execution Add 'update' Add 'after info' and 'after idle' Include time events in the return from Jim_ProcessEvents() Add Tcl eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some eventloop bugsSteve Bennett1-0/+1
bgerror is supposed to be suppressed subsequently if it returns break vwait should error on invalid array element vwait should return an empty result Don't accept 'after info' since it isn't supported Also add some eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Make sure all static data is marked read-onlySteve Bennett1-1/+1
This reduces the size of the non-shared data segment Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15autoconf improvementsSteve Bennett1-4/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add basic ipv6 support to JimSteve Bennett1-0/+1
Use -ipv6 to signify that ipv6 should be used Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Clean up the indentation messSteve Bennett1-0/+891
Use 'indent'. Not perfect, but at least consistent. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Use configure to create jim.hSteve Bennett1-873/+0
jim.h can be used externally, including HAVE_LONG_LONG
2010-10-15Improve stack trace handlingSteve Bennett1-1/+2
*: Get rid of JIM_ERR_ADDSTACK and use interp->addStackTrace instead *: 'return -code error' doesn't add a stack frame *: Rename _file_copy to {file copy} for better error messages *: Use 'return -code' to prevent excessive levels in the stack trace Also rename info_nameofexecutable to {info nameofexecutable}
2010-10-15Code cleanups, mostly formattingSteve Bennett1-1/+1
2010-10-15Documentation, build system updatesSteve Bennett1-14/+2
Document reference-related commands *: ref, getref, setref, finalize, lambda were missing Build system updates *: Add check for long long to configure *: Change -Dwith_jim_ext_... to -Djim_ext_... *: Fix jim-eventloop when compiling with no long long
2010-10-15Add Jim_SetResultFormatted() for simplied messagesSteve Bennett1-2/+3
Makes creating error messages much simpler Also convert a couple of long if/else to switch Also some error message improvements Also fix some memory leaks
2010-10-15Implement TIP #288Steve Bennett1-5/+7
See http://www.tcl.tk/cgi-bin/tct/tip/288.html Args and optional args may be to the left of required args
2010-10-15Allow catch to specify what is caughtSteve Bennett1-0/+9
*: Default to the same as Tcl. Not signal, eval, exit. *: Use 'catch -exit' to also catch exit. *: Also map for standard return codes: [info returncodes] *: Also Jim_ReturnCode() *: Add Jim_FindByName() for searching in a char* array *: Fix 'info nameofexectutable' if $::jim_argv0 is not set
2010-10-15Simplify and speed up exprSteve Bennett1-0/+4
*: Reuse the ParseTokenList/ScriptToken machinery for 'expr' *: This is simpler than managing separate opcode/obj arrays *: expr opcodes are now in the same namespace as token types *: expr identifies int and double during parsing *: Move the 'while' common expr optimisations into Jim_EvalExpression *: Add a special trueObj and falseObj to help with these boolean optimisations *: Add lazy versions as the byte code is created instead of at the end *: Avoid repeated conversion attempts to int *: Once an object fails conversion to int and succeeds conversion to double, invalidate the string rep so the int conversion attempt no longer happens *: Also, avoid converting non-ints to int in expression optimisation *: No need for a string token for SEP and EOL tokens *: Fix shimmering of int -> double *: When an int shimmers to a double during an expression, remember that the value was originally an int (via a new type, coerced double)