aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-21docs: fix of a few typosSvyatoslav Mishyn2-25/+25
2015-06-03chained tailcalls were not always being runSteve Bennett2-31/+20
There is no need to protect against merging tailcalls across uplevel since any tailcalls should already be fully resolved. This fixes a problem with the following only running one loop: foreach a {b c d} { command-with-tailcall $a } In particular: dict for {a b} {1 2 3 4} { puts $a,$b } Reported-by: Jon Povey <jon.povey@emsolutions.com.au> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-05-18docs: minor typo with lassignSteve Bennett2-33/+50
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-04-29docs: minor typo with rand() functionSteve Bennett1-1/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-04-29add support for configure --docdirSteve Bennett2-3/+10
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-04-06Avoid error in tcltest.tcl if $::argv0 is unsetSteve Bennett3-6/+9
Can happen if running interactively or via -e Reported-by: Stuart Cassoff <stwo@bell.net> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-04-06ensure that tests can find tcltest.tclSteve Bennett2-1/+5
Reported-By: Stuart Cassoff <stwo@bell.net> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-03-19aio: add 'sync' subcommandSteve Bennett3-15/+43
If the underlying platform supports fsync(), $handle sync invokes fsync() on the stream file descriptor. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-03-12exec: better handling of pipeline abnormal terminationSteve Bennett2-59/+89
Consider the command pipeline: exec a | b | c Previously, if any of the subcommands terminated abnormally (with a signal), the stdout of the pipeline would be lost. Now the output consists of: 1. standard output from the last command in the pipeline 2. standard error from all commands in the pipeline 3. all abnormal error terminations, if any - but suppressed if any standard error output In addition, $::errorCode previously always contained the termination status of the last subcommand, even if it succeeded. Now it contains the termination status of the last subcommand that failed, or "NONE" if all succeeded. Additionally, the order of $::errorCode was previously wrong, with pid after the signal id rather than vice versa. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-01-31Update version to 0.760.76Steve Bennett3-22/+30
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2015-01-21docs: Note regex treatment of nullsSteve Bennett2-1835/+1843
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: Andy <jimdevel@hummypkg.org.uk>
2015-01-16Improve performance of script validation commitSteve Bennett1-43/+38
Commit 7edde0797 inadvertently reduced performance of the script evaluation fast path. Rename Jim_GetScript() to JimGetScript() - always returns a script, even on parse failure. Now JimValidScript() checks the script for parse error and generates the error message if necessary. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-31Throw an error when parsing a bad scriptSteve Bennett3-68/+83
If a script has a missing bracket (for example), currently it is silently ignored, except by [source] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-09glob: remove some leftover unused code in glob.tclSteve Bennett1-2/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-09aio: fix a compiler warning on some platformsSteve Bennett1-0/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-09signal: don't define more than NSIG signalsSteve Bennett1-1/+6
If NSIG is defined, limit the number of supported signals to that number Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-09jim: change the output of errorInfoSteve Bennett1-1/+1
Rather than "Runtime Error: <file>:<line>: ...", use use "<file>:<line>: Error: ..." This latter format is both shorter and more consistent with other tools (e.g. gcc). This also allows errors to be reported with the default errorfmt of vim's quickfix feature. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-09add support for [info source ?filename line?]Steve Bennett3-29/+48
Allows a script to be created with explicit source info Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-04try: fix use of catch/uplevelSteve Bennett1-3/+3
Use catch {uplevel 1 $script} instead of catch [list uplevel 1 $script] to ensure that source info is not lost. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-04bootstrap: Unix platforms have link()Steve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-04file copy: Use binary mode when reading and writing filesSteve Bennett1-2/+2
Matters on Windows Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-04glob: fix some glob2.test tests on windowsSteve Bennett1-68/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-12-04file: updates for WindowsSteve Bennett1-12/+15
Mainly, [file join] should leave the trailing slash on c:/ Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-11-28docs: update documentation for recent changesSteve Bennett2-1800/+1835
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-11-28glob: add additional testsSteve Bennett2-9/+373
Import some additional tests from the Tcl test suite. Add more Tcl compatibility to tcltest.tcl Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-11-28glob: bug fixes and Tcl compatibilitySteve Bennett2-15/+23
Fix the case where the pattern/filename contains a space Respect the —tails option, but generate an error if -types is given. Change the error message on no match to be Tcl-compatible Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-11-28file: add support for file linkSteve Bennett3-4/+60
Currently only on systems that support both hard and symbolic links. Update docs for 'file link' and some other [file] commands Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-11-28Keep $LIBS as user-specified libraries onlySteve Bennett1-0/+7
Normally detected libraries are automatically added to $LIBS, but we use $LDLIBS to build the list of libraries. So don't add these libraries to $LIBS to avoid duplicates. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-11-17Implement string cat (TIP #429)Steve Bennett5-15/+68
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-30initjimsh: jim::argv0 is not always availableSteve Bennett1-10/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-28Fix [info nameofexecutable] after [cd]Steve Bennett4-21/+28
If argv0 is a relative path, [info nameofexecutable] returned the wrong result after changing directory. So calculate and stash the result during init. Also move internal $jim_argv0 into namespace jim as $jim::argv0 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-15jimsh: change order of default $auto_pathSteve Bennett1-1/+1
Add directory containing jimsh before JIM_LIBPATH Helps with running uninstalled jimsh Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-15Add more tcl compatiblitySteve Bennett2-4/+8
- Add wide() function to [expr] (same as int()) - Small error message changes Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-15Install tcltest compatibility packageSteve Bennett3-255/+265
Allow 3rd party tests to be written and use: package require tcltest Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-11jim.c: string to double conversion error messageSteve Bennett4-12/+12
Change the error message to match Tcl 8.6 "expected floating-point number" instead of "expected number" Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-10namespace: disallow creation of import loopsSteve Bennett2-2/+35
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-10alias: don't rely on internal list never shimmeringSteve Bennett1-1/+4
It is possible for the alias prefix to shimmer, especially if the prefix is a list with a single element Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-10namespace: restore namespace import supportSteve Bennett3-1/+18
Commit 8e28d066 "fixed" infinite namespace import recursion by simply disabling support for import. This commit restores support by detecting self-import. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-10-10Merge pull request #21 from oswjk/fix-strtod-problem-on-mingwSteve Bennett1-0/+1
jim-win32compat.h: fix compile error about __strtod on mingw
2014-10-10jim-win32compat.h: fix compile error about __strtod on mingwOskari Timperi1-0/+1
2014-09-18bootstrap: set HAVE_MKSTEMP on unixSteve Bennett1-0/+1
All reasonable unix platforms have mkstemp(), so use it in bootstrap jimsh. Without it, exec is non-functional. (Previously it was just assumed to exist in [exec], but not [file tempfile]) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-09-18exec: simplify tempfile error msg handlingSteve Bennett2-13/+11
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-09-11Don't link module LIBS to jimsh/libjimSteve Bennett1-0/+9
Some libraries are only required for specific dynamic modules, so don't include them when linking jimsh or libjim.so Reported-by: Stuart Cassoff Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-09-01aio: consolidate address formattingSteve Bennett1-44/+33
Removes some duplicated code Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-09-01aio: optional argument addrvar for accept.Danyil Bohdan4-7/+67
2014-08-08glob: work when intermidiate dirs are not readableSteve Bennett1-0/+5
If /a/b/c exists, but directory 'a' has 'x' but not 'r' permissions, we should still be able to glob /a/b/* Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-08-03Temporary file creation should respect $TMPDIRSteve Bennett4-23/+54
This applies to [exec] and [file tempfile] Reported-by: Jakub Wilk Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-07-26jim.c: make lindex work as identity function.Danyil Bohdan3-7/+17
2014-05-29load: Fix memory leak on interp destroySteve Bennett1-0/+1
Reported-by: Paul Chakravarti <paul.chakravarti@gmail.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-05-12Makefile.in: pass CPPFLAGS where appropriatePaul Fertser1-1/+1
CPPFLAGS is a standard variable to pass additional preprocessor-related parameters. Debian build system uses that to add -D_FORTIFY_SOURCE=2 and then checks the buildlogs to ensure the command line contained all the fortification parameters (they use "-fstack-protector --param=ssp-buffer-size=4" for CFLAGS). Example blhc output before the fix: CPPFLAGS missing (-D_FORTIFY_SOURCE=2): cc -D_GNU_SOURCE -Wall -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -c -o _load-static-exts.o _load-static-exts.c Signed-off-by: Paul Fertser <fercerpav@gmail.com>