aboutsummaryrefslogtreecommitdiff
path: root/jim.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-15Lots of improvementsSteve Bennett1-361/+288
jim --- Add a unique id facility to jim (Jim_GetId()) Remove unused jim_vasprintf(), Jim_AppendString_sprintf() Remove duplicate output in Jim_Panic() Add support for catch -signal aio --- Use this for aio handles aio automatically creates stdin, stdout and stderr channels Jim_AioFilehandle() returns the 'FILE *' filehandle for a channel If JIM_TCL_COMPAT is set, create top level open, close, read, puts, etc. load ---- load core command split out into jim-load.c package ------- package core command split out into jim-package.c added 'package list' posix ----- Remove os.sleep, os.usleep, os.sethostname, os.signal, pit, Jpit Most of these are in 'signal'
2010-10-15Add more tcl6 compatibilitiesSteve Bennett1-26/+158
- string trim, trimleft, trimright - lsort -command, -integer - fix 'unset ::var'
2010-10-15Split package and load out of jim.cSteve Bennett1-461/+1
2010-10-15Strip out unneeded junk from JimSteve Bennett1-785/+56
Nvp, getopt, move interactive processing to jim-interactive.c
2010-10-15Cutover to new workware fork of Jim TclSteve Bennett1-801/+755
Note that this commit removes some files and undoes some commits which will be reapplied later. This is the easiest way to switch across. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-04lists: fix crash in ListInsertElements0.51Øyvind Harboe1-0/+1
It wasn't added to the API list => NPE JIM_REGISTER_API(ListInsertElements); Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-02-01Bring corrected license as mentioned in freebsd/...Wojciech A. Koszek1-2/+1
Remove "FreeBSD license" statements, since it's not a correct term I believe. Small cleanup while being here.
2010-02-01Revert "Bring correct license -- I think freebsd/ directory has an agreements"Wojciech A. Koszek1-1/+2
This reverts commit 1e2fdd7d9e877fbe2c88a4c32f098ce1e575dc1d.
2010-02-01Bring correct license -- I think freebsd/ directory has an agreementsWojciech A. Koszek1-2/+1
for relicensing all files within Jim project. "FreeBSD license" isn't correct term, so basically remove it. Try to make the whole place consistent.
2010-02-01Function strcasecmp() requires strings.h.Wojciech A. Koszek1-0/+1
2010-02-01stdint.h is necessary on GNU/Linux systems.Wojciech A. Koszek1-1/+2
2010-02-01Make jim.c clean enough to be able to build it with -pedantic onWojciech A. Koszek1-8/+12
FreeBSD. Added uintptr_t for eCos.
2010-01-31Instead of making Jim on FreeBSD friendly, make it Cygwin andWojciech A. Koszek1-6/+4
GNU/Linux friendly as well.
2010-01-31If three arguments are passed to 'puts' and the second isn't -nonewline,Wojciech A. Koszek1-1/+1
return JIM_ERR instead of JIM_OK.
2010-01-22freebsd: make it compileWojciech A. Koszek1-0/+19
Casts to (void) are in order to silent GCC about unused variables. I didn't want to break ABI for the sake of clean compilation Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-14errors: improve stack traces for return -code errorSteve Bennett1-17/+19
the file and line number for return -code error's are now added to the dumped stack trace. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-10-19Fix eCos compatiblity problems with autotools.oyvind1-13/+17
2009-10-082009-10-08 Øyvind Harboeoharboe1-764/+751
* jim.c/h: bring in changes from OpenOCD. Warnings and some bug fixes. Copyright list updated in jim.c
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-7/+15
* jim.c: Comparison of doubles is a boolean, not a double. expr {0.5 < 1.0}
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-5/+9
* jim.c: If an error occurs when {expand} is in operation, the line number is wrong.
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-2/+6
* jim.c/h: If an object is used in subst, then source, a crash will result
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-6/+6
* jim.c: Make [format %c 0] work (embedded nulls)
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-2/+2
* jim.c: Some recursion in unknown is OK, just not infinite recursion.
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-6/+14
* jim.c: Should be able to compare strings for order in expr
2009-08-162009-08-16 Steve Bennett <steveb@workware.net.au>oharboe1-3/+9
* jim.c: 'unset ::var' to unset a global var. It was doing nothing.
2008-11-072008-11-06 Steve Bennett <steveb@workware.net.au>oharboe1-9/+13
* jim.c: Implement info hostname by calling os.hostname * jim.c: Also fix some compiler warnings
2008-11-072008-11-06 Steve Bennett <steveb@workware.net.au>oharboe1-13/+43
* jim.c, jim.h: Improve error reporting, especially on package load
2008-11-07 * jim.c, jim.h: Prevent infinite recursion if an unknown command isoharboe1-0/+11
called from unknown
2008-11-05* jim.c: add support for proc default arguments to jimoharboe1-10/+53
2008-11-052008-11-05 Steve Bennett <steveb@workware.net.au>oharboe1-1/+1
* jim.c: fix lazy expression evaluation with unary not
2008-11-042008-11-04 Steve Bennett <steveb@workware.net.au>oharboe1-11/+15
* jim.c: fix problems with "puts [list ${a}]". Resulted in syntax error. * jim.c: :: scoping for set * jim.c: Creating a C command when a Tcl command of the same name already exists can cause a crash.
2008-11-042008-11-03 Steve Bennett <steveb@workware.net.au>oharboe1-15/+73
* Allow env with no arguments to retrieve all environment variables as a list of name value ... * Add format support for %o -- octal * Allow direct access to variables in the global scope by prefixing with :: * For compatibility with older versions of Tcl, allow == and != to compare strings if the arguments can't be interpreted as numbers * Ensure that the string representation exists before doing string toupper or tolower
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