Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently jimtcl compares each element of `errorCode` against each `match` element.
But, it doesn't account for the situation where `errorCode` is shorter than `match`.
In this case the match should always fail (rather than segfaulting).
|
|
Currently jimtcl will abort if there is any unary operator besides ! in
front of a boolean. It is possible to construct an expression with -
or + before a boolean literal (e.g. expr {-true}) that currently aborts,
but should return an error. I implemented this error handling with
tcl's error message for this situation.
|
|
Mainly to support changing stdout,stderr to binary mode
on Windows.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When stdin is not a tty
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sometimes useful if replacing a package that has already been loaded
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use after instead because otherwise the alarm
in the readable script which confuses things later.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Expect output to stderr when an error happens inside bgerror,
so catch it.
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>
|
|
To avoid invalid JSON causing core dumps.
Minor changes to the jsmn parser to still allow
Infinity and NaN.
Fix some tests that didn't use strictly correct JSON.
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 $ is followed by something that isn't a variable name,
previously all subsequent variables were being ignored.
Fixes #296
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
xonxoff start and stop chars
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Per Tcl 8.7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
On systems where we aren't getting enough cpu time.
Heuristic check, but probably good enough in practice.
Fixes #282
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- Set jim::lineedit to indicate if line editing is configured
- Ensure that aio tty works even if line editing is disabled
- Skip some tests if line editing is not configured
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To show that it returns the current values, not just the original values
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
hurd does not return the path for unix domain sockets
via getsockname()
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
socket operation on non-socket gives a different message
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This test can be at bit flaky on slower machines
(perhaps running under a VM or qemu).
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And allow current source file to be set
Fixes: #268
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In case socket pty, interp are not available
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
set a 5
proc b {} {&a} {
incr a
}
b
Now a is 6 because b captured a by reference instead of by value
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This means we get -commands and usage via -help
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This means we get -commands and usage via -help
And update dict2.test for minor difference in usage
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And add a default implementation of tcl::stdhint to add
hinting for some built-in commands.
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>
|
|
This is simpler now that we can write to a non-blocking socket
even if it is "full".
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now 'constraint cmd|package' is like 'needs' but sets a constraint
The command to 'needs cmd' and 'constraint cmd' can now take
a subcommand to check.
Add 'constraint|needs eval|expr' to make some constraint checks
simpler.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This changes especially makes buffered I/O work
with non-blocking channels.
- separate read and write buffering
- support for timeout on blocking read
- read/write on same channel in event loop with buffering
- read buffer is the same across read, gets, copyto
- autoflush non-blocking writes via event loop
- copyto can now copy to any filehandle-like command
- add some copyto tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
A typical error message now looks like this:
t4.tcl:2: Error: syntax error in expression: "blah"
Traceback (most recent call last):
File "t4.tcl", line 14
c 1 2 3
File "t4.tcl", line 10, in c
b a c
File "t4.tcl", line 6, in b
a A14
File "t4.tcl", line 2, in a
expr blah
This is produced by stackdump (that can be replaced), called by errorInfo.
Note that now stacktraces (stacktrace, info stacktrace, $opts(-errorinfo)) include
the running command at each level in addition to proc, file, line. In order for
scripts to detect this new format, a new entry tcl_platform entry has been added:
tcl_platform(stackFormat) = 4 (to signify 4 elements per frame)
In addition, instead of building the error stack frame as the stack
is unwound in response to an error, instead the entire current stack trace
is captured by stacktrace. This means that the trace extends beyond the try/catch
right back to the initial interpreter command.
The 'stacktrace' command is now implemented in C based on the same
code that generates the error stacktrace.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
loop i 5 {
loop j 6 {
# This breaks out of both loops
break 2
}
}
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
always include 'proc' even if introspection disabled
correctly set 'proc' at the eval frame level that is currently running
in the given proc. This makes it easier to produce an accurate level stacktrace
even across uplevel, etc.
Update stacktrace to use the new info frame.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fixes #259
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fixes #259
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Previously dict with returned the new dict value.
Also fix an issue in the case where a dict element
mirrors the name of the dictionary.
Fixes: #241
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Uses a prefix to automatically map from subcommand to
implementation.
Includes support for namespace ensemble
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To break vwait if a handled signal is received.
In this case, the handled signal(s) can be returned by signal check ?-clear?
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Returns a dictionary with file, line, cmd, (possibly) proc and level.
And support 'info frame 0' for the current command.
Note that now all evaluation frames are captured, not just call frames.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Since signals aren't supported there and we need signals for some
of these tests.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
These tests provoke the issues raised in #245 plus
some additional issues.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The end of word check was wrong and return true when it should not.
Fixes #246
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Some systems need a little extra time for the child process
to start and acquire the lock.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Dictionary lookups with simple integers are more efficient
than with "node<integer>"
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
file executable doesn't do anything useful on Windows
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|