aboutsummaryrefslogtreecommitdiff
path: root/jim.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-01 * jim.c, jim.h: more text formatting fixes, improved error messagesoharboe1-17/+64
with location of error
2008-08-25 * jim.c, jim.h: name value pair and formatting fixesoharboe1-3/+458
2008-07-23Uwe Klein:oharboe1-1/+0
* fix missing vararg.h in some files ( included in jim.h ) * in aio.socket return an error when hosti resolution fails instead of just carrying on.
2008-07-23 * jim.c: reduce stack usage. Important for embedded devices withoutoharboe1-6/+16
MMU.
2008-07-21 * src/jim.c: very slightly improved error messages.oharboe1-4/+12
* FreeBSD license cleanup wip
2008-07-17Switched core files to FreeBSD licenseoharboe1-17/+37
2008-07-142008-07-13 Uwe Klein <uklein@klein-messgeraete.de>oharboe1-0/+7
* jim.c: in Jim_SubstObj in the switch for tokentype case: JIM_TT_DICTSUGAR and accompanying code was missing.
2008-07-08 * src/jim.c: remove bogus return value from if {[expr]} {xx} whenoharboe1-1/+4
{xx} is not run.
2008-07-072008-07-07 Duane Ellis <openocd@duaneellis.com>oharboe1-2/+40
src/jim.c: This simple patch adds precision support to JIM's format command.
2008-07-07src/Jim.coharboe1-54/+311
- ** THIS INCLUDES A PREVIOUS PATCH I SENT EARLIER ** - that impliments many [format] specifies JIM did not support. - Jim_FormatString() - **MAJOR** work. - Previously only supported "%s" "%d" and "%c" - And what support existed had bugs. - NEW: *MANY* formating parameters are now supported. - TODO: The "precision" specifier is not supported. ** NEW ** This patch. - Jim_StringToWide() test if no conversion occured. - Jim_StringToIndex() test if no conversion occured. - Jim_StringToDouble() test if no conversion occured. ** NEW ** This Patch. Major Work. - Previously output from JIM did not get sent to GDB - Ditto: Output to Telnet session. - Above items are now fixed - By introducing callbacks new function pointers in the "interp" structure. - Helpers that call the callbacks. - New function: Jim_fprintf() - New function: Jim_vfprintf() - New function: Jim_fwrite() - New function: Jim_fread() - New function: Jim_fflush() - New function: Jim_fgets() By default: the output is to STDIO as previous. The "openocd.c" - redirects the output as needed. - Jim_Panic() - Send panic to both STDERR and the interps specified STDERR output as a 2nd choice. - Now JIM's "stdin/stdout/stderr" paramters are "void *" and are no longer "FILE *". src/Jim.h - **MAJOR** - New JIM STDIO callbacks in the "interp" structure. - change: "stdin/stdout/stderr" are now "void *" cookies. - New JIM stdio helper functions.
2008-06-16 * retire CVS keyword expansion. Plays havoc with patches.oharboe1-7/+2
2008-06-16* ChangeLog, jim.c: fixed parsing in "expr 0x1234".oharboe1-5/+13
2008-06-15 * ChangeLog, jim.c, jim.h, jim-aio.c: Support for eCos.oharboe1-2/+9
2008-06-15 * ChangeLog, jim.c: realloc/malloc(0) fix. Convertoharboe1-4/+10
realloc/malloc(0) => realloc/malloc(1) which has an identical implementation, whereas realloc/malloc(0) is ambigous. "string map {} {}" used to result in malloc(0)
2007-01-31Fixed the stdio declarations to work on Windows and likely on Solaris.patthoyts1-36/+45
A number of MSVC related fixes including support for creating a jim dll
2006-11-06Fixed a bug with proc lookup caching. Now the proc epoch is updated when aantirez1-6/+13
procedure having the same name of an old one is created, as this will drop the old and create the new invalidating the cached proc lookups.
2006-11-06Jim_GetStdin/out/err API removed, now Jim-SetStdin/out/err returns the old ↵antirez1-31/+41
value if called with NULL. JIM_NL define introduced in order to force Jim to output CRLF instead of just LF in the core output printf/fwrite calls. This appears to be useful in some kind of terminal under eCos.
2006-11-05{*} as alias for {expand} like in recent Tcl 8.5 versionsantirez1-4/+6
2006-11-02Ability to configure file descriptors for standard input, output, error.antirez1-58/+84
Default is stdin,stdout,stderr but it's possible to change the default after creating the interpreter using Jim_(Set|Get)(Stdin|Stdout|Stderr) if needed.
2006-11-01Minor change to (hopefully) avoid a warning with some (non-gcc) compiler.antirez1-3/+3
2006-11-01Fixed error message when trying to access a non existing key in dictionaryantirez1-6/+2
2006-11-01Fix to expr parsing (now hex digits work as literals).antirez1-11/+26
the exit command is now implemented as a special return value of JIM_EXIT.
2005-09-19Updated BUGS, fixed some minor problem with GCC 4.x compilation.antirez1-5/+5
2005-04-18First version of the Jim eventloop extension, exportingantirez1-5/+49
[after], [vwait], and the C API to write other extensions using events. No win32 port for now, just posix. UDP extension will follow shortly and will be the first extension using the event loop.
2005-04-12string tolower/toupper supportantirez1-4/+38
2005-04-11- Remove the '%lu' scan format specification. The largest possible typechi1-9/+13
in the Jim core is jim_wide. That type is a signed one. A unsigned variante of jim_wide is not forseen. So a '%lu' specification seems not to make any sense. - Some extra castings necessary to let the Jim core interpreter compile and run under Tru64U on Dec Alpha. - Fix a bug in UpdateStringOfList(). If a list was created via the Jim command [list] w/o any argument, the internal representation of that list pointed to ZERO and the len attribute was equally set to ZERO. If now UpdateStringOfList was called to create the string representation of the list, Jim_Alloc for quotingType got a ZERO size for number of bytes to allocate. That let to SIGSEGV under Tru64U, so I changed that to allocate at least 1 byte then.
2005-04-11RHS/Nem vision about [tailcall] implementation/behaviour is now Jim'santirez1-11/+10
way to go.
2005-04-11[tailcall] command addedantirez1-3/+16
2005-04-11Fixes for this two bugs:antirez1-3/+5
(1) jim.c Jim_FormatString() char array spec[] is defined as having two elements but at the 'default:' case of the switch statement an assignment is made to the third element (2) jimsh.c JimGetExePath() After the call of strrchr() the value of p could be NULL in the case that argv[0] is just plain "jim". The next line should have a test for NULL added to avoid dereferencing the NULL pointer. (This is the cause of a Bus Error on Mac OS X.) Many thanks to Colin McPhail for reporting this two problems.
2005-04-10Rework of the [scan] command finished. It does not any longer usechi1-82/+215
sscanf for scanning purposes, only for parsing within SetScanFmtFromAny. We could get rid of it there too, if necessary. It pass all tests on all platforms I had access to (mainly Linux, Solaris, FreeBSD, MacOS X). But I am confident, that it will pass on the others as well. A small new introduced C99-ism was fixed in jimsh.c as well.
2005-04-10Fix for [return -code eval]antirez1-6/+8
2005-04-09Experimental verison of JIM_EVAL retcode in order to implementantirez1-6/+19
what RHS proposed in the Wiki for tail recursion: return -code eval [list proc $a $b ...] I'm not sure I'll take this, but it needs to be inside for some time in order to experiment and evaluate it I guess.
2005-04-09TODO updated, spurious free changed into Jim_Free().antirez1-3/+12
2005-04-08Fix win32 buildpatthoyts1-3/+6
2005-04-07The ** expr operator, thanks to Richard Suchenwirth.antirez1-32/+36
Limited to integers because pow() needs the inclusion of math.h. The plan is to put everything depends on math.h in the math lib.
2005-04-06Modified jimsh.c in order to put the directory of the Jim executableantirez1-31/+4
as a component of jim_libpath.
2005-04-06Add the executable file location into jim_libpath for finding packages.patthoyts1-3/+32
2005-04-06Shhhhh. Silenced a number of warnings when using MSVC.patthoyts1-6/+6
2005-04-06Generic API implementing the Stack data structure exported toantirez1-8/+9
extensions.
2005-04-05[scope] command removed. Will be added later with the [let] name andantirez1-46/+2
a bit different semantic.
2005-04-05.jimrc support (or jimrc.tcl). Minimal readline extension, just enoughantirez1-8/+7
to allow to the pure-Jim rlprompt extension to provide a readline-aware interactive shell with history.
2005-04-04Fixed a memory leak introduced some day ago.antirez1-101/+3
Thanks to 'valgrind'.
2005-04-04Some change in the standard library, a bug about [info body/args]antirez1-10/+112
fixed. some commented work in progress for exposing the Jim parse at script level. Default compilation set to -Os again.
2005-04-02Added a very immature start of a Jim standard library.antirez1-4/+15
2005-04-02win32 opendir() and related compatibility API.antirez1-6/+94
2005-04-02fix for win32antirez1-6/+8
2005-04-02[package require] + Makefile changes about libraries currently not working...antirez1-26/+224
2005-03-31Implemented the C API "background" for the packages system of Jim.antirez1-3/+137
2005-03-29[info args] addedantirez1-6/+11
2005-03-29Fixed [range] for the case of unique element possible as output.antirez1-4/+4