Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Use the same name for this subcommand as Tcl.
For now we keep the existing package list in case it is in use.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Partially revert 5f31686cb40c5b84638dbb5ffe1ad327440e1903
The version isn't allocated in the hash table, so we
can't take a reference to a version object.
Packages once again have a fixed, dummy "1.0" version.
Reported-by: Florian Schäfer <florian.schaefer+github@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also, packages can once again set a version != "1.0", but
the version is ignored for "package require"
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Simplifies the process of building loadable extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Remove const-ness of hash table keys
Also consolidate string hashtable ops
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For better compatibility c89 compatibility.
Also simplify jim-subcmd. Remove -usage and command descriptions.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Instead do it properly with a union
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is very common to get the string value
without the length. Jim_String() is a macro which does that.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This ensures that everything picks up the autoconf settings
|
|
Ensure that no public headers include the autoconf
header, jimautoconf.h, as it leads to problems
with redefined symbols.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Loadable modules should be tried before script packages.
If a script accidentally tried to require itself, infinite recursion resulted.
It is a bad idea to name a script the same as an extension/package.
Also, keep the package name off the stack.
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>
|
|
Use 'indent'. Not perfect, but at least consistent.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
*: Get rid of JIM_ERR_ADDSTACK and use interp->addStackTrace instead
*: 'return -code error' doesn't add a stack frame
*: Rename _file_copy to {file copy} for better error messages
*: Use 'return -code' to prevent excessive levels in the stack trace
Also rename info_nameofexecutable to {info nameofexecutable}
|
|
Document reference-related commands
*: ref, getref, setref, finalize, lambda were missing
Build system updates
*: Add check for long long to configure
*: Change -Dwith_jim_ext_... to -Djim_ext_...
*: Fix jim-eventloop when compiling with no long long
|
|
Makes creating error messages much simpler
Also convert a couple of long if/else to switch
Also some error message improvements
Also fix some memory leaks
|
|
*: Allow math functions to be enabled via configure
*: Allow support for references to be removed
*: Documentation updates
*: Jim_ListLength() now returns the result directly
*: Optimise list -> dict conversion
*: Consistent capitalisation of some structures, functions
*: Add support for abbreviations to Jim_GetEnum()
*: The commands to 'info' may be abbreviated
*: Use abbreviation support in parsing options to 'subst'
*: Use Jim_GetEnum() to parse return code names
*: Optimise 'array get', 'array set' if no conversion needed
*: Import Tcl string.test
*: string compare now returns -1,0,1 like Tcl
*: Fix 'string last' with index=0
*: Add support for 'string reverse'
*: Add -nocase option to 'string equal'
*: Fix infinite loop in 'string repeat str -1'
*: Support braced patterns in glob
*: glob should not return dot files unless the pattern starts with .
*: Simplify glob.tcl by using some new features
*: When creating C extensions from Tcl, preserve newlines and invoke
with Jim_Eval_Named() to produce more meaningful error messages.
*: Also remove all comments, not just those starting in the first column
*: Add support for 'n+n' and 'n-n' in string/list indexes (Tcl 8.5)
*: Add a level to the stack trace for 'return -code error'
*: 'return -code' should also affect the return from 'source' (see Tcl docs)
*: Fix lsort -command
*: Some systems don't have INFINITY
|
|
Add lsearch -command, update case to use lsearch
Rename tcl6.tcl to tclcompat.tcl
Remove // style comments
Expand some tabs to spaces
Fix some compiler warnings
Remove some unused functions
Don't close fd=-1 in exec
|
|
Fix argument checking/rearrangement in Tcl I/O compat
Better aio error messages
|
|
source fails with zero length file
unknown can't be called recursively
*: This can be useful when using unknown to dynamically load code,
which may in turn want to dynamically load code
*: Limit it to 50 recursions though
Allow string greater/less comparison
*: Comparing two strings for order did not work
Implement file join
*: It's not to hard and is handy when working with the current dir, ""
Don't omit [unknown] completely from stack trace
*: Since we lose valuable informtion, just omit the name
Fix return from case
Turn regexp patterns into real objects
*: Thus caching the compiled regexps
Allow error to rethrow an error
Replace bcopy() with more standard memcpy()
Fixes to parray, improve errorInfo
*: errorInfo takes an optional stack trace
Add tests for rethrowing errors via errorInfo
Fix ndelay
*: Was looking at wrong param
*: Also fix usage/help for aio.socket
Package should be able to call exit
*: Currently any return from a package is changed to JIM_ERR
Line counting is incorrect for backlash newline
|
|
*: Improve stack trace handling on errors
*: Add 'info source'
*: Add 'info stacktrace'
*: Add errorInfo procedure to generate a human readable stack trace
*: Add tests for stacktrace
------------------------------------------------------------------------
|
|
Implement 'lreplace'
Implement 'string last'
Implement 'pid'
Implement 'info procs'
Implement 'info script'
Implement 'info patchlevel' as an alias for 'info version'
Implement syslog extensions for jim
Fix return code display in jim-interactive.c
Make jim more compatible if JIM_TCL_COMPAT is set
*: Use tcl_interactive rather than jim_interactive
*: Use auto_path rather than jim_libpath
Add "." to the lib search path, not "./"
Fix a couple of files with CRLF line endings
|
|
Need to duplicate a possibly shared object when loading a package fails
Need to initialise signal-related fields in the jim interp
Return an error from 'lsort -command' on failure
|
|
Also, no need to install tcl extensions
Display any errors from loading static extensions
|
|
Save (but then cleanup) generated extensions
Add package and readdir to 'all' extensions
Order of static extensions matters!!
Simple C define support for configured extensions
Fix some compiler warnings
|
|
jim
---
Add a unique id facility to jim (Jim_GetId())
Remove unused jim_vasprintf(), Jim_AppendString_sprintf()
Remove duplicate output in Jim_Panic()
Add support for catch -signal
aio
---
Use this for aio handles
aio automatically creates stdin, stdout and stderr channels
Jim_AioFilehandle() returns the 'FILE *' filehandle for a channel
If JIM_TCL_COMPAT is set, create top level open, close, read, puts, etc.
load
----
load core command split out into jim-load.c
package
-------
package core command split out into jim-package.c
added 'package list'
posix
-----
Remove os.sleep, os.usleep, os.sethostname, os.signal, pit, Jpit
Most of these are in 'signal'
|
|
Also remove win32 support
|
|
|