Jim Tcl
Timeline
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

50 most recent check-ins

2021-01-03
04:01
Add article on new SDL2 support Leaf check-in: 434706f0d1 user: steveb tags: www
03:19
travis ci build: test bootstrap jimsh

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> Leaf check-in: eb416f6334 user: steveb@workware.net.au tags: trunk,

03:09
bootstrap jimsh: pass all tests

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> check-in: fede70dd50 user: steveb@workware.net.au tags: trunk,

2021-01-02
14:52
core: fix parsing of booleans

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> check-in: 2ad0450cbd user: steveb@workware.net.au tags: trunk,

05:22
build: Fix bootstrap build

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> check-in: fd58aeec0d user: steveb@workware.net.au tags: trunk,

03:59
build: Dynamic modules require $(LIBJIM)

Add this depenency to avoid issues with parallel builds

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: f28b4ba029 user: steveb@workware.net.au tags: trunk,

03:42
build: update autosetup for pkg-config fix

v0.7.0-3-g35b88dc

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 7fed40485f user: steveb@workware.net.au tags: trunk,

2021-01-01
06:59
sdl: Add basic text support

Requires a truetype font file

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: ab6230c961 user: steveb@workware.net.au tags: trunk,

06:54
Add examples/sdlevents.tcl

Add example of integrating SDL event loop and the Tcl event loop

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9aff900db9 user: steveb@workware.net.au tags: trunk,

06:54
sdl: convert to using jim-subcmd

And add: - poll ?script? - optional window title

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e6ddc2b9e2 user: steveb@workware.net.au tags: trunk,

06:54
sdl: Add support for SDL2

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> check-in: 76f737d2a9 user: steveb@workware.net.au tags: trunk,

2020-12-27
01:12
core: combine JimParseBoolean() and JimParseExprBoolean()

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 471a395ab5 user: steveb@workware.net.au tags: trunk,

2020-12-26
08:10
try: reimplement in C

For speed and size, since it shares a lot of the same code with catch

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 587361c7fb user: steveb@workware.net.au tags: trunk,

08:08
loop: Allow start value to be omitted

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> check-in: 745409de58 user: steveb@workware.net.au tags: trunk,

08:08
docs: Documentation for integer expressions

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 5464040aea user: steveb@workware.net.au tags: trunk,

08:08
core: commands that take an index now use integer expressions

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> check-in: af9deaf9fb user: steveb@workware.net.au tags: trunk,

08:08
Jim_GetWideExpr() now evaluates "safe" expressions

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> check-in: 5ee0e8b7c3 user: steveb@workware.net.au tags: trunk,

08:08
core: support integer expressions in various commands

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> check-in: 2847cd4406 user: steveb@workware.net.au tags: trunk,

08:07
Revert "core: remove procargs and procbody from callframe"

This reverts commit 6b287b9c6b6ec8fbc62f1cbaad48547cf5a4b65c.

These are needed for reference counting.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: abf7ba7d6e user: steveb@workware.net.au tags: trunk,

2020-12-13
22:07
redis: Check for error on NULL reply

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> check-in: 4e1d122892 user: steveb@workware.net.au tags: trunk,

22:07
core: remove procargs and procbody from callframe

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> check-in: 1efff93d21 user: steveb@workware.net.au tags: trunk,

2020-12-11
12:00
list, string: support any number of +/-n for index

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> check-in: 61ede53228 user: steveb@workware.net.au tags: trunk,

11:59
autosetup: keep clean the source tree on out-of-tree build

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> check-in: 1830119e17 user: steveb@workware.net.au tags: trunk,

2020-11-29
22:12
Makefile: remove examples.api/Makefile while 'distclean'

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> check-in: e4d8de6ae5 user: steveb@workware.net.au tags: trunk,

22:12
.gitignore: add generated file /examples.api/Makefile

When building in-tree, the generated file is not ignored and the tree appears as dirty.

Add the generated file to .gitignore.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> check-in: 5a28d1e04d user: steveb@workware.net.au tags: trunk,

2020-11-16
12:09
expr: TIP 582 - comments in expressions

Add support for comments in expressions

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 76644b5416 user: steveb@workware.net.au tags: trunk,

11:35
core: fix minor compiler warning

Fixes #183

Reported-by: Stuart Cassoff <stwo@bell.net> Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 2113c5f85a user: steveb@workware.net.au tags: trunk,

2020-11-15
10:05
redis: Add simple redis client extension

Using the hiredis client library. Synchronous API only.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 88f83e3cee user: steveb@workware.net.au tags: trunk,

10:04
eventloop: Add convenience functions for adding script file handlers

Add Jim_CreateScriptFileHandler() to create a standard script filehandler event that evaluates the given script with Jim_EvalObjBackground() when the event occurs.

Also add Jim_FindFileHandler() to find a registered event handler.

Simplify aio by using these.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: d690909259 user: steveb@workware.net.au tags: trunk,

2020-11-13
23:02
format: minor indentation fix

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 393dd5c8d7 user: steveb@workware.net.au tags: trunk,

22:57
core: parser: fix for script with missing end quote

Ensure that 'info complete' returns 0 for a script is missing the end quote such as "abc$def

Fixes #181

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 496c71fb96 user: steveb@workware.net.au tags: trunk,

22:33
tests: ssl: use flush, not close

Using 'close w' with an ssl socket doesn't really work because this is done only on the underlying socket.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 5cd252c848 user: steveb@workware.net.au tags: trunk,

22:28
tests: aio tty: skip tests if stdout is not a tty

Fixes: #182

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 27ebac8d9f user: steveb@workware.net.au tags: trunk,

2020-11-09
06:38
aio: socket: Fix tests connecting to 0.0.0.0

It is not portable to connect to 0.0.0.0, expecting this to the same as connecting to localhost/127.0.0.1, and the same for IPv6. So explicitly connect to 127.0.0.1 or [::1]

Fixes #180

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 8a3f09cc1b user: steveb@workware.net.au tags: trunk,

2020-11-08
00:17
build: Fix build and tests for out-of-tree build

Loadable modules and tests Fixes #179

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: bf32293584 user: steveb@workware.net.au tags: trunk,

2020-10-31
22:46
scan.test: Be more lenient in floating point format

Some systems produce 5e-05 while some produce 5e-5. Both are acceptable.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 097b6bd13e user: steveb@workware.net.au tags: trunk,

22:46
build: Fix the appveyor build

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: b4017a73cb user: steveb@workware.net.au tags: trunk

11:06
core: change "newVal" to "value" in [lset] usage Leaf check-in: 55942b5c7d user: steveb@workware.net.au tags: trunk,
11:06
core: put space before "..." in "wrong # args" msg

Resolves #173. check-in: a446bbc22f user: steveb@workware.net.au tags: trunk,

10:59
Announce 0.80 release

And update mailing list address check-in: fe54ddd58e user: steveb tags: www

2020-10-29
12:03
build: Support sources with CRNL line endings

make-c-ext.tcl and parse-unidata.tcl now support input files with CRNL line endings

Reported-by: Mark@TheMarkitecht.com Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 50825e3222 user: steveb@workware.net.au tags: trunk,

2020-10-05
22:49
docs: Fix minor typo in docs

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 33d7b0d622 user: steveb@workware.net.au tags: trunk,

2020-10-04
23:47
bump version to 0.80

Update documentation to indicate v0.80 and update Tcl_shipped.html

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e20da76be1 user: steveb@workware.net.au tags: trunk,

23:46
build: some systems have backtrace but not execinfo.h

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 6375ea11c6 user: steveb@workware.net.au tags: trunk,

03:46
oo: fix super for >2 levels of inheritance

Need to find the baseclass based on the current method class, not based on the object class.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 32a07c8ae5 user: steveb@workware.net.au tags: trunk,

2020-09-27
09:25
core: make unary "!" work with non-int booleans check-in: 24326a6d18 user: steveb@workware.net.au tags: trunk,
2020-09-23
05:21
build: avoid a spurious compiler warning

When compiled with -Os and arm-linux-musleabihf-gcc (crosstool-NG 1.24.0.92-e2957c3) 9.2.0

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: d6b06a4d60 user: steveb@workware.net.au tags: trunk,

03:53
build: Update autosetup to 0.7.0

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e25409f079 user: steveb@workware.net.au tags: trunk,

00:49
docs: Update docs to indicate recent changes.

Docs now indicate 0.79+, in preparation for 0.80 release And correctly indicate the changes since 0.79

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 79eb5bafa5 user: steveb@workware.net.au tags: trunk,

00:39
dict: add support for getwithdefault/getdef

TIP 342 (https://core.tcl-lang.org/tips/doc/trunk/tip/342.md)

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9c74d4e496 user: steveb@workware.net.au tags: trunk,