Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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>
|
|
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>
|
|
Can happen if running interactively or via -e
Reported-by: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-By: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the underlying platform supports fsync(), $handle sync
invokes fsync() on the stream file descriptor.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: Andy <jimdevel@hummypkg.org.uk>
|
|
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>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If NSIG is defined, limit the number of supported signals to that number
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Allows a script to be created with explicit source info
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Matters on Windows
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Mainly, [file join] should leave the trailing slash
on c:/
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Add directory containing jimsh before JIM_LIBPATH
Helps with running uninstalled jimsh
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- Add wide() function to [expr] (same as int())
- Small error message changes
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allow 3rd party tests to be written and use:
package require tcltest
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
jim-win32compat.h: fix compile error about __strtod on mingw
|
|
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Removes some duplicated code
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
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>
|
|
This applies to [exec] and [file tempfile]
Reported-by: Jakub Wilk
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Reported-by: Paul Chakravarti <paul.chakravarti@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|