Age | Commit message (Collapse) | Author | Files | Lines |
|
Add some missing files needed for autoconf
Make jim build standalone and without host jimsh
Use (FILE *) for eventloop file handle
Don't expect to support dynlib if no mmu
Re-add nvp and win32 support (untested)
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The compare result may be a wide integer, so ensure that
the sign is retaining when narrowing to an int
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
*: Add optional arg to catch, opts, like Tcl 8.5 to allow access to the
code given by 'return -code'
*: Use -- to signify end of options to catch
*: 'info returncodes' can give the name of a single code
*: Fix 'case' to handle 'return -code' properly
|
|
*: Use ?argname? to show an optional arg
*: Use ?argument ...? to represent 'args', just like Tcl 8.5
|
|
*: 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
|
|
*: No need to optimised one-off initialisation command
*: Do first test before optimisation
*: Just compare "incr" rather than looking up the command.
Will only fail on redefined incr command!
|
|
See http://www.tcl.tk/cgi-bin/tct/tip/288.html
Args and optional args may be to the left of required args
|
|
*: Default to the same as Tcl. Not signal, eval, exit.
*: Use 'catch -exit' to also catch exit.
*: Also map for standard return codes: [info returncodes]
*: Also Jim_ReturnCode()
*: Add Jim_FindByName() for searching in a char* array
*: Fix 'info nameofexectutable' if $::jim_argv0 is not set
|
|
From Tcl 8.5, implicitly set variable to 0
|
|
*: Reuse the ParseTokenList/ScriptToken machinery for 'expr'
*: This is simpler than managing separate opcode/obj arrays
*: expr opcodes are now in the same namespace as token types
*: expr identifies int and double during parsing
*: Move the 'while' common expr optimisations into Jim_EvalExpression
*: Add a special trueObj and falseObj to help with these boolean optimisations
*: Add lazy versions as the byte code is created instead of at the end
*: Avoid repeated conversion attempts to int
*: Once an object fails conversion to int and succeeds
conversion to double, invalidate the string rep
so the int conversion attempt no longer happens
*: Also, avoid converting non-ints to int in expression optimisation
*: No need for a string token for SEP and EOL tokens
*: Fix shimmering of int -> double
*: When an int shimmers to a double during an expression,
remember that the value was originally an int (via a new
type, coerced double)
|
|
If the condition expression of a for statement is invalid
|
|
Support end+<n> index
And generally simplify the index handling
Add support for 'info nameofexecutable'
|
|
*: Keep abc(def) as a single token, but split abc($def) into 4 tokens
*: Then optimise when interpolating to keep a reference to the underlying objects
*: This speeds up the 'set a($b)' case a lot
*: Also avoid so much alloc/realloc when parsing scripts and subst objects
Also simplify cmdStruct creation
*: Can omit args=-1 for expand
*: Makes it easy to calculate the length
*: Do it all in a single loop for simplicity, size and speed
|
|
*: 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
|
|
*: Add tests/expr-new.test from Tcl
*: Directly convert from int to double if possible
*: Always treat '-' in front of a number as unary minus
so that '-0x1234' works.
*: Fix expr when the variable does not exist
*: Add optional support for math functions
*: Also double/0 == Inf or -Inf
|
|
Implement lsearch in C with options
*: lsearch -exact, -glob, -regexp, -not, -bool, -all, -inline
Add tests for lsearch and expand
expr operators: in and ni (Tcl 8.6)
|
|
Add unset -nocomplain and tests
Implement lrepeat
|
|
Also remove all literal sharing code. It was disabled anyway.
|
|
|
|
This reverts commit 3201b17708d278541b66962045b68f9b0687c1dc.
|
|
*: Detect it during tokenisation rather than afterwards
*: Create a special token for it
*: Also create most tokens as JIM_TT_STR rather than JIM_TT_ESC
|
|
*: Import Tcl expr tests (expr-old.test) and fix things:
*: !double should be boolean (int)
*: double&&double and double||double should be boolean (int)
*: 2.34e+1 and 2.0e2 are an acceptable double values
*: precedence of && and || is not equal
*: precedence of ? and : is not equal
*: expression "2:3" is invalid
*: lazy evaluation involving multiple && and || was quite wrong
*: Fix unary minus wrt subexpressions. e.g. -(-1.5)
*: Also add support for functions: int, double, abs, round
*: Fix lazy evaluation of ternary operator
*: Error on missing ?, missing :
*: Fix double unary minus
*: Add unary plus
*: Fix parsing of double with no '.' before 'e'. Also support 'E'.
*: Right-to-left associativity of ternary operator is *almost* correct
*: Import div/mod of -ve integers from Tcl
*: Rotate (<<< and >>>) failed because of wrong arity
*: Don't use auto-converted double values
*: When an expression fails, show the expression
*: Bump version to 0.62
|
|
Subst was broken for backslash escapes
Add support for return, break, continue in subst commands
Accept abbreviations for switches to subst
Fix 'list #'
More tests
|
|
|
|
Use libc strtoull() for long long conversions
Also some white space cleanup
Also remove some win32 vestiges
Also improve error messages for array access errors
|
|
|
|
jimsh - retry on EINTR from fgets()
Fix 0 -> NULL for 64 bit systems
Fix overlapping memcpy
Fix jim array dereferencing bug
*: Counting of parentheses was incorrect with nested array references
*: The result for array dereference wasn't being used properly
Add os.uptime command
Documentation: autogenerated command index
Fix gets when last line has no newline
|
|
time should return wall time, not cpu time (Tcl compatible)
Bump version to 0.61
------------------------------------------------------------------------
|
|
env command allows a default to be supplied
Fix wrong 'file rename' error message
|
|
Remove unimplemented 'after restart|expire' from eventloop
Allow libjim to be build as a shared library
On some platforms, regex.h needs stdlib.h first
Use ualarm() only for times < 1 second
Fix warnings found by clang static analyser
*: printf/syslog %m isn't portable
*: some variables set but never read
*: some possible null pointer references (although mostly impossible)
*: also minor fixes to jim unit tests
Fix 'syslog -options <n>'
Must null terminate readlink() result
|
|
Add /lib/jim to the default auto_path
*: Otherwise there is no 'standard' location to install packages
Prompt should show name for all non-zero return types
Initial documentation for Jim
------------------------------------------------------------------------
|
|
format %.0f was wrong
Minor bug in [string trimright]
*: When the string was empty, a read was done of str[-1]
------------------------------------------------------------------------
|
|
|
|
Especially ternary operator and unary minus
Still evaluates both sides of the ternary operator :-(
Fix unary minus
And add const in more places to avoid this mistake in future
|
|
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
|
|
The result of boolean ops on doubles is an int
*: e.g. 0.5 < 0.1 should be 0, not 0.1
Implement jimsh -e <cmd>
Allow jim to be built in a different location
*: e.g. mkdir build; cd build; ../configure ...; make jimsh
Add dict.test
|
|
jimsh argv0 was wrong
*: Should be the name of the script when run non-interactively
Missed adding jim.h changes for errorProc
Add lsort -command tests to jim/tests
Handle the case of a script with no tokens
------------------------------------------------------------------------
|
|
*: 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
------------------------------------------------------------------------
|
|
Fix unset ::var properly this time
Ensure that jimsh exits with the correct exit code
*: Previously a script that did 'exit 0' would exit with 7!
|
|
Support @filehandle syntax
Support for nommu
Disable os.fork for nommu
Remove trailing newline
No need for binary escaping in bio module
------------------------------------------------------------------------
|
|
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 null terminate the buffer in Jim_EvalFile()
*: If an object is used a subst and a script, a crash will result.
set x abc
subst $x
eval $x
------------------------------------------------------------------------
|
|
Casts to (void) are in order to silent GCC about unused variables.
I didn't want to break ABI for the sake of clean compilation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
the file and line number for return -code error's are
now added to the dumped stack trace.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|