Age | Commit message (Collapse) | Author | Files | Lines |
|
Especially simplifies checking for the existence of procs.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Under some circumstances, source filenames were being leaked.
Use shared strings consistently for filenames.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-By: Piotr Esden-Tempski <piotr@esden.net>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
With zero count and also with no list elements
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-By: Patrick WEBER <patrick.weber@live.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Instead of unsigned. Add UCHAR() macro for this.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Indexing into the wrong string
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This allows scripts with CRLF line endings on (e.g.) cygwin
to work without change.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Like 'chan names' from Tcl
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And implement 'array names' in terms of it
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
Per v0.51, don't refer to the FreeBSD licence
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
return JIM_ERR instead of JIM_OK.
|
|
If a string ended in backslash-space, the trailing space was lost.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Especially for eCos, mingw32 and cygwin
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
The optimisation for 'incr' should not use compare immediate
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Always convert via a list. Makes for smaller code with no noticable
performance impact.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Reference counting issues
Also don't allow rename to an existing command (Tcl compatible)
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Not Tcl compatible, but makes sense
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This meant that the single arg switch case would not give
accurate line numbers
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This reduces the size of the non-shared data segment
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Should have better performance
No longer need the command struct
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Found by the clang static analyser
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the list ended in a trailing newline
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to fix invalid chars in the tag name
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And also some other warnings courtesy of the clang static analyzer
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|