aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-07-24Update autosetup bootstrap jimsh0.c to 0.740.74Steve Bennett1-119/+171
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-24Update linenoise.c to match recent githubSteve Bennett2-19/+211
From git://github.com/msteveb/linenoise.git Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-24Fix a bug in JimNumberBase()Steve Bennett1-1/+2
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>
2013-07-22Make Jim_CheckSignal() a macroSteve Bennett2-9/+5
For performance reasons Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-22Fix --shared buildSteve Bennett2-2/+2
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>
2013-07-22Update documentation and version to 0.74Steve Bennett4-68/+92
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-22Ensure that signals can break vwaitSteve Bennett5-6/+31
The following should break when a handled signal is caught. catch -signal { vwait forever } Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-06-12Fix hardcoded install pathsSteve Bennett1-17/+17
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>
2013-06-12Give libjim.so an sonameSteve Bennett1-1/+1
Reported-by: Markus Mayer <lotharlutz@gmx.de> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-06-12Don't remove _*.c files during buildSteve Bennett1-3/+2
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>
2013-06-12Clean up jim_return.c exampleSteve Bennett1-5/+1
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>
2013-06-12example.api: Replace string object initializationEzequiel Garcia1-6/+2
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>
2013-06-12Remove nonexistent function declarationEzequiel Garcia2-4/+0
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>
2013-05-18Allow docs not to be built/installedSteve Bennett2-3/+11
With --disable-docs Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-05-18Fix installation of Tcl modulesSteve Bennett1-1/+2
When building out of tree Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-30Makefile.in: Depend on the headersLauri Kasanen1-1/+1
Removes the need to do a "make clean" after changing jim.h or other headers. Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-03-28Properly handle systems where (-ve % +ve) returns +veSteve Bennett1-1/+3
Can't just use abs() This is the correct fix rather than c7e5c48 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-28Update autosetup to v0.6.5Steve Bennett11-384/+839
Includes a fix for -gstabs on newer macs Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-28Need abs() since modulo of -ve is impl dependentSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-27More small improvements to JimWideToStringSteve Bennett1-4/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-27Further improvements to JimWideToStringSteve Bennett1-36/+27
Small time and space improvements Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-03-27Implement WideToString locally, printf is slowLauri Kasanen1-2/+37
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>
2013-03-27Remove most quotingType allocations in JimMakeListStringRepLauri Kasanen1-5/+14
Only two bits are needed, so also change to unsigned char from int. Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-03-26Avoid list allocations under four pointers (16/32 bytes)Lauri Kasanen1-2/+10
It's more overhead than usable space to get space for two pointers. Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-03-25Put short-lived hash iterator allocations on the stackLauri Kasanen1-27/+27
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>
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>