aboutsummaryrefslogtreecommitdiff
path: root/jim.c
AgeCommit message (Collapse)AuthorFilesLines
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
2005-03-29random number generator fixed. Was a problem with the initializationantirez1-5/+13
of the sbox. (see prev CVS commit comment.)
2005-03-29First fix for [rand]. More later as there is an evident bias due toantirez1-3/+3
some programming error probably.
2005-03-29A number of fix for commands optimizing a bit too much objectsantirez1-21/+122
not shared, that didn't played very well with Jim arrays. Added the [rand] command.
2005-03-28The behaviour of [scope] modified a bit. Test updated accordingly.antirez1-3/+5
2005-03-28[scope] command + testsantirez1-3/+43
2005-03-26some GFX primitive to SDL extension. Minor changes to jim.cantirez1-54/+4
2005-03-25SetReturnCodeFromAny() modified to accept numerical codes.antirez1-4/+7
2005-03-24[range] command + testsantirez1-2/+57
2005-03-22Fix for short circuit in expr.antirez1-3/+3
2005-03-22expr's || and && operators are now lazy.antirez1-81/+247
2005-03-21Add copyright notice within jim.c & jim.h to acknowledge Jim's license.chi1-2/+3
2005-03-21Modified test.tcl to report the list of failed tests at the end.antirez1-49/+48
2005-03-21Add the [scan] command and the Jim_ScanString function + tests.chi1-3/+507
The scanformat specification will be converted to a new Jim_Obj of type scanFormatStringObjType, that will contain the parsed representation within its internal object representation. This speed up multiple scanning within e.g. a loop, of objects were cached. For internal scanning we use sscanf currently (I am lazy right now). That means also, we will inherit its incapability to handle string with embedded ZERO. It would be not too difficult to implement another scanner just for the string and charset conversion type that could be able to handle those embedded ZEROs, however. Furthermore two small details were fixed: 1. Jim_DoubleToString should also recognize a number if a leading '+' or '-' occured. By recognizing I mean, add a ".0" to such a number. 2. Jim_StrDupLen should also properly handle duplication of substrings. So now it should be possible to do this: const char *str1 = "This is a long string"; char *substr1 = Jim_StrDupLen(str1, 4); Now substr1 should contain a properly ZERO ended "This".
2005-03-19Jim_GetIndex() bug fixed (SS)antirez1-3/+3
2005-03-19[finalize] command and relative C API added (SS).antirez1-4/+52
2005-03-18now [setref] returns the value assigned to the reference instead ofantirez1-3/+3
the reference itself.
2005-03-18Fixed an EXPR bug.antirez1-4/+7
2005-03-17[lreverse]antirez1-2/+23
2005-03-17Applied PATCH #389antirez1-2/+3
"debug command is missing NULL terminator in options :)" Thanks to Jaen Saul for report + patch.
2005-03-17Objects hash function changed.antirez1-44/+15
2005-03-17[source] command added.antirez1-4/+21
2005-03-17The interactive prompt can now used to type/paste multi line scripts.antirez1-12/+39
Every line is appended to the previous until the script does not appear to be complete (tested by Jim_IsScriptComplete()).
2005-03-16[env] modified to just be able to read a specified var nameantirez1-44/+17
form the environment, i.e. to be ANSI-C. Minor fix to AIO extension to use the new DelProc API.
2005-03-16Added interpreter pointer to the command delete proc.patthoyts1-5/+5
2005-03-16Added the [env] commandantirez1-3/+64
2005-03-16added CVS ID info in the banner.antirez1-1/+2