Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Which wants _XOPEN_SOURCE defined to something particular
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
No need to keep line number info on every script token
Instead add it into the 'LINE' token
Also remember the first line number of the script in the script object
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
These can vary on different systems
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And other small testing improvements
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Move Jim_EvalObjBackground() out of the core to eventloop
Time events are now kept and triggered in time order
Time handlers are removed before execution
Add 'update'
Add 'after info' and 'after idle'
Include time events in the return from Jim_ProcessEvents()
Add Tcl eventloop tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
bgerror is supposed to be suppressed subsequently if it returns break
vwait should error on invalid array element
vwait should return an empty result
Don't accept 'after info' since it isn't supported
Also add some eventloop tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This meant that the single arg switch case would not give
accurate line numbers
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This reduces the size of the non-shared data segment
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Should have better performance
No longer need the command struct
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>
|
|
Found by the clang static analyser
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the list ended in a trailing newline
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to fix invalid chars in the tag name
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And also some other warnings courtesy of the clang static analyzer
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Uses a Tcl wrapper, popen, from tclcompat
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To avoid clash on win32
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This allows the return code from a failed 'exec' command to be retrieved.
Also support -errorcode in catch and return.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
File handlers now pass through the error code and the handler
is deleted on error. If there is nothing to do, vwait returns.
If bgerror doesn't exist, print the original error to stderr.
Also remove the 'eof' event handler since it isn't needed. Can just
call [eof $f]. This also fixes source locations within 'readable'
scripts.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
jim-subcmd would sometimes omit the subcmd parameter
in help and usage display
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use clearerr() after a read fails to avoid repeated failures after a signal.
Also, dont' treat EINTR as an error in gets.
And remove some leftover perror() calls.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also, double parsing now allows trailing white space
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use -ipv6 to signify that ipv6 should be used
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use 'indent'. Not perfect, but at least consistent.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In order to accomodate both static and dynamic extensions,
a unique init function is used for each extension.
Take this into account when loading.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Make exec-9.7 test more reliable
Quieten jim tests unless running manually
Add jim pipe example
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Including the --disable-fork case
And fix some compiler warnings
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Create and use config.h
Check for backtrace, fork, vfork, syslog, regcomp and others
Disable extensions which require missing functions/features
Check for one arg vs. two arg mkdir()
Distinguish between mingw and native windows
The aio extension has reduced functionality for ANSI C only
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Separate socket types: udp client and udp server
Allow client sockets to 'connect' to an address
Allow server sockets to 'bind' to an address
Add support for 'sendto' and 'recvfrom'
Add socket client and server examples
Document new udp sockets
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Don't mix declarations and code
Don't try sizeof(long long) if we don't have it
Object not freed on bad printf modifier in [format]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Makes it easier to diff
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also rename and chmod some files
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
* Use the real parser in Jim_ScriptIsComplete()
* The parser remembers if a script is missing a close brace or quote
* 'source' will reject a file which is not complete
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
info frame allows access to source file/line for earler call frames
Implement 'stacktrace' to give a live stacktrace
And 'stackdump' to convert a stack trace to readable form
Update 'errorInfo' to use 'stackdump'
Also fix tailcall to retain source info
And implement alias, lambda and curry with tailcall
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add tests and documentation
Make tailcall work within 'try'
Fix tailcall interaction with uplevel
Use tailcall for dispatch in tree.tcl
Also some related improvements in tree.tcl
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also implement 'local' to declare/delete local procs
* Add tests/alias.test for testing alias, current, local
* proc now returns the name of the proc created
* Add helper 'function' to stdlib
Reimplement glob and case to use local procs
* This keeps these internal procs out of the global namespace
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
So that commands are not deleted while executing
Add a regression test for this case
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Completely document new regexp and regsub features
Remove some old, commented-out debugging
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
file mkdir will now create intermediate directories
file delete can now also delete empty directories
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Improve the ability to rethrow errors
* Allow return to rethrow an error by accepting '-errorinfo stacktrace'
* Also, 'catch ... opts' now also stores opts(-errorinfo) on error
* Use these to provide better stack traces from 'case' and 'try'
* Implement 'return -level'
Make try/on/finally more Tcl 8.6 compatible
* With support for 'on' handlers and docs
Add support for catch options to try
* Otherwise it's hard to use try to catch signals
Improvements to signal handling
* catch -signal now sets a list of the handled signals as the result
* catch -signal won't execute the body at all if a handled signal is pending
* up to 64 (jim_wide) signals can now be handled
* if catch -signal is nested, the innermost catch will catch the error
* new 'signal catch' allows ignored/blocked signals to be examined and cleared.
* update docs on signal handling
exec should indicate which signal killed the child
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|