aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-20Small fixes to make FreeBSD happy0.63Steve Bennett3-6/+6
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Mark some more static data as constSteve Bennett2-4/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Switch regexp/regsub to use Jim_GetEnum()Steve Bennett2-60/+82
Provides a better error message on wrong args and allows abbreviations. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Fix some outlier issues with regexp/regsubSteve Bennett3-594/+671
Use number of paren expressions with regexp -inline Fix a problem with regexp -start and an anchored search Fix regexp -inline -indices Fix regexp matching with an empty pattern (e.g. ^) Fix some cases where regsub -all did not return all results Fix some regsub cases with an empty pattern Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Allow regexp/regsub -start to be an indexSteve Bennett1-4/+11
Allows, e.g. -start end-4 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Fix regexp -all -line with an anchored searchSteve Bennett1-3/+5
Need to set REG_NOTBOL on subsequent calls to regexec() Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Declare some internal functions staticSteve Bennett2-19/+19
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Document dict keys and lsort -indexSteve Bennett2-3/+39
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Add support for 'dict keys'Steve Bennett3-27/+41
And implement 'array names' in terms of it Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Add support for lsort -indexSteve Bennett2-43/+283
Also bring in some lsort tests from Tcl Also allow lsort to be reentrant (but not thread safe) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Set $argc in jimshSteve Bennett3-1/+15
Apparently tclsh does this. It is just [llength $argv] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Fix a parse error on trailine newlineSteve Bennett1-6/+3
If a script contain [ with a trailing backslash, the parser would crash. e.g. . list [split \ Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Ensure that 'make install' installs jim.hSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Only indicate 'Runtime Error' from a scriptSteve Bennett1-2/+2
This makes for cleaner output from a console session and is compatible with earlier versions of Jim. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Properly allow the id to be set in bench.tclSteve Bennett1-1/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Rename Tcl.html_shipped to Tcl_shipped.htmlSteve Bennett2-2/+2
Makes it easier to browse the shipped version in the source tree. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Licence wording updates.Steve Bennett12-35/+9
Per v0.51, don't refer to the FreeBSD licence Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15If three arguments are passed to 'puts' and the second isn't -nonewline, ↵Wojciech A. Koszek1-1/+1
return JIM_ERR instead of JIM_OK.
2010-10-15Re-add some files lost from v0.51Steve Bennett9-1/+498
In particular the C examples (now in examples.api/) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix regsub to support strings with embedded nullsSteve Bennett2-16/+17
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix a concat bugSteve Bennett2-1/+39
If a string ended in backslash-space, the trailing space was lost. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix error message for deleting nonexistent procSteve Bennett2-4/+163
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some problems with global and upvarSteve Bennett2-13/+348
Redefining a link with upvar or global gave an error. Trying to access a non-existent var via a link gave the wrong error message. Added Tcl upvar tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add support for clock clicks, micros, millisSteve Bennett1-0/+41
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix -Wshadow warningsSteve Bennett6-95/+94
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Some systems insist that ctype macros use unsignedSteve Bennett2-18/+18
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Portability fixesSteve Bennett14-60/+454
Especially for eCos, mingw32 and cygwin Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Make it easier to enable and disable extensionsSteve Bennett2-34/+116
With --with-jim-ext and --with-out-jim-ext Also check dependencies and automatically disable extensions Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Add stubs in case of compiled-out package, aioSteve Bennett2-8/+22
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Remove dependence of jim core on stderrSteve Bennett7-66/+48
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 Bennett8-225/+6840
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-15Allow an optional version id in bench.tclSteve Bennett1-6/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Rename internal procs in tree.tclSteve Bennett1-32/+32
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-15Implement 'pid handle'Steve Bennett4-11/+99
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Avoid over-aggressive optimisation in Jim_EvalObj()Steve Bennett1-54/+55
The optimisation for 'incr' should not use compare immediate Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Allow exit from .jimrcSteve Bennett2-11/+13
Only show error on JIM_ERR from .jimrc Also fixes to rlprompt.tcl so it can be used from .jimrc Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Simplify dict creationSteve Bennett1-99/+32
Always convert via a list. Makes for smaller code with no noticable performance impact. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15More simplification of Jim_EvalObj()Steve Bennett1-122/+96
A bit smaller and easier to understand Move some common code to JimMakeScriptObj() Also add JimWideValue() to access internal int value Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Implement Tcl I/O wrappers in TclSteve Bennett2-111/+48
This allows 'rename' etc. to work correctly and is smaller, simpler code Also, read -nonewline is mutually exclusive with 'numChars' Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix bug when renaming the current procSteve Bennett2-24/+21
Reference counting issues Also don't allow rename to an existing command (Tcl compatible) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix reference counting of stack trace in 'error'Steve Bennett2-0/+9
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Skip tests for features which are not availableSteve Bennett13-11/+32
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Source location for failed tests was wrongSteve Bennett1-1/+15
That is, tests which didn't fail but did not give the expected result Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Make jim more reentrantSteve Bennett5-67/+96
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-15Ensure that Tcl extensions can be built-in or externalSteve Bennett19-5/+54
All C extensions must call Jim_PackageProvide() make-c-ext ensures that Tcl extensions call Jim_PackageProvide() if compiled in. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15string trimright now always removes nullsSteve Bennett2-3/+3
Not Tcl compatible, but makes sense Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Change tree API to be object-basedSteve Bennett2-109/+106
A small change, but makes for a more natural interface Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Minor cleanups and fixesSteve Bennett3-28/+18
array get for odd length list now returns an error comment fixes and small code rearrangement Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Use $::env to build environment for execSteve Bennett3-12/+180
Also, switch to using 'sh -c' for the vfork() implementation because it then allows command line redirection, pipes and setting the environment. Signed-off-by: Steve Bennett <steveb@workware.net.au>