aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-07expr: fix crash on invalid ternary orderSteve Bennett2-1/+10
expr {1 : 2 ? 3} Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-04-07Fix / command: divide by zeroSteve Bennett2-1/+11
Avoid exception on integer divided by zero Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-03-16linenoise.c: Use <poll.h> instead of <sys/poll.h>Steve Bennett1-1/+1
Update to match linenoise.git Signed-off-by: Steve Bennett <steveb@workware.net.au> diff --git a/linenoise.c b/linenoise.c index 091d197..171dcef 100644 --- a/linenoise.c +++ b/linenoise.c @@ -116,7 +116,7 @@ #else #include <termios.h> #include <sys/ioctl.h> -#include <sys/poll.h> +#include <poll.h> #define USE_TERMIOS #define HAVE_UNISTD_H #endif Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-03-11Fix buffer overrun in utf8_index()HummyPkg1-1/+1
2017-03-03Fix some declarations after codeSteve Bennett3-5/+7
For the benefit of C89 compilers. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-02-13aio: Fix stdio error detectionSteve Bennett1-1/+1
The test for ECONNABORTED was reversed such that errors such as ENXIO did not correctly return an error. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-11-19build: remove jimtcl.pc on distcleanSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-11-14dict: Fix [dict values] with duplicate valuesSteve Bennett5-48/+38
The script implementation of dict values was not correctly handling the case where a dictionary had duplicate values. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-26build: update autosetup for LIBS/LDFLAGS fixSteve Bennett1-4/+9
343be844 cc tests should use LIBS and LDFLAGS Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-26build: On NetBSD backtrace is in -lexecinfoSteve Bennett1-1/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-26examples/tip.tcl: Gracefully handle serial port being removedSteve Bennett1-2/+9
e.g. a usb-serial port Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-19examples/tip.tcl: Lock the deviceSteve Bennett1-0/+5
Prevent multiple access to a serial port by using locking. This is probably compatible with most serial port locking on Linux. Perhaps on macosx. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-18aio tty: clear ICRNL for raw input modeSteve Bennett1-0/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-17Add pkg-config support: jimtcl.pcSteve Bennett4-1/+21
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-14build: update autosetup for Tcl 8.5 compatibilitySteve Bennett1-20/+16
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-13Fix distclean of jimsh0 when building not in source dirEvan Hunter1-1/+1
2016-10-12signal: restore default signal handlingSteve Bennett1-1/+20
If the interpreter or signal command is deleted, restore default signal handling and free allocated memory. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-12Array fixes and testsEvan Hunter4-15/+84
Changed 'array exists' to actually check if the variable is an array (matches tclsh) Fix Jim_DictInfo to avoid using printf() and make output match tclsh Added some more tests for array command - checked these work with tclsh
2016-10-11Fix warnings when building win32 module and add module to appveyor buildEvan Hunter2-4/+4
2016-10-11build: remove -Werror when running ./configureSteve Bennett1-0/+6
Building with CFLAGS="-Werror -Wall" caused configure to fail due to the following warnings being converted to errors: * conflicting types for built-in function * unused variable When these warnings get converted to errors, they prevent the detection of fork, isascii, isinf, isnan, math libs, long long & struct flock. Add -Wno-error in this case to prevent these warnings being treated as errors. Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-11improve example autocompletion function to complete partially typed argumentsHummyPkg1-2/+4
2016-10-11Separate out Jim specific testsEvan Hunter3-10/+36
2016-10-09docs: Only try to build Tcl.html if asciidoc is foundSteve Bennett2-11/+35
Otherwise install the shipped docs with a warning. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-09Add more tests for zlibEvan Hunter1-0/+21
2016-10-09Fix C++ compatibilityEvan Hunter2-4/+4
Compiling for C++ (as is needed for Metakit extension) generates an error due to the use of the reserved word 'template' as an argument name. Renaming this argument
2016-10-09exec: Fix windows exec with empty or unset envSteve Bennett1-5/+32
Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-09jim.c: Fix Object leak in zlib supportSteve Bennett2-5/+11
Change Jim_SetResultFormatted() to increment/decrement the ref count of any %#s parameters. This allows zero refcount objects to be passed in and be freed automatically. Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-09Avoid re-defining _GNU_SOURCEEvan Hunter3-0/+6
pkgconfig for SDL causes _GNU_SOURCE to be defined on the commandline, hence causing an error when these source files re-define it.
2016-10-06Fix makefile dependenciesEvan Hunter1-1/+1
Not all objects were dependent on the Makefile/headers, so the following build sequence resulted in failure: ./configure CFLAGS="--coverage" LDFLAGS="--coverage" && make ./configure && make
2016-10-06eventloop: Don't assume unistd.h and sys/time.hSteve Bennett1-4/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-06Fix for systems without umaskSteve Bennett4-10/+25
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-06jim-exec: use exec false on failed exec in --maintainer modeSteve Bennett1-0/+7
Keeps valgrind happy Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-06jim.c: Use UCHAR() with isxxx() functionsSteve Bennett1-1/+1
For systems with signed char Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-06Fix test target for out-of-tree buildsEvan Hunter1-1/+1
2016-10-06autocomplete: add global $tcl::autocomplete_commandsSteve Bennett1-1/+4
Contains commands that suport -commands, to make it easy to add custom commands without replacing the default tcl::autcomplete (although that is still the recommended approach) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-06add filename completion for source commandHummyPkg1-0/+7
2016-10-05dict: dict replace with one arg is not stableSteve Bennett1-1/+1
Fix dict2.test/dict-4.1 Even with no key/values given, the order of the returned dictionary is not guaranteed. Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-02Add some tests for paths identified as untested by gcov.Evan Hunter4-2/+19
Also prune a 'break' which was unreachable.
2016-10-02jim-win32compat.h: Use snprintf rather than _snprintfSteve Bennett1-1/+0
Apparently snprintf exists now and _snprintf is not C99 compliant Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-10-02exec: ensure closed fd is -1Steve Bennett1-0/+1
Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-29jimsh: Scriptable command-line completion supportSteve Bennett5-13/+90
via tcl::autocomplete Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-29Add support for "-commands" to many commandsSteve Bennett5-18/+57
This option returns a list of support subcommands and is useful for command line completion. Support added to: socket, namespace, tcl::prefix, string, dict, info Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-29jimsh: add support for "jimsh -"Steve Bennett1-7/+11
A convenience for evaluating a script on stdin without interactive mode Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-29configure: allow "--full" options to be explicitly disabledSteve Bennett1-5/+19
Now it is possible to do: configure --full --disable-ssl Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-29Update autosetup to v0.6.6Steve Bennett6-67/+162
Among other things, includes improved option parsing Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-28tcltest: print test description on SKIP if verboseSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-28jim.c: Replace 'dict with' with a C versionSteve Bennett2-21/+66
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-28file: update file stat to use Jim_DictMerge()Steve Bennett2-8/+11
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-28jim.c: replace 'dict merge' with a C versionSteve Bennett2-18/+35
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-28tests/runall: don't abort if signal.test exitsSteve Bennett1-1/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>