Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Non-zero return codes (e.g. break, continue, exit) were all being
converted to the error code.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Rework the expression engine to use recursive descent evaluation rather than
a shunting yard algorithm. Among other things, it is easier to make lazy operators
and the ternary operator work correctly.
In particular, the following expression no longer crashes: $(99?9,99?9:*9:999)?9)
And the code is now smaller.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Minor optimisation
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Removes some duplicate code
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Must have a stringrep before parsing.
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For counted repetitions
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In this case the final element was written a second time.
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Calling the system sprintf() with overly long sizes can cause problems,
so limit field size to 10000.
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoid a stack overflow
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
These are only allowed as separate args. One check was allowing
them as a prefix which could lead to an invalid memory access
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Don't read invalid memory
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When duplicating interpolated object type, need to increment
ref count of the key to offset the decrement during free.
Also remove type-specific dup for dict-substitution which is not
needed since it does nothing different from the default dup.
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Only duplicate a shared object
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
opt-val now returns a list, so take the last option given
Reported-by: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sockets need extra work on Windows, so not supported there yet.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Enable or disable Nagle's algorigthm
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Stuart Cassoff <stwo@bell.net>
|
|
Reported-by: Stuart Cassoff <stwo@bell.net>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
gmtime() fails for negative time_t values.
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>
|
|
Off by one for length of the return code name array.
Found with afl-fuzz.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Ref count may be wrong when an expression is used
in interpolation.
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
expr {1 : 2 ? 3}
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoid exception on integer divided by zero
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
|
|
For the benefit of C89 compilers.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
343be844 cc tests should use LIBS and LDFLAGS
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
e.g. a usb-serial port
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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
|
|
|
|
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>
|