Age | Commit message (Collapse) | Author | Files | Lines |
|
Some users may not be ready to immediately move to the single-argument
expr, so provide a --compat option to configure to support the
previous behaviour as a transition strategy.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use a single subencoder proc for all types.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fixes #198
Reported-by: Antonio Borneo <borneo.antonio@gmail.com>
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>
|
|
Avoid unexpected issues by concatenating multiple arguments.
This does create an incompatibility with early versions, but
it is generally trivial to convert existing code to one of two forms:
1. expr {$a + $b} -- usually correct
2. expr "$a + $b" -- usually incorrect
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Some old systems are not happy with a numeric service and no socktype.
Fixes #196
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In the case where interp is not supported
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>
|
|
In preparation for support of posix mode flags to open
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In case the class is created with a namespace name
Fixes #193
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When namespace is disabled, Jim_memrchr is not needed
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Extensions like nshelper and jsonencode should only be
selected if explicitly enabled or if they are the target of
a dependency. So enabling namespace enables nshelper, but
--full --without-ext=namespace doesn't.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Should not make any difference in practice, but
the allocations should be size * (argc - 1) not size * argc - 1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Irrelevant warnings from some compilers
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add -stride support to both lsearch and lsort
Add -index support to lsearch
Improve -index for lsort to support multiple indices
Also harmonise some error messages with Tcl 8.7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fixes #191
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: D. Bohdan <dbohdan@dbohdan.com>
|
|
jim.h now includes JIM_ABI_VERSION that should be incremented whenever
the ABI changes. Then all loadable modules should call Jim_CheckAbiVersion()
to make sure they are loaded against the correct version.
Add Jim_PackageProvideCheck() that does both Jim_CheckAbiVersion()
and Jim_PackageProvide() to simplify the implementation of loadable extensions.
Also rename the "big" sqlite3 extension to just sqlite to avoid a naming conflict with
the smaller jim-sqlite3 extension.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Also add some additional tools that use xtrace.
examples/jcov - code coverage
examples/jtime - code coverage that measures execution time
examples/jtrace - trace script execution
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allows a debugger or tracing facility to be implemented
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If no 'check' is provided, we assume that the checks passed.
If pkg-config is specified, but no other check, use 'check false'
to ensure the module is disable if the pkg-config checks don't pass.
Also travis now does 'make all' so that any module extensions are
also built, and add a dependency on libhiredis-dev to test
building the redis extension.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To build all non-default extensions as modules if prerequisites are met.
Also move the extension help out of the main help since it is quite long
and show it with --extinfo. Now extension help is generated from $extdb
to avoid the help and the module configuration becoming out of sync.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Make sure we don't break the bootstrap jimsh
Also build with --maintainer to check for assertion failures
and reference count issues.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In order to test bootstrap jimsh, it is very helpful
if it can pass all the unit tests.
- Set tcl_platform(bootstrap) to 1 for bootstrap jimsh or 0 otherwise
- Use getref to determine in we have references, not ref since we
implement a poor-man's ref for bootstrap jimsh
- bootstrap jimsh package doesn't return a "Can't load package"
message if loading the package fails
- exec tests using [open |command] need pipe
- bootstrap jimsh can't set file times with [file mtime]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When boolean parsing was combined in commit
982ec4f524bc81a240cb729cf09bd3c677aea485
it broken parsing of boolean values in expressions that
weren't standalone.
e.g. expr {true} was fine, but expr {true ? 4 : 5} was not.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In order for make-bootstrap-jim to reliably match #ifndef...JIM_BOOTSTRAP
with the corresponding #endif, a corresponding comment needs to be added
after the #endif
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add this depenency to avoid issues with parallel builds
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
v0.7.0-3-g35b88dc
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Requires a truetype font file
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add example of integrating SDL event loop and the Tcl event loop
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And add:
- poll ?script?
- optional window title
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now we only support using pkg-config to find SDL, and prefer SDL2 over SDL.
For compatibility between versions, the render surface is now cleared on flip.
And closing the window now results in a JIM_EXIT return code from flip.
Also supports [sdl clear] to clear the background to a given colour.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For speed and size, since it shares a lot of the same code with catch
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is convenient to be able to do just:
loop i 5 {
body
}
Where the start value is 0.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This means that instead of just [list index 2+1], we can now do
[list index end-$n*2+1]
This applies to:
lindex, linsert, lreplace, lset, lrange, lsort, regexp, regsub
string index,first,last,range
Also add tests for both direct integer expressions and indexes.
Still needs doc update.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This means that $variable references and [commands] are not expanded.
This should mitigate security concerns when using the 'integer expression' feature.
It means that you must do:
string repeat a $i*4
Not:
string repeat a {$i*4}
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For convenience, many commands now accept integer expressions
rather than only simple integers.
These are:
loop, range, incr, string repeat, lrepeat, pack, unpack, rand
This simplifies many cases where previously expr {} or $() was required.
e.g.
foreach i [range 4+1 2*$b] { ... }
string repeat 2**$n a
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This reverts commit 6b287b9c6b6ec8fbc62f1cbaad48547cf5a4b65c.
These are needed for reference counting.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
A command may return NULL, but set an error (e.g. Server closed the connection).
In this case, make sure to return the error.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
These stored the currently executing proc args and body
(the same as are available via info args and info body),
but were never used anywhere.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is especially convenient to add -1 for something like:
lindex $list end-$BACK-1
or:
string range $str $p $p+$len-1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the build host doesn't have neither jimsh nor tclsh installed,
during 'configure' the autosetup will build 'autosetup/jimsh0'
inside the source tree. This happens also when out-of-tree build
is used.
Making dirty the source tree during out-of-tree build causes
applications that use jimtcl as submodule (e.g. OpenOCD) to fail
at 'make distcheck'.
Modify 'autosetup-find-tclsh' to build 'jimsh0' in the current
folder. For jimtcl project it would be the root of the source tree
or the root of the out-of-tree build.
Update 'Makefile.in' to search for 'jimsh0' in the new path during
'distclean'.
Reported-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
The working directory is not fully cleaned-up and remains dirty
after 'make distclean'.
Add file examples.api/Makefile in the list of files to remove
during 'make distclean'.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|