aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-25Shuffle ScanFmtPartDescr to reduce size (40 -> 32)Lauri Kasanen1-4/+4
Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-03-14Trivial optimisationSteve Bennett1-1/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-13Shuffle ExprByteCode to reduce size on 64-bit (24->16)Lauri Kasanen1-1/+1
Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-03-13Make expr array more compactSteve Bennett1-33/+33
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-12Shuffle Jim_Obj to shrink it on 64bit (72 -> 64), removing holesLauri Kasanen1-2/+2
No perf difference measured using bench.tcl. Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-03-12Precompute operator length for JimParseExprOperator, optimize logicLauri Kasanen1-68/+72
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>
2013-02-15Fix [string replace] replacing single charSteve Bennett2-2/+52
Also added some additional tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-12-14Update linenoise.c to match recent githubSteve Bennett1-9/+20
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.
2012-11-29Use sqlite3_prepare_v2()af1232-2/+2
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."
2012-10-31Fix linenoise serial console window size for vt102Steve Bennett1-9/+9
This includes minicom, which doesn't support hpa (CHA), only cuf. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-10-31bug in sqlite module (array index out of bounds)ketmar1-2/+2
Invalid array indexing in error message (array index out of bounds).
2012-10-19Fix a linenoise bug when moving off the leftSteve Bennett1-1/+1
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>
2012-10-10Fix bug that was causing the system "environ" variable to be freed, which ↵Evan Hunter1-1/+1
caused mayhem in stdio etc.
2012-09-24Fix binary scan for too-few bytes.Vadim Zborovskii2-2/+17
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>
2012-09-24Fix the check of readline library.Vadim Zborovskii1-1/+1
2012-09-22Add tests for the glob commandSteve Bennett1-0/+131
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-22Allow abbreviations to glob optionsSteve Bennett1-14/+26
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-20Add support for glob -directoryAlexander Shpilkin3-95/+146
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.
2012-09-11Add support for string {equal,compare} -lengthSteve Bennett4-1884/+1923
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-06aio seek and tell should allow for 64 bit offsetsSteve Bennett2-7/+18
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-06Fix conversion of numbers >= 2^31Steve Bennett2-2/+5
A conversion was being stored in a long rather than a long long Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-19Fix buffer overflow in [info references]Steve Bennett1-1/+1
Need to account for the null terminator Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-19Ensure that the full ref is passed to finalizerSteve Bennett1-1/+1
The reference was being incorrectly truncated Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-19Reference keys are unsigned long, not jim_wideSteve Bennett1-1/+1
This fixes an invalid memory reference in [info references] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-19Fix invalid memory reference during finalisersSteve Bennett1-1/+4
Avoid destroying the reference object until after the finaliser has been run Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-18Fix a dict/list shimmering bugSteve Bennett2-2/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-07Remove octal literals with a leading 0 (TIP #114)Steve Bennett9-62/+233
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>
2012-05-10Fix a compiler warning with namespaces disabledSteve Bennett2-5/+10
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-03-13Fix a reference counting bugSteve Bennett3-4/+17
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>
2012-03-02Fix make-index speed-upSteve Bennett1-1/+1
Need to substitute the index too Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-28Optimise calls to a proc with an empty bodySteve Bennett1-0/+5
Note that even white space will defeat this optimisation Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-28Short circuit converting empty string to listSteve Bennett1-9/+11
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-27Fix a bug in globSteve Bennett1-1/+1
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>
2012-02-27Add support for aio command: isattySteve Bennett3-2/+22
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-24Enabled optimised dict -> list conversionSteve Bennett1-3/+4
Especially since it preserves source info Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-21file normalize only works with an existing pathSteve Bennett1-2/+3
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>
2012-02-18Small cleanup/optimisation in object create/dupSteve Bennett1-23/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-17subst -noc should substitute vars inside bracketsSteve Bennett2-57/+34
This also simplifies and shrinks the implementation of subst Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-14Update autosetup to 0.6.4Steve Bennett4-1351/+1966
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-14Documentation fixesSteve Bennett1-13/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-14make-index is *much* slower than it should beSteve Bennett1-1/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-14Update examples/dns.tcl to match tcllibSteve Bennett1-184/+209
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>
2012-02-14Use JIM_WIDE_MAX rather than LLONG_MAXSteve Bennett1-1/+1
For platforms which don't have long long Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-10Sense of fconfigure ... -blocking is reversedSteve Bennett1-1/+1
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>
2012-02-02glob patterns can contain [] tooSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: af123 <jimdevel@hummypkg.org.uk>
2012-02-02Allow 'aio copyto' and 'aio read' to copy >2GBSteve Bennett1-9/+6
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: af123 <jimdevel@hummypkg.org.uk>
2012-01-29Fix glob with patterns containing spacesSteve Bennett1-2/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: af123 <jimdevel@hummypkg.org.uk>
2012-01-29Space allocated for exec env may be one byte shortSteve Bennett1-3/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: af123 <jimdevel@hummypkg.org.uk>
2012-01-19Fix some warnings identified by iccSteve Bennett4-13/+14
The Intel C Compiler Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-01-12Fix forgotten cleanup in the history extensionAlexander Shpilkin1-1/+6