Age | Commit message (Collapse) | Author | Files | Lines |
|
regsub -all matches \A against the start of each match, but
correctly handle a pattern like ^ which does not advance the
match
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Detect and produce an error for missing closing bracket ]
Consider a trailing backslash as an invalid escape
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the signal is invalid, indicate that
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
between pack and unpack
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>
|
|
readdir, tty, utf8, signal, alarm, kill, file, jimsh, posix, aio,
history, interp, pack, unpack, eventloop, exec, load, package,
regexp, regsub
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
More namespace tests from Evan Hunter
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also requires fixing 'debug' command so that the interpreter &
tcltest.tcl can tell it is not supported.
And the result of 'debug show' is now returned as the interpreter result
rather than being printed.
|
|
As Windows doesn't respect the path/template
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- clock
- array
- file tempfile
- lreverse
- string byterange
- aio tty
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If an existing command was replaced when using local proc ...,
then renaming the command will break upcall from within the proc
because the command no longer exists in the namespace. To prevent
this case, disallow rename of such a command.
It is still OK to delete with rename <cmd> ""
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If a quote is missing inside a command, e.g.["command here]
the error should indicate that a quote is missing, not a bracket.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Should produce an error, but did not previously
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If a namespace is given, it is relative to the global namespace
not the current namespace.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The purpose of a tailcall is to avoid using additional stack frames,
however although were were not creating an extra Tcl callframe we were
using C stack frames through the call sequence:
JimCallProcedure -> Jim_EvalObjList -> JimInvokeCommand -> JimCallProcedure
This meant that a large number of tailcalls would overflow the stack.
Instead we need to have JimCallProcedure return to JimInvokeCommand
where the tailcall can be handled by a subsequent call to JimCallProcedure.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To warn of Y2038 problems, and suggest use of -D__MINGW_USE_VC2005_COMPAT
on mingw32. Do this instead of the previous runtime test.
Add -D__MINGW_USE_VC2005_COMPAT to the appveyor build.
Fixes msteveb/jimtcl#145
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add a note in the documentation for clock that some systems
use 32-bit time_t and are thus not year 2038 compliant.
Also add a test to catch this in clock.test
Reported-by: dbohdan <dbohdan@dbohdan.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>
|
|
Should return the given return code, not JIM_RETURN (2)
Reported-by: dbohdan <dbohdan@dbohdan.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: dbohdan <dbohdan@dbohdan.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Using the jsmn library for decoding.
Based on the original implementation by Svyatoslav Mishyn <juef@openmailbox.org>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If an expression returns (e.g.), break, continue or exit, that
return code should be propagated, the same it is for [expr {}]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Not byte indices
Reported-by: dbohdan <dbohdan@dbohdan.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Not a byte index
Reported-by: dbohdan <dbohdan@dbohdan.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This subcommand was missing as it wasn't part of the original Tcl 6.7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
e.g. file tail /abc/def/ => def
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This allows a signal to be blocked by setting it's handler to SIG_IGN
Can be used to block SIGPIPE for exec
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sometimes it is useful to wait for a lock to become available.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
More consistent behaviour of replacing past end of list
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
autosetup changes:
- The syntax for templates has changed slightly
- Update config.guess and config.sub to 2018-03-08
- Add rpath support
- Add --runstatedir
Also:
- enable rpath when building libjim as shared
- ensure that 'make test' works on MacOS when libjim is shared
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
RFC 3629 says:
Implementations of the decoding algorithm above MUST protect against
decoding invalid sequences
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The following class shorthand escapes now match Tcl when
used within bracket expressions:
\d [[:digit:]]
\s [[:space:]]
\w [[:alnum:]_] (note underscore)
e.g. [a-f\d] => [a-f0-9]
Previously these shorthand escapes were only implemented outside bracket expressions.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Work around the problem by skipping the test
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This is a workaround for IPv6 tests failing on Travis
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>
|
|
Write to a closed pipe in exec2-3.2 to force SIGPIPE
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
On some mingw platforms exec2-3.2 isn't producing SIGPIPE
Try to make it do so.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- fix popen [open "|pipeline ..."] to return meaningful status in close
(but note that stderr is not captured)
- popen pipelines can now be used as the target of exec redirection
- overally improvements to exec on windows. Now crt file descriptors
are used throughout
- add support for [pid], [wait] and popen on windows
- os.wait is now wait, and integrates with [exec ... &] to be able
to wait for running background tasks
- [socket pipe] is now also [pipe] and is supported on windows
- [file tempfile] is supported on windows
- move duplicated code between jim-aio.c and jim-exec.c to jimiocompat.c
- Fix [exec] on windows to match unix semantics wrt sharing the parent stream
unless redirected rather than using /dev/null
- On windows redirect to or from /dev/null is automatically converted to NUL:
- If signal support is disabled, implement a minimal Jim_SignalId() for exec and wait
- aio now supports getfd, to return the underlying file descriptor.
This is used by exec to support redirection, and allows popen channels
to support exec redirection.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allows commands to run when a proc or interpreter exits.
If the $jim::defer variables exists at proc or interp exit,
it is treated as a list of scripts to evaluate (in reverse order).
The [defer] command is a helper to add scripts to $jim::defer
See tests/defer.test
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoid failing many tests if binary.tcl is available put
pack isn't enabled.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It's convenient to support a non-gc lambda, even if references
are disabled.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This test is essentially the same as timer-6.4 except with
tighter timing requirements. Remove it to prevent spurious failures.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|