Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Resolves #173.
|
|
Hash tables used to store variables are now use Jim_Obj keys rather
than allocated char *, so embedded nulls are supported.
This is generally a performance win as the existing Jim_Obj can be used
as the key.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If exit is caught with catch -exit, it is currently not possible
to retrieve the exit value. If an exit code is provided, set it
as the interp result.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In scripts, like Tcl does.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: tcler.yin
|
|
Non-zero return codes (e.g. break, continue, exit) were all being
converted to the error code.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Can happen if running interactively or via -e
Reported-by: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To access static variables (names and values) of a proc
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Even if a string has list rep internally,
the original string rep (if there is one) should be used when evaluated
as a script.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Remove Jim_SetWide() since it is only used by incr
More tests for better test coverage
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also add additional tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
e.g. $::a::b is considered as ${::a::b}
This helps be more Tcl compatible by allowing fake namespace variables
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allow tests to run with almost all features disabled
|
|
Much closer to tcltest now, including constraints.
Try to get all appropriate tests running under both Jim and Tcl.
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>
|
|
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>
|
|
Improve the ability to rethrow errors
* Allow return to rethrow an error by accepting '-errorinfo stacktrace'
* Also, 'catch ... opts' now also stores opts(-errorinfo) on error
* Use these to provide better stack traces from 'case' and 'try'
* Implement 'return -level'
Make try/on/finally more Tcl 8.6 compatible
* With support for 'on' handlers and docs
Add support for catch options to try
* Otherwise it's hard to use try to catch signals
Improvements to signal handling
* catch -signal now sets a list of the handled signals as the result
* catch -signal won't execute the body at all if a handled signal is pending
* up to 64 (jim_wide) signals can now be handled
* if catch -signal is nested, the innermost catch will catch the error
* new 'signal catch' allows ignored/blocked signals to be examined and cleared.
* update docs on signal handling
exec should indicate which signal killed the child
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>
|
|
*: 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
|
|
From Tcl 8.5, implicitly set variable to 0
|
|
If the condition expression of a for statement is invalid
|
|
Support end+<n> index
And generally simplify the index handling
Add support for 'info nameofexecutable'
|
|
*: Keep abc(def) as a single token, but split abc($def) into 4 tokens
*: Then optimise when interpolating to keep a reference to the underlying objects
*: This speeds up the 'set a($b)' case a lot
*: Also avoid so much alloc/realloc when parsing scripts and subst objects
Also simplify cmdStruct creation
*: Can omit args=-1 for expand
*: Makes it easy to calculate the length
*: Do it all in a single loop for simplicity, size and speed
|
|
*: 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
|
|
Add unset -nocomplain and tests
Implement lrepeat
|
|
|
|
jimsh - retry on EINTR from fgets()
Fix 0 -> NULL for 64 bit systems
Fix overlapping memcpy
Fix jim array dereferencing bug
*: Counting of parentheses was incorrect with nested array references
*: The result for array dereference wasn't being used properly
Add os.uptime command
Documentation: autogenerated command index
Fix gets when last line has no newline
|