Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
No perf difference measured using bench.tcl.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
No regressions, no changes in bench.tcl.
JimParseExprOperator was shockingly inefficient, to the point of taking 63% of cpu
in my own app.
It did a linear search over >60 structs, re-computing the string length each time, and
doing a string comparison for each.
This patch pre-computes the operator string length, speeding the function up by two.
Adding the first-letter fast path and evaluating length before strncmp make for
another 2x speedup, making the total speedup 4x.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
Also added some additional tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
From git://github.com/msteveb/linenoise.git
Allow tab-completion only at the end of line
Replace magic number 9 with '\t' in linenoisePrompt()
Fix several warnings from gcc.
Fix first-chance exceptions in Windows - WriteConsoleOutputCharacter() didn't have its final parameter set
Add MSVC support - Test for _WIN32 to check for building for Windows.
|
|
When I'm working with SQLite3 databases in Jim, I find that I occasionally
get a 'schema has changed' error so I end up using catch to detect the
error and try the query again.
Here's a quick patch to change the SQLite3 extension to use the
sqlite3_prepare_v2() API function instead of sqlite3_prepare() - trivial
but the _v2() function has a number of benefits and everyone should have a
new enough SQLite3 library to support it. Please can you consider it for
inclusion?
See - http://www.sqlite.org/c3ref/prepare.html
The benefit I'm specifically interested in is:
With the _v2() variant, "If the database schema changes, instead of
returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will
automatically recompile the SQL statement and try to run it again."
|
|
This includes minicom, which doesn't support hpa (CHA), only cuf.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Invalid array indexing in error message (array index out of bounds).
|
|
If the buffer is too big to fit in the window and the cursor
would move off the left edge of the windows, the display
is not shown correctly.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
caused mayhem in stdio etc.
|
|
According to the Tcl manual, in this case "binary scan returns immediately
with the number of variables that were set".
(Tests added by Steve Bennett)
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>
|
|
Implement support for the -directory option to the [glob]
command. The -tails option is accepted for Tcl compatibility,
but ignored; the command always behaves as if -tails were given.
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
A conversion was being stored in a long rather than a long long
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to account for the null terminator
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The reference was being incorrectly truncated
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This fixes an invalid memory reference in [info references]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoid destroying the reference object until after the finaliser
has been run
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now an octal literal needs to be explicitly indicated with a leading
0o or 0O, otherwise the number is treated as decimal.
This patch also adds support for binary literals.
e.g. 0b101 0B1101
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Ensure that the internal rep of interp->emptyObj is never
changed to a script, since scripts use emptyObj as the source
filename when no source info is available. Instead use a special
nullScriptObj for this purpose.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to substitute the index too
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Note that even white space will defeat this optimisation
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
On mingw, double slashes don't work so be sure to join "/" and "z" as "/z", not "//z"
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Especially since it preserves source info
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Because file normalize uses realpath(), the path must exist.
This is not 100% compatible with Tcl which can also normalize
nonexistent paths.
Don't ignore the error from realpath()
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This also simplifies and shrinks the implementation of subst
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now that Jim Tcl supports namespaces, dns.tcl from
tcllib can be used with very few changes.
Revert as much as possible to the original tcllib version
in order to better show the differences between Jim Tcl and big Tcl.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For platforms which don't have long long
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
We implement fconfigure -blocking via $sock ndelay, but
the sense of ndelay is the reverse of -blocking
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
|
|
The Intel C Compiler
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|