Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
From git://github.com/msteveb/linenoise.git
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the number started with an invalid prefix, e.g. "0x + 1",
number parsing would begin past the end of the string.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For performance reasons
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to include the version in the name of the library
to match the link line
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The following should break when a handled signal is caught.
catch -signal { vwait forever }
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Many path inside the makefile are hardcoded, replace them with the
appropriate variables. (Main purpose: '$prefix/lib' is simply wrong
on 64bit systems).
Reported-by: Markus Mayer <lotharlutz@gmx.de>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Markus Mayer <lotharlutz@gmx.de>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It can be easier for debugging if these files are left around.
They are still deleted by make clean.
Reported-By: Markus Mayer <lotharlutz@gmx.de>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Removes a warning and simplifies through the use of Jim_Length()
Reported-By: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The object initialization relies on the API function:
Jim_InitStringRep(), yet this function has been removed
by this commit.
commit 2e8b9ddb92ed1cea3054ed8180d363c9dcc72dd9
Author: Steve Bennett <steveb@workware.net.au>
Date: Sat Feb 18 14:47:11 2012 +1000
Small cleanup/optimisation in object create/dup
(BTW, it's not very clean to remove an API function and
not even specify that in the commit message).
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
|
|
The API function definition for Jim_InitStringRep() has been removed
by the commit:
commit 2e8b9ddb92ed1cea3054ed8180d363c9dcc72dd9
Author: Steve Bennett <steveb@workware.net.au>
Date: Sat Feb 18 14:47:11 2012 +1000
Small cleanup/optimisation in object create/dup
Remove the declaration from the headers as well.
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
|
|
With --disable-docs
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When building out of tree
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Removes the need to do a "make clean" after changing jim.h or other
headers.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
Can't just use abs()
This is the correct fix rather than c7e5c48
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Includes a fix for -gstabs on newer macs
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>
|
|
Small time and space improvements
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Even though it shouldn't need to, sprintf uses the libc-internal mutex,
locale support, and other parts making it slow.
[while] busy loop - 306 ms 311 ms -
[for] busy loop - 180 ms 182 ms -
mini loops - 146 ms 146 ms -
fibonacci(25) - 191 ms 176 ms 92.1466
heapsort - 138 ms 131 ms 94.9275
sieve - 182 ms 143 ms 78.5714
sieve [dict] - 162 ms 138 ms 85.1852
ary - 188 ms 166 ms 88.2979
ary [dict] - 173 ms 156 ms 90.1734
repeat - 132 ms 130 ms -
upvar - 142 ms 147 ms -
nested loops - 173 ms 173 ms -
rotate - 22 ms 22 ms -
dynamic code - 108 ms 97 ms 89.8148
dynamic code (list) - 45 ms 46 ms -
PI digits - 333 ms 319 ms 95.7958
expand - 46 ms 45 ms -
wiki.tcl.tk/8566 - 251 ms 235 ms 93.6255
mandel - 212 ms 199 ms 93.8679
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
Only two bits are needed, so also change to unsigned char from int.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
It's more overhead than usable space to get space for two pointers.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
No reason to have these on the heap for such short whiles.
They are small (32 bytes) and only used within the same function.
v2: The external interface is preserved.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
|
|
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>
|