Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit a1a87f72fc61cc085680019eef45312fb2a52d13 @antirez committed Nov 20, 2009
Showing with 46,791 additions and 0 deletions.
  1. +41 −0 AUTHORS
  2. +9 −0 BUGS
  3. +40 −0 COPYING
  4. +1,556 −0 ChangeLog
  5. +40 −0 LICENSE
  6. +168 −0 Makefile
  7. +181 −0 Makefile.vc
  8. +276 −0 README
  9. +65 −0 STYLE
  10. +100 −0 TODO
  11. +571 −0 bench.tcl
  12. +80 −0 doc/AIO-Extension.txt
  13. +104 −0 doc/Embedder-HOWTO.txt
  14. +177 −0 doc/Sqlite-Extension.txt
  15. +80 −0 doc/jim_man.txt
  16. +57 −0 ecos/ecos.db
  17. +44 −0 ecos/language/tcl/jim/current/ChangeLog
  18. +102 −0 ecos/language/tcl/jim/current/cdl/jimtcl.cdl
  19. +640 −0 ecos/language/tcl/jim/current/doc/jimtcl.sgml
  20. +101 −0 ecos/language/tcl/jim/current/include/jim-eventloop.h
  21. +1,324 −0 ecos/language/tcl/jim/current/include/jim.h
  22. +775 −0 ecos/language/tcl/jim/current/src/jim-aio.c
  23. +542 −0 ecos/language/tcl/jim/current/src/jim-eventloop.c
  24. +12,844 −0 ecos/language/tcl/jim/current/src/jim.c
  25. +210 −0 ecos/pkgconf/rules.mak
  26. +11 −0 ecos/readme.txt
  27. +7 −0 ecos/update.sh
  28. +65 −0 freebsd/andrew.txt
  29. +87 −0 freebsd/clemens.txt
  30. +65 −0 freebsd/duane.txt
  31. +85 −0 freebsd/oharboe.txt
  32. +84 −0 freebsd/pat.txt
  33. +88 −0 freebsd/salvatore.txt
  34. +73 −0 freebsd/uwe.txt
  35. +775 −0 jim-aio.c
  36. +104 −0 jim-array-1.0.tcl
  37. +542 −0 jim-eventloop.c
  38. +101 −0 jim-eventloop.h
  39. +133 −0 jim-glob-1.0.tcl
  40. +669 −0 jim-hwio.c
  41. +84 −0 jim-hwio.inoutblock.h
  42. +378 −0 jim-posix.c
  43. +122 −0 jim-readdir.c
  44. +61 −0 jim-readline.c
  45. +482 −0 jim-regexp.c
  46. +31 −0 jim-rlprompt-1.0.tcl
  47. +235 −0 jim-sdl.c
  48. +281 −0 jim-sqlite.c
  49. +297 −0 jim-sqlite3.c
  50. +54 −0 jim-stdlib-1.0.tcl
  51. +1,138 −0 jim-win32.c
  52. +448 −0 jim-win32api.c
  53. +860 −0 jim-win32com.c
  54. +12,863 −0 jim.c
  55. +1,324 −0 jim.h
  56. +174 −0 jimsh.c
  57. +73 −0 regtest.tcl
  58. +4,824 −0 test.tcl
  59. +46 −0 tools/benchtable.tcl
41 AUTHORS
@@ -0,0 +1,41 @@
+Salvatore Sanfilippo <antirez@invece.org>
+
+with the help (patches, bug reports, ideas, extensions) of:
+
+Pat Thoyts
+Clemens Hintze
+
+See also the ChangeLog and README files for other credits.
+
+DESIGN CREDITS:
+
+some of the idea inside Jim are the fruit of long discussions
+inside the Tclers chat room. The feedback of the Tcl
+comunity in general, and of the members of the Tcl Core Team, was
+very important to avoid mistakes: I used the great experience of
+this people as a test for some of the ideas I put into Jim.
+Bad ideas tend to be demolished in no time by good engineers.
+
+Also the following ideas are due to the following authors:
+
+- Jim locals were originally proposed by Miguel Sofer, I (SS) added
+ the feature that make they similar to lexical scoped closures
+ using capturing of the local variables value if no explicit
+ intialization is provided.
+
+- The [lmap] command is my (SS) design, but I incorporated inside the
+ command an interesting idea of Donal K. Fellows that proposed that
+ the [continue] command may be used to skip the accumulation of the
+ current-iteartion result, providing in one command the power of
+ [map] and [filter] together.
+
+
+ChangeLog committers to be identified. Tentative list:
+
+antirez - Salvatore Sanfilippo <antirez@gmail.com>
+patthoyts - Pat Thoyts <patthoyts@users.sf.net>
+oharboe - Øyvind Harboe - soyvind.harboe@zylin.com
+Andrew Lunn <andrew@lunn.ch>
+Duane Ellis <openocd@duaneellis.com>
+Uwe Klein <uklein@klein-messgeraete.de>
+Clemens Hintze ml-jim@qiao.in-berlin.de aka chi
9 BUGS
@@ -0,0 +1,9 @@
+Known bugs:
+
+EXPR: || and && are not lazy. ?: is not implemented. Double math not
+ implemented. Functions like sin(), cos(), not implemented.
+
+[subst] ingores special meaning of JIM_BREAK and alike.
+
+[list #] should generate {#} and not #, this was also broken in Tcl 8.4, fixed in
+8.5.
40 COPYING
@@ -0,0 +1,40 @@
+/* Jim - A small embeddable Tcl interpreter
+ *
+ * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
+ * Copyright 2005 Clemens Hintze <c.hintze@gmx.net>
+ * Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
+ * Copyright 2008 oharboe - �yvind Harboe - oyvind.harboe@zylin.com
+ * Copyright 2008 Andrew Lunn <andrew@lunn.ch>
+ * Copyright 2008 Duane Ellis <openocd@duaneellis.com>
+ * Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de>
+ *
+ * The FreeBSD license
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * JIM TCL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * official policies, either expressed or implied, of the Jim Tcl Project.
+ **/
1,556 ChangeLog
@@ -0,0 +1,1556 @@
+2009-10-14 Øyvind Harboe
+
+ * switched to git.
+
+2009-10-08 Øyvind Harboe
+
+ * jim.c/h: bring in changes from OpenOCD. Warnings and
+ some bug fixes. Copyright list updated in jim.c
+
+2009-08-16 Steve Bennett <steveb@workware.net.au>
+
+ * jim.c: Comparison of doubles is a boolean, not a double. expr {0.5 < 1.0}
+ * jim.c: If an error occurs when {expand} is in operation, the line number is wrong.
+ * jim.c/h: If an object is used in subst, then source, a crash will result
+ * jimsh.c: A script exiting with 'exit 0' would not give a return code of 0
+ * jim.c: Make [format %c 0] work (embedded nulls)
+ * jim-array-1.0.tcl: array unset was broken
+ * jim.c: Some recursion in unknown is OK, just not infinite recursion.
+ * jimsh.c: $argv0 should be the name of the script
+ * jim.c: Should be able to compare strings for order in expr
+ * jim.c: 'unset ::var' to unset a global var.
+ It was doing nothing.
+
+2008-11-06 Steve Bennett <steveb@workware.net.au>
+
+ * jim.c: Implement info hostname by calling os.hostname
+ * jim.c: Also fix some compiler warnings
+
+2008-11-06 Steve Bennett <steveb@workware.net.au>
+
+ * jim.c, jim.h: Improve error reporting, especially on package load
+
+2008-11-06 Steve Bennett <steveb@workware.net.au>
+
+ * jim.c, jim.h: Prevent infinite recursion if an unknown command is
+ called from unknown
+
+2008-11-06 Steve Bennett <steveb@workware.net.au>
+
+ * jim-array-1.0.tcl: Add array command wrapper
+
+2008-11-05 Steve Bennett <steveb@workware.net.au>
+
+ * jim-glob-1.0.tcl, jim-readdir.c: Add readdir extension and glob package for glob command
+
+2008-11-05 Steve Bennett <steveb@workware.net.au>
+
+ * jim-glob-1.0.tcl, jim-readdir.c: Add readdir extension and glob package for glob command
+
+2008-11-05 Steve Bennett <steveb@workware.net.au>
+
+ * jim-regexp.c: Add regexp extension for regexp and regsub commands
+
+2008-11-04 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * jim-hwio.c: file added
+ * provides memory area and hardware access on linux i386
+
+2008-11-05 Steve Bennett <steveb@workware.net.au>
+
+ * jim.c: add support for proc default arguments to jim
+ * jim.c: fix lazy expression evaluation with unary not
+
+2008-11-04 Steve Bennett <steveb@workware.net.au>
+
+ * 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-03 Steve Bennett <steveb@workware.net.au>
+
+ * jim.c: Allow env with no arguments to retrieve all environment variables
+ as a list of name value ...
+ * jim.c: Add format support for %o -- octal
+ * jim.c: Allow direct access to variables in the global scope by
+ prefixing with ::
+ * jim.c: For compatibility with older versions of Tcl, allow == and != to
+ compare strings if the arguments can't be interpreted as numbers
+ * jim.c: Ensure that the string representation exists before doing
+ string toupper or tolower
+
+2008-08-31 Duane Ellis
+
+ * jim.c, jim.h: more text formatting fixes, improved error messages
+ with location of error
+
+2008-08-25 Duane Ellis
+
+ * jim.c, jim.h: name value pair and formatting fixes
+
+2008-07-23 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * 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 oharboe
+
+ * jim.c: reduce stack usage. Important for embedded devices without
+ MMU.
+ * jim.c, jim-aio.c, jim-eventloop.c, jim-eventloop.h: emergency repairs
+ to make code compile with eCos after event loops was added. event loop
+ stuff compiles under eCos at least, but this was not tested for regressions.
+
+2008-07-21 oharboe
+
+ * src/jim.c: very slightly improved error messages.
+ * FreeBSD license cleanup wip
+
+2008-07-13 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * doc/jim_man.txt : an overlook over jim command basics
+ and the added commands. incomplete, additions welcome.
+
+2008-07-13 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * signals ( not complete , no eventscripts yet ) sleep and usleep
+ [pit] point in time and [jpit] julian point in time.
+
+2008-07-13 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * This adds open async, fileevents and sockets ( tcp server, client )
+ to jim-aio, using fileevents requires the jim-eventloop package .
+
+2008-07-13 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * jim.c: in Jim_SubstObj in the switch for tokentype
+ case: JIM_TT_DICTSUGAR and
+ accompanying code was missing.
+
+2008-07-07 Uwe Klein <uklein@klein-messgeraete.de>
+
+ * changes to jim-eventloop.[ch]
+ * fix negative displacement in timeout computation for select
+ * add basic support for the fileevent stuff [ used from jim-aio ]
+ * add basic support for signal handling / actions
+ * add basic support for timer [via after] restart, cancel
+ and returning the remaining time for cancled events
+
+2008-07-07 oharboe
+
+ * src/jim.c: remove bogus return value from if {[expr]} {xx} when
+ {xx} is not run.
+
+2008-07-07 Duane Ellis <openocd@duaneellis.com>
+
+src/jim.c: This simple patch adds precision support to JIM's format command.
+
+2008-07-07 Duane Ellis <openocd@duaneellis.com>
+
+src/Jim.c
+ - ** 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-17 Andrew Lunn <andrew@lunn.ch> / oharboe
+
+ * ChangeLog, jim-aio.c: Andrew spotted a bug in the
+ aio.gets implementation for lines that are more than
+ AIO_BUF_LEN long. GCC 4.3.1 pointed out this problem.
+
+2008-06-16 oharboe
+
+ * retire CVS keyword expansion. Plays havoc with patches.
+
+2008-06-16 Uwe Klein wiederling at googlemail.com
+
+ * ChangeLog, jim.c: fixed parsing in "expr 0x1234".
+
+2008-06-16 oharboe
+
+ * ChangeLog, ecos/ecos.db: eCos repository smoketested.
+
+2008-06-15 oharboe
+
+ * ChangeLog, jim.c, jim.h, jim-aio.c: Support for eCos.
+ * ChangeLog, jim.c: realloc/malloc(0) fix. Convert
+ 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)
+
+2008-06-13 oharboe
+
+ * ChangeLog: �yvind Harboe's first test as a committer.
+
+2006-11-06 21:29 antirez
+
+ * ChangeLog, jim.c, jim.h: Jim_GetStdin/out/err API removed, now
+ Jim-SetStdin/out/err returns the old 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-06 17:54 antirez
+
+ * jim-aio.c: Jim-aio is now able to be statically linked with jim.c
+ on systems like eCos where there is no dynamic libraries support.
+
+2006-11-05 01:26 antirez
+
+ * ChangeLog, jim.c: {*} as alias for {expand} like in recent Tcl
+ 8.5 versions
+
+2006-11-02 23:39 antirez
+
+ * ChangeLog: [no log message]
+
+2006-11-02 23:38 antirez
+
+ * ChangeLog, jim.c, jim.h: Ability to configure file descriptors
+ for standard input, output, error. 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-02 00:31 antirez
+
+ * AUTHORS, ChangeLog: Minor doc typo
+
+2006-11-01 18:18 antirez
+
+ * ChangeLog, jim.c: Minor change to (hopefully) avoid a warning
+ with some (non-gcc) compiler.
+
+2006-11-01 17:03 antirez
+
+ * ChangeLog, jim.c: Fixed error message when trying to access a non
+ existing key in dictionary
+
+2006-11-01 14:37 antirez
+
+ * jim.c, jim.h: Fix to expr parsing (now hex digits work as
+ literals). the exit command is now implemented as a special
+ return value of JIM_EXIT.
+
+2005-09-19 17:56 antirez
+
+ * ChangeLog, jim-eventloop.c: Fixed a bug reported by Craig Denson
+ about jim-eveloop.c and filemasks.
+
+2005-09-19 17:47 antirez
+
+ * BUGS, ChangeLog, jim.c: Updated BUGS, fixed some minor problem
+ with GCC 4.x compilation.
+
+2005-09-19 16:17 antirez
+
+ * doc/Sqlite-Extension.txt: Added info about in-memory databases in
+ the Sqlite extension doc.
+
+2005-04-26 15:31 patthoyts
+
+ * jim-win32.c: Check available windows target version for more
+ things.
+
+2005-04-26 12:47 antirez
+
+ * ChangeLog, Makefile, jim-win32.c: mingw compilation fix
+ (excluding the compilation of animate window win32 cmd)
+
+2005-04-21 09:35 patthoyts
+
+ * jim-win32.c: RegisterClass, CreateWindow and UpdateWindow. Need
+ to add user defined Window procedures though.
+
+2005-04-20 17:34 patthoyts
+
+ * jim-win32.c: Added some window managing APIs - MoveWindow,
+ ShowWindow, DestroyWindow and AnimateWindow (which doesn't seem
+ to work).
+
+2005-04-19 17:33 patthoyts
+
+ * jim-win32.c: Added CreateDirectory and RemoveDirectory
+
+2005-04-18 10:31 antirez
+
+ * ChangeLog, Makefile, jim-eventloop.c, jim-eventloop.h, jim.c,
+ jim.h: First version of the Jim eventloop extension, exporting
+ [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-13 21:57 patthoyts
+
+ * jim-win32.c: Added GetLastInputInfo API
+
+2005-04-13 21:54 patthoyts
+
+ * jim-win32api.c: Win32API module permits dynamic creation of Jim
+ commands that call into Win32 DLL functions. Its not complete and
+ at the moment only void or integer parameters are working.
+
+2005-04-13 21:50 patthoyts
+
+ * jimsh.c: JimGetExePath needs to be a _path_ not the file name.
+
+2005-04-12 14:36 antirez
+
+ * ChangeLog, jim-aio.c: AIO fix: the Id is not get with the
+ GetGlobalVar function.
+
+2005-04-12 14:27 antirez
+
+ * ChangeLog, jim.c: string tolower/toupper support
+
+2005-04-12 10:34 antirez
+
+ * ChangeLog, jim-aio.c: new methods for AIO files, 'read' and
+ 'eof'. Documentation still no longer in sync.
+
+2005-04-11 19:25 chi
+
+ * jim.c: - Remove the '%lu' scan format specification. The largest
+ possible type 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-11 16:34 antirez
+
+ * ChangeLog, TODO, jim.c: RHS/Nem vision about [tailcall]
+ implementation/behaviour is now Jim's way to go.
+
+2005-04-11 13:17 antirez
+
+ * ChangeLog, jim.c: [tailcall] command added
+
+2005-04-11 10:25 antirez
+
+ * ChangeLog, jim.c, jimsh.c: Fixes for this two bugs:
+
+ (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-10 19:04 chi
+
+ * jim.c, jimsh.c: Rework of the [scan] command finished. It does
+ not any longer use 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-10 11:51 antirez
+
+ * ChangeLog, jim.c, jim.h: Fix for [return -code eval]
+
+2005-04-09 14:57 antirez
+
+ * ChangeLog, jim.c, jim.h: Experimental verison of JIM_EVAL retcode
+ in order to implement 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-09 10:23 antirez
+
+ * ChangeLog, TODO, jim.c: TODO updated, spurious free changed into
+ Jim_Free().
+
+2005-04-08 16:07 patthoyts
+
+ * jim-win32.c: Do not add cursorinfo if build target cannot cope.
+
+2005-04-08 16:06 patthoyts
+
+ * jim.c, jimsh.c: Fix win32 build
+
+2005-04-07 09:27 antirez
+
+ * ChangeLog, jimsh.c: Fixed a typo that prevented compilation with
+ JIM_ANSIC
+
+2005-04-07 08:52 antirez
+
+ * ChangeLog, jim.c: The ** expr operator, thanks to Richard
+ Suchenwirth. 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-06 20:20 antirez
+
+ * ChangeLog, jim.c, jimsh.c: Modified jimsh.c in order to put the
+ directory of the Jim executable as a component of jim_libpath.
+
+2005-04-06 16:16 patthoyts
+
+ * Makefile.vc, jim.c: Add the executable file location into
+ jim_libpath for finding packages.
+
+2005-04-06 15:08 patthoyts
+
+ * jim-win32.c: Fix a problem with usie of mingw gcc and remove some
+ gcc warnings.
+
+2005-04-06 14:52 patthoyts
+
+ * jim-win32.c: Use __stdcall for mingw
+
+2005-04-06 12:14 patthoyts
+
+ * jim.c, jim.h: Shhhhh. Silenced a number of warnings when using
+ MSVC.
+
+2005-04-06 12:13 patthoyts
+
+ * Makefile.vc, jim-win32.c: Made GetPerformanceInfo dynamically
+ available at runtime only if the relevant library can be loaded.
+ Fixed for impoverished compilers.
+
+2005-04-06 08:35 antirez
+
+ * ChangeLog, jim.c, jim.h: Generic API implementing the Stack data
+ structure exported to extensions.
+
+2005-04-05 19:59 antirez
+
+ * ChangeLog, jim-win32.c: Disabled from jim-win32.c commands that
+ need include <psapi.h> because this is not generally available.
+
+2005-04-05 14:18 antirez
+
+ * ChangeLog, jim.c, test.tcl: [scope] command removed. Will be
+ added later with the [let] name and a bit different semantic.
+
+2005-04-05 14:16 antirez
+
+ * ChangeLog, jim-rlprompt-1.0.tcl: minor rlprompt fix.
+
+2005-04-05 13:51 antirez
+
+ * ChangeLog, Makefile, jim-readline.c, jim-rlprompt-1.0.tcl, jim.c,
+ jim.h, jimsh.c: .jimrc support (or jimrc.tcl). Minimal readline
+ extension, just enough to allow to the pure-Jim rlprompt
+ extension to provide a readline-aware interactive shell with
+ history.
+
+2005-04-04 21:44 antirez
+
+ * ChangeLog, README, jim.c: Fixed a memory leak introduced some day
+ ago. Thanks to 'valgrind'.
+
+2005-04-04 13:59 antirez
+
+ * ChangeLog, jim-stdlib-1.0.tcl: [memoize] is now inside the Jim
+ Standard Library! More info here: http://wiki.tcl.tk/10981 Our
+ version uses a static var to take state instead of a global var,
+ for the rest it is the same.
+
+2005-04-04 10:01 antirez
+
+ * ChangeLog, jim.h: Version marked as "0.51".
+
+2005-04-04 09:58 antirez
+
+ * ChangeLog, Makefile, jim-stdlib-1.0.tcl, jim.c: Some change in
+ the standard library, a bug about [info body/args] fixed. some
+ commented work in progress for exposing the Jim parse at script
+ level. Default compilation set to -Os again.
+
+2005-04-02 23:35 antirez
+
+ * ChangeLog, Makefile, README, TODO, jim-sqlite.c,
+ doc/Sqlite-Extension.txt: Committed the sqlite extension and
+ documentation.
+
+2005-04-02 12:14 antirez
+
+ * ChangeLog, README, doc/AIO-Extension.txt: minor docs update
+
+2005-04-02 12:08 antirez
+
+ * ChangeLog, Makefile, jim-stdlib-1.0.tcl, jim.c: Added a very
+ immature start of a Jim standard library.
+
+2005-04-02 11:09 antirez
+
+ * ChangeLog, Makefile: Changes to Makefile to reflect that now
+ libraries must have the version in the .so/.dll filename.
+
+2005-04-02 10:54 antirez
+
+ * ChangeLog, jim.c: win32 opendir() and related compatibility API.
+
+2005-04-02 09:48 antirez
+
+ * ChangeLog, jim.c: fix for win32
+
+2005-04-02 09:44 antirez
+
+ * ChangeLog, Makefile, TODO, jim.c, jim.h: [package require] +
+ Makefile changes about libraries currently not working...
+
+2005-03-31 14:20 antirez
+
+ * ChangeLog, STYLE, TODO, jim-aio.c, jim-posix.c, jim-sdl.c,
+ jim-win32.c, jim-win32com.c, jim.c, jim.h: Implemented the C API
+ "background" for the packages system of Jim.
+
+2005-03-29 18:50 antirez
+
+ * ChangeLog, jim.c, test.tcl: [info args] added
+
+2005-03-29 16:17 antirez
+
+ * ChangeLog, jim.c: Fixed [range] for the case of unique element
+ possible as output.
+
+2005-03-29 16:03 antirez
+
+ * ChangeLog, jim.c: random number generator fixed. Was a problem
+ with the initialization of the sbox. (see prev CVS commit
+ comment.)
+
+2005-03-29 15:43 antirez
+
+ * ChangeLog, jim.c: First fix for [rand]. More later as there is an
+ evident bias due to some programming error probably.
+
+2005-03-29 15:38 antirez
+
+ * ChangeLog, Makefile, jim.c, jim.h: A number of fix for commands
+ optimizing a bit too much objects not shared, that didn't played
+ very well with Jim arrays. Added the [rand] command.
+
+2005-03-28 19:47 antirez
+
+ * ChangeLog, jim.c, test.tcl: The behaviour of [scope] modified a
+ bit. Test updated accordingly.
+
+2005-03-28 18:57 antirez
+
+ * ChangeLog, jim.c, test.tcl: [scope] command + tests
+
+2005-03-26 15:12 antirez
+
+ * ChangeLog, Makefile, jim-sdl.c, jim.c: some GFX primitive to SDL
+ extension. Minor changes to jim.c
+
+2005-03-25 10:34 antirez
+
+ * ChangeLog, bench.tcl, jim.c: SetReturnCodeFromAny() modified to
+ accept numerical codes.
+
+2005-03-24 14:58 antirez
+
+ * ChangeLog, jim.c, test.tcl: [range] command + tests
+
+2005-03-24 12:00 antirez
+
+ * ChangeLog, Makefile, TODO, jim-sdl.c: A simple SDL extension for
+ Jim.
+
+2005-03-22 15:32 antirez
+
+ * ChangeLog, jim.c: Fix for short circuit in expr.
+
+2005-03-22 13:47 antirez
+
+ * ChangeLog, jim.c: expr's || and && operators are now lazy.
+
+2005-03-21 18:04 chi
+
+ * jim.c, jim.h: Add copyright notice within jim.c & jim.h to
+ acknowledge Jim's license.
+
+2005-03-21 13:39 antirez
+
+ * ChangeLog, jim.c, test.tcl: Modified test.tcl to report the list
+ of failed tests at the end.
+
+2005-03-21 12:59 chi
+
+ * jim.c, jim.h, test.tcl: Add the [scan] command and the
+ Jim_ScanString function + tests.
+
+ 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-19 22:39 antirez
+
+ * ChangeLog, jim.c, test.tcl: Jim_GetIndex() bug fixed (SS)
+
+2005-03-19 20:12 antirez
+
+ * ChangeLog, Makefile, TODO, jim.c, jim.h: [finalize] command and
+ relative C API added (SS).
+
+2005-03-18 12:39 antirez
+
+ * ChangeLog, jim.c: now [setref] returns the value assigned to the
+ reference instead of the reference itself.
+
+2005-03-18 10:36 antirez
+
+ * ChangeLog, Makefile, jim.c: Fixed an EXPR bug.
+
+2005-03-17 22:39 antirez
+
+ * ChangeLog, README, TODO, jim.c: [lreverse]
+
+2005-03-17 15:56 antirez
+
+ * ChangeLog, TODO: TODO file updated, things already done removed.
+
+2005-03-17 15:47 antirez
+
+ * ChangeLog, jim.c: Applied PATCH #389 "debug command is missing
+ NULL terminator in options :)" Thanks to Jaen Saul for report +
+ patch.
+
+2005-03-17 14:06 antirez
+
+ * ChangeLog, jim.c, jim.h: Objects hash function changed.
+
+2005-03-17 08:40 antirez
+
+ * ChangeLog, jim.c, jim.h: [source] command added.
+
+2005-03-17 08:22 antirez
+
+ * ChangeLog, Makefile, TODO, jim.c, jim.h: The interactive prompt
+ can now used to type/paste multi line scripts. Every line is
+ appended to the previous until the script does not appear to be
+ complete (tested by Jim_IsScriptComplete()).
+
+2005-03-16 17:28 antirez
+
+ * ChangeLog, jim-aio.c, jim.c, jim.h: [env] modified to just be
+ able to read a specified var name form the environment, i.e. to
+ be ANSI-C.
+
+ Minor fix to AIO extension to use the new DelProc API.
+
+2005-03-16 17:06 patthoyts
+
+ * jim.c, jim.h: Added interpreter pointer to the command delete
+ proc.
+
+2005-03-16 16:30 antirez
+
+ * ChangeLog, jim.c: Added the [env] command
+
+2005-03-16 14:35 antirez
+
+ * ChangeLog, jim.c: added CVS ID info in the banner.
+
+2005-03-16 14:11 antirez
+
+ * ChangeLog, jim.c: more GC fixes.
+
+2005-03-16 13:55 antirez
+
+ * ChangeLog, jim.c: Fixed a bug introduced in the Gargage
+ Collection code some commit ago.
+
+2005-03-15 22:58 antirez
+
+ * ChangeLog, Makefile: clean target of Makefile now deletes .xo
+ files too.
+
+2005-03-15 15:42 antirez
+
+ * ChangeLog, jim.c, jim.h: A first version of [info complete].
+
+2005-03-15 15:05 antirez
+
+ * BUGS, ChangeLog, jim.c, test.tcl: [info level ?level?] fixed.
+ Tests uncommented.
+
+2005-03-15 11:31 antirez
+
+ * AUTHORS, ChangeLog: More credits in the AUTHORS file
+
+2005-03-14 17:36 patthoyts
+
+ * jim-win32.c: Added a bunch of cursor handling apis
+
+2005-03-14 17:35 patthoyts
+
+ * jim.c: const police
+
+2005-03-14 15:39 antirez
+
+ * ChangeLog, jim.c, jim.h: 'iterator' argument modified to 'iter'
+ for C++ STL safety.
+
+2005-03-14 14:11 antirez
+
+ * ChangeLog, jim.c, jim.h: more fixes to allow inclusion of jim.h
+ into C++ programs.
+
+2005-03-14 13:20 antirez
+
+ * ChangeLog, jim.h: Some change to make jim.h more C++ friendly,
+ still not working with g++ btw.
+
+2005-03-14 10:16 antirez
+
+ * ChangeLog, TODO, jim.c: Removed the inclusion of a not-needed
+ header file "sys/time.h" that prevented compilation with
+ JIM_ANSIC under non POSIX systems.
+
+2005-03-14 08:22 antirez
+
+ * ChangeLog, TODO, jim.c: [lmap] command.
+
+2005-03-13 18:43 antirez
+
+ * ChangeLog, jim.h: Max nesting depth modified to 10000
+
+2005-03-13 16:53 antirez
+
+ * ChangeLog, jim.c: [string first]. Tests still not added, until
+ [string] is not (almost instead) complete.
+
+2005-03-13 09:36 antirez
+
+ * ChangeLog, jim.c: [string index] implemented
+
+2005-03-12 22:42 antirez
+
+ * ChangeLog, jim.c: Jim_GetEnum() will now sort the options in the
+ error message (ss)
+
+2005-03-12 21:26 antirez
+
+ * ChangeLog, jim.c, jim.h: Added the ability to compile with
+ -DJIM_ANSIC to use only ANSI-C features and libraries.
+
+2005-03-12 10:18 antirez
+
+ * ChangeLog, jim.c, jim.h: Added the Jim_FreeNewObj() macro to free
+ objects with refcount == 0 instead to call Jim_IncrRefCount +
+ Jim_DecrRefCount(), or directly Jim_FreeObj(). Code modified
+ accordingly where needed. Make test + valgrind test passed after
+ the change.
+
+2005-03-12 09:52 antirez
+
+ * ChangeLog, README, jim.c: It's now possible to exclude
+ compilation of dynamic loaded libraries commenting the JIM_DYNLIB
+ define from the first lines of jim.c.
+
+2005-03-12 07:43 antirez
+
+ * ChangeLog, jim.c: Modified Jim_Free() to be more strict, now it
+ panics if the refcount of the object is not exactly 0. Now new
+ objects that are not used may be freed using Jim_Free instead to
+ use Jim_IncrRefCount() + Jim_DecrRefCount() calls.
+
+2005-03-11 23:00 antirez
+
+ * ChangeLog, jim.c: Converted some free() call to Jim_Free().
+ Actually Jim_Free is a macro that just expands to free for now,
+ but in the future Jim may include a specialized allocator for
+ better performances.
+
+2005-03-11 10:37 antirez
+
+ * ChangeLog, jim.c: [lambda] modified to be 'statics' capable.
+
+2005-03-11 10:33 antirez
+
+ * ChangeLog, Makefile: default Makefile optimization level set to
+ -O2 again. I committed a Makefile with -Os for an error. (me)
+
+2005-03-11 10:31 antirez
+
+ * ChangeLog, jim.c, test.tcl: Fix about [rename] against procedures
+ with statics. Added a regression test to test.tcl (I plan to
+ move everything inside regtest.tcl into test.tcl).
+
+2005-03-11 10:25 antirez
+
+ * ChangeLog, jim.c: more static fixes (me)
+
+2005-03-11 09:43 antirez
+
+ * jim.c: tons of static var fixes...
+
+2005-03-11 08:21 antirez
+
+ * ChangeLog, jim.c, jim.h: static variables support
+
+2005-03-10 16:58 antirez
+
+ * ChangeLog, jim.c, jim.h, test.tcl: lrange command (me)
+
+2005-03-10 11:03 antirez
+
+ * Makefile, README, bench.tcl, jim.c, tools/benchtable.tcl: Some
+ fix to bench.tcl to make it able to run in Tcl7.6. README
+ update.
+
+2005-03-09 14:42 patthoyts
+
+ * Makefile.vc: Add profile option
+
+2005-03-09 13:00 patthoyts
+
+ * bench.tcl: Improved formatting for normal output
+
+2005-03-09 12:57 patthoyts
+
+ * tools/benchtable.tcl: New file to tabulate accumulated benchmark
+ data from bench.tcl -batch
+
+2005-03-09 12:06 antirez
+
+ * ChangeLog, jim.c, jim.h, test.tcl: [linsert] command added
+ (Clemens Hintze). Jim_GetIndex() semantic changed to make
+ [lindex] more compatible with Tcl's one, without effects on other
+ commnads (me).
+
+2005-03-09 09:52 antirez
+
+ * ChangeLog, bench.tcl: New test added to the benchmark
+
+2005-03-09 08:19 antirez
+
+ * ChangeLog, TODO, bench.tcl, jim.c: An initial [format] command.
+
+2005-03-08 18:06 antirez
+
+ * ChangeLog, jim.c, jim.h, jimsh.c: Did some fix in jimsh.c,
+ exported some more API function to set variables and global
+ variables using a string C as name instead of a Jim_Obj. This is
+ more handy in mani conditions.
+
+2005-03-08 16:10 patthoyts
+
+ * bench.tcl, jim.c, jim.h: JIM_VERSION is to be an integer value
+ which we present as MAJOR.MINOR to users. MAJOR is JIM_VERSION /
+ 100
+
+2005-03-08 14:45 patthoyts
+
+ * bench.tcl, jim.c, jim.h, jimsh.c: Added [info patchlevel] and
+ setup argv0 and argv variables in jimsh. Changed
+ Jim_InteractivePrompt to take a pre-initialized interpreter.
+
+2005-03-08 12:32 antirez
+
+ * ChangeLog, jim.c: aesthetic changes to source code (SS)
+
+2005-03-08 12:01 antirez
+
+ * ChangeLog, jim.c: Removed an useless #if0 ... #endif block of
+ code.
+
+2005-03-08 10:50 antirez
+
+ * ChangeLog, jim.c, test.tcl: Info exists + tests (Clemens Hintze).
+
+2005-03-08 10:42 antirez
+
+ * ChangeLog, jim.c, regtest.tcl: Applied patch about unset a(x)
+ against non existing 'a' variable (Clemens Hintze). Dictionary
+ handling code and error messages modified a bit (me).
+
+2005-03-07 21:53 antirez
+
+ * ChangeLog, jim.c: Fixed a memory leak introduced with the last
+ callframe caching code commit.
+
+2005-03-07 21:34 antirez
+
+ * ChangeLog, jim.c, jim.h: Faster procedure calls (obtained caching
+ the hashtable, and with a fast path to free the cached hash
+ tables elements).
+
+2005-03-07 18:58 antirez
+
+ * ChangeLog, jim.c: Added "increasing", "decreasing", "ascii",
+ "nocase" options to lsort (SS). The plan is to don't add more
+ options than this, but -command, and put "dictionary style"
+ comparison in [string dictcompare].
+
+2005-03-07 17:03 antirez
+
+ * ChangeLog, Makefile, bench.tcl, jim.c: [lsort] command and list
+ sorting low-level functions (Pat Thoyts). Speedup for floating
+ point math (me).
+
+2005-03-07 16:30 patthoyts
+
+ * jim.c, jim.h: Refactored the [info] command and added body and
+ version to the command. Added a simple version of [lsort] (no
+ options yet).
+
+2005-03-07 15:17 antirez
+
+ * ChangeLog, jim.c: specializing version of while (still not
+ complete, but already handles most of the cases that it's worth
+ to optimize).
+
+2005-03-07 09:23 antirez
+
+ * ChangeLog, TODO: TODO changes
+
+2005-03-06 23:42 antirez
+
+ * bench.tcl, jim.c, regtest.tcl, test.tcl: A specializing version
+ of [for] that appears able to match the performaces of Tcl8.4 for
+ the specialized forms. The implementation is a bit complex so may
+ contain bugs... to handle with care. Also a [for] bug about
+ [continue] was fixed and the regression test added.
+
+2005-03-06 11:43 antirez
+
+ * ChangeLog, jim.c, jim.h, doc/AIO-Extension.txt: Fixed a race
+ condition in the garbage collection code. In order to fix this,
+ now the hash table iterator works in a way that's save to delete
+ returned entries during the iteration.
+
+2005-03-06 10:05 antirez
+
+ * ChangeLog, doc/AIO-Extension.txt: AIO doc update
+
+2005-03-06 10:03 antirez
+
+ * ChangeLog, doc/AIO-Extension.txt: Documentation for the AIO
+ extension added
+
+2005-03-06 09:48 antirez
+
+ * ChangeLog, jim-aio.c: Added support for stdin/stdout/stderr to
+ AIO
+
+2005-03-06 09:31 antirez
+
+ * ChangeLog, Makefile, TODO, jim-aio.c, jim.c, jim.h: Added
+ Jim_GetEnum() API function. StringCoreCommand and AIO extension
+ modified to use this API. There are plenty of other places where
+ this will work better than the raw CompareStringImmediate().
+ Original idea from Tcl, Original implementation from Pat Thoyts,
+ I changed the implementationto use CSI and for automatic error
+ generation with all the valid options listed.
+
+2005-03-05 23:06 patthoyts
+
+ * jim.c: Free an objects internal representation before freeing the
+ string rep.
+
+2005-03-05 22:11 antirez
+
+ * ChangeLog, jim-aio.c: more AIO file methods.
+
+2005-03-05 19:51 antirez
+
+ * ChangeLog, jim-aio.c: ANSI I/O seek method implemented.
+
+2005-03-05 16:04 antirez
+
+ * ChangeLog, jim.c, jim.h: Solved a problem with Jim_Length()
+
+2005-03-05 16:01 antirez
+
+ * ChangeLog, Makefile, jim-aio.c, jim.c, jim.h: Initial version of
+ AIO (ANSI C I/O) extension added. Some bit of const safeness. A
+ new API function to get the object length, Jim_Length().
+
+2005-03-05 13:22 antirez
+
+ * ChangeLog, jim-posix.c, jim-win32.c, jim-win32com.c, jim.c,
+ jim.h: delProc callback added to Jim_CreateCommand(). Core
+ commands handling updated to respect the new sematic.
+
+2005-03-05 13:13 antirez
+
+ * ChangeLog, jim-posix.c: extern int errno declaration removed from
+ the posix extension.
+
+2005-03-05 11:45 patthoyts
+
+ * jim.c, jim.h: Added Jim_GetAssocData api. This for permitting
+ packages to register a data structure with a Jim interpreter.
+
+2005-03-05 10:46 antirez
+
+ * ChangeLog, jim.c, jim.h: removed strcasecmp() and isascii(). Now
+ the Jim core is fully ANSI-C excluding the [load] command. I plan
+ to add a JIM_FORCE_ANSIC ifdef to exclude the load command for
+ compilation.
+
+2005-03-05 10:34 antirez
+
+ * AUTHORS, ChangeLog, README, jim.c, jim.h, test.tcl: [switch]
+ command contributed by Clemens Hintze, modified to avoid problems
+ with -command and shimmering of the objects passed as [switch]
+ arguments.
+
+2005-03-05 00:59 patthoyts
+
+ * Makefile.vc, jim-win32com.c, jim.c: Added ole32.foreach command,
+ changed creation to ole32.create. Added support for dealing with
+ returned ole32 obejcts. Couple of const fixes in jim core.
+
+2005-03-04 23:44 antirez
+
+ * jim.c: Removed two unused parts of code resulting in warnings
+ compiling under 64bit systems.
+
+2005-03-04 23:04 antirez
+
+ * ChangeLog, jim.c: Fix for [info local], at top level an empty
+ list is now returned.
+
+2005-03-04 22:59 antirez
+
+ * jim.c: binary safe parsers for scripts,lists,expr,subst.
+
+2005-03-04 21:12 antirez
+
+ * jim.c: Fixed a bug in Jim_Collect() thanks to Colin McPhail that
+ reported it.
+
+2005-03-04 16:37 antirez
+
+ * jim-posix.c, jim-win32.c, jim-win32com.c, jim.c: JIM_NOTUSED
+ moved after var declarations blocks.
+
+2005-03-04 16:33 antirez
+
+ * jim.c: [info locals/vars/globals]
+
+2005-03-04 15:09 antirez
+
+ * BUGS, ChangeLog, jim.c, jim.h, test.tcl: jim::libpath renamed
+ into jim.libpath. Also there was a bug listed in the BUG file
+ about jim.libpath lookup performed using the local variable API
+ that's now fixed. In order to fix the problem the new API call
+ Jim_GetGlobalVariableStr() was added. Jim_GetVariableStr() and
+ Jim_GetGlobalVariableStr() are now exported.
+
+2005-03-04 13:32 antirez
+
+ * ChangeLog, jim-posix.c, jim-win32.c, jim-win32com.c, jim.c,
+ jim.h, test.tcl: $id: ..$ strings added
+
+2005-03-04 13:15 antirez
+
+ * ChangeLog, Makefile: Added a 'commit' makefile target to generate
+ ChangeLog + cvs commit.
+
+2005-03-04 13:12 antirez
+
+ * ChangeLog: ChangeLog file added, generated using cvs2cl
+
+2005-03-04 12:54 antirez
+
+ * jim-posix.c, jim-win32.c, jim-win32com.c, jim.c, jim.h: Added
+ JIM_NOTUSED macro. Macro used where appropriate.
+
+2005-03-04 11:47 antirez
+
+ * README, bench.tcl, jim.c, test.tcl: Small README change to
+ reflect LIBS Makefile var.
+
+2005-03-04 11:06 patthoyts
+
+ * Makefile, jim-win32com.c, jim.c, jim.h: Use command line vars in
+ the Makefile. Make const quiet with gcc -Wwrite-strings Fixed
+ macro usage in COM extension that gcc doesn't like.
+
+2005-03-04 10:45 antirez
+
+ * jim.c, test.tcl: [split] command added + tests.
+
+2005-03-04 09:30 antirez
+
+ * README, doc/Embedder-HOWTO.txt: Embedder-HOWTO added
+
+2005-03-04 09:03 antirez
+
+ * AUTHORS, README, TODO, bench.tcl, jim.h: more benchmarks. Initial
+ size of hashtables modified. Some documentation change.
+
+2005-03-03 23:10 antirez
+
+ * jim.c, test.tcl: [string map ?-nocase? ...] implemented. tests
+ added.
+
+2005-03-03 17:41 antirez
+
+ * jim.c, jim.h: Missing functions exported
+
+2005-03-03 17:33 antirez
+
+ * jim.c, jim.h: RegisterCoreCommands now exported (broken in the
+ last commit)
+
+2005-03-03 17:24 patthoyts
+
+ * jim-win32com.c: Added preliminary support for using typelibrary
+ information
+
+2005-03-03 16:43 antirez
+
+ * jim.c: interactive prompt output binary safe (using fwrite
+ instead of printf).
+
+2005-03-03 16:36 antirez
+
+ * jim.c: [string repeat] implemented.
+
+2005-03-03 16:30 antirez
+
+ * Makefile, jim.c, jim.h: Made exporting of symbols to the API less
+ error prone with JIM_REGISTER_API and JIM_GET_API macros.
+
+2005-03-03 15:41 antirez
+
+ * Makefile, jim.h: improtant fix! jim error message visualization
+ was broken because Jim_PrintErrorMessage() was not exported using
+ the right funciton pointer.
+
+2005-03-03 14:13 antirez
+
+ * Makefile: Makefile dependences updated
+
+2005-03-03 14:10 antirez
+
+ * jim.c, jim.h: changes to the reference system. Now references
+ string rep includes a 'tag' that makes interactive usage and
+ debugging simpler.
+
+2005-03-03 12:01 antirez
+
+ * jim-posix.c, jim.h: Fixed a minor typo introduced with
+ const-safeness patch.
+
+2005-03-03 11:34 antirez
+
+ * jim.c, jim.h: const removed from Jim_GetString().
+
+2005-03-03 04:29 patthoyts
+
+ * jim-win32.c, jim-win32com.c, jim.c, jim.h: Applied patches 363
+ and 366 for const correctness to the win32 modules and jim.[ch]
+
+2005-03-03 04:11 patthoyts
+
+ * jim-win32com.c: Fixed my evil unicode type problem. Didn't do a
+ good job with zero length unicode strings.
+
+2005-03-03 02:48 patthoyts
+
+ * jim-win32com.c, jim.c, jim.h: Exported the double object type to
+ the API. Paranoid cleanup of unicode object type internal
+ representation.
+
+2005-03-02 23:50 antirez
+
+ * Makefile, README: more verbose README, a Makefile fix for mingw.
+
+2005-03-02 23:37 patthoyts
+
+ * README: Fixed some typos.
+
+2005-03-02 23:34 patthoyts
+
+ * Makefile.vc, jim-win32com.c, jim.c, jim.h: Moved the internal rep
+ accessor macros and Jim_FreeIntRep into the header as they are
+ useful to people writing new object types. Enabled calling COM
+ methods, some object type bugs cleaned.
+
+2005-03-02 23:29 antirez
+
+ * README, TODO, bench.tcl, jim.c: one more benchmark
+
+2005-03-02 20:29 antirez
+
+ * jimsh.c: jimsh added
+
+2005-03-02 20:27 antirez
+
+ * Makefile, jim-posix.c, jim-win32.c, jim-win32com.c, jim.c, jim.h:
+ shell and library splitted. Now jim.c contains only the language
+ implementation, while the shell is into jimsh.c, that is actually
+ the first example of embedder of Jim.
+
+ Important changes in jim.h to make Jim play well with
+ extensions/embedders at the same time, and to deal with multiple
+ files.
+
+ Extensions now must define JIM_EXTENSION before to include jim.h,
+ embedders must define JIM_EMBEDDED before to include jim.h.
+
+2005-03-02 18:05 antirez
+
+ * jim-posix.c, jim-win32.c, jim-win32com.c: removed JIM_EXTENSION
+ define from extensions. Is no longer useful because only the core
+ has to defile __JIM_CORE__.
+
+ Added ctype.h in jim-win32com.c.
+
+2005-03-02 17:40 patthoyts
+
+ * Makefile.vc, jim-win32com.c, jim.h: Can now create and relese
+ objects and use ole32.invoke to call propert get on them. See
+ the sample at the top of the file. NB: ONLY propget so far.
+
+2005-03-02 17:02 antirez
+
+ * jim.c: binary safe JimStringCompare and thus [string compare].
+ Now [string compare] supports -nocase.
+
+2005-03-02 16:41 antirez
+
+ * jim.c, test.tcl: binary safe JimStringMatch()
+
+2005-03-02 15:20 antirez
+
+ * jim-win32.c: win32 compilation under mingw fixed,
+ GetPerformanceInfo() is not available under mingw.
+
+2005-03-02 15:03 antirez
+
+ * jim.c: fix for [ Bug #3513 ] Jim crashed after dict sugar
+ substitution in string
+
+2005-03-02 14:31 antirez
+
+ * jim.c, jim.h: JIM_LL_MODIFIER is now called JIM_WIDE_MODIFIER so
+ that's set simply to "ld" if the system isn't 64bit capable. This
+ allows to remove few ifdefs from jim.c.
+
+2005-03-02 13:36 antirez
+
+ * STYLE, bench.tcl, jim.c: non local literal sharing disabled.
+ bench.tcl modified to be more verbose.
+
+2005-03-02 13:07 patthoyts
+
+ * bench.tcl, jim.c: Improved the [time] resolution on windows.
+
+2005-03-02 11:54 patthoyts
+
+ * jim-win32.c: Codified structure rep
+
+2005-03-02 11:46 patthoyts
+
+ * jim-win32.c: Whitespace police and added new APIs.
+ GetPerformaceInfo, LoadLibary, GetModuleFileName, GetModuleHandle
+ and FreeLibrary.
+
+2005-03-02 08:18 patthoyts
+
+ * jim-win32com.c: Slowly progressing.
+
+2005-03-02 00:49 antirez
+
+ * STYLE, jim.c, jim.h: A lot of changes to functions names of
+ jim.c/h to reflect the STYLE file rules. More functions exported
+ to the visible API.
+
+2005-03-02 00:16 antirez
+
+ * STYLE: style bugs into the style document ;)
+
+2005-03-02 00:04 antirez
+
+ * STYLE: Style guidelines
+
+2005-03-01 23:54 antirez
+
+ * jim-posix.c, jim.c, jim.h: Indentation style changed to the new
+ Jim standard 4 spaces. No tabs used at all.
+
+2005-03-01 23:07 antirez
+
+ * jim.c, test.tcl: removed a C99-ism
+
+2005-03-01 22:57 antirez
+
+ * jim.c, test.tcl: many string match tests added.
+
+2005-03-01 22:38 antirez
+
+ * TODO, jim.c: Fix to Jim_StringMatch. Still not embedded nuls
+ safe.
+
+2005-03-01 16:55 antirez
+
+ * jim.c: Clemens's patch for foreach speed/memusage.
+
+2005-03-01 16:48 patthoyts
+
+ * Makefile, Makefile.vc, jim-win32com.c, jim.h: Added fledgling COM
+ support for Win32. Unicode object and a Ole32 object types for
+ managing ascii-unicode and IDispatch references.
+
+2005-03-01 16:22 antirez
+
+ * jim.c, jim.h: Change in design of the Jim STUBS system. Should
+ avoid problems on Solaris, and apperas to be generally more sane
+ about exported symbols restriction.
+
+2005-02-28 20:29 antirez
+
+ * jim.c, test.tcl: Foreach command! Thanks to Clemens. Also a
+ patch about empty string and StringAppendString causing memory
+ corruption, and a patch about Jim_WrongNumArgs that I modified
+ because caused other tests to fail.
+
+2005-02-28 17:27 patthoyts
+
+ * jim-win32.c: A few more APIs and a macro for declaring them.
+
+2005-02-28 16:10 patthoyts
+
+ * jim-win32.c: Added some more API functions, Beep,
+ GetComputerName, SetComputerName, GetUserName, GetVersion,
+ GetTickCount, GetSystemTime.
+
+2005-02-28 13:31 antirez
+
+ * jim-win32.c: jim-win32 changes to fix the last commit.
+
+2005-02-28 13:29 antirez
+
+ * jim-win32.c: win32.CloseWindow added, ctype.h included in
+ jim-win32.c
+
+2005-02-28 02:12 patthoyts
+
+ * Makefile.vc, jim-win32.c: Fixed line endings and added findwindow
+
+2005-02-28 01:44 antirez
+
+ * jim.c: literal sharing re-enabled after the Jim_DuplicateObj()
+ fix.
+
+2005-02-28 01:43 antirez
+
+ * jim.c: Fixed a bug in Jim_DuplicateObj()
+
+2005-02-28 01:20 antirez
+
+ * jim.c, jim.h: Jim_Alloc/Free now really exported. Literal
+ sharing enabled in a more aggressive form. New object for
+ var/index substution.
+
+2005-02-27 23:57 antirez
+
+ * jim.c, jim.h: Jim_Alloc/Free exported to extensions.
+
+2005-02-27 23:35 antirez
+
+ * TODO, jim.c, jim.h: const added to Jim_NewStringObj
+
+2005-02-27 22:51 antirez
+
+ * Makefile: make clean now deletes *.dll too
+
+2005-02-27 22:49 antirez
+
+ * Makefile, README: documentation changes, makefile modified to
+ build jim-win32.dll
+
+2005-02-27 22:17 antirez
+
+ * jim.c: other minor chage about 64bit printf modifer
+
+2005-02-27 22:04 antirez
+
+ * jim.h: mingw compilation fixes
+
+2005-02-27 21:30 antirez
+
+ * jim.c: warning about win32 dlopen wrapper suppressed with
+ no-operation code.
+
+2005-02-27 18:06 antirez
+
+ * AUTHORS, BUGS, README, jim-posix.c, jim-win32.c, jim.c, jim.h:
+ aritymin/aritymax information no longer used for C-coded
+ commands. API changed accordingly.
+
+2005-02-27 17:39 antirez
+
+ * jim-win32.c: win32 test extensiona added (thanks to Pat Thoyts)
+
+2005-02-27 17:05 antirez
+
+ * jim.c, test.tcl: more tests and a fix for [lindex $a $a $a]
+ sharing hell.
+
+2005-02-27 15:23 antirez
+
+ * jim.c, test.tcl: more tests
+
+2005-02-27 15:04 antirez
+
+ * Makefile.vc, bench.tcl, jim.c, jim.h: Pat's patch for [load] on
+ win32! Pat's match for nan/inf modified a bit.
+
+2005-02-27 14:07 antirez
+
+ * jim.c, jim.h, test.tcl: More test and fixes to pass this tests,
+ mainly about upvar.
+
+2005-02-27 12:28 antirez
+
+ * TODO, jim.c, test.tcl: Now there is implicit subst in expr's
+ strings like expr {"foo $i" eq $bar}. More tests. A fix in the
+ parsing code for line number calculation.
+
+2005-02-27 11:26 antirez
+
+ * BUGS, Makefile, jim.c: Fixed a bug in the parsing of
+ <backslash><newline>. Now it's rendered as a single space.
+
+2005-02-27 10:57 antirez
+
+ * jim.c, jim.h: Clemens patch for macros sanity applied.
+
+2005-02-27 00:39 antirez
+
+ * jim.c: ifcorecommand indented using Jim's source style.
+
+2005-02-27 00:36 antirez
+
+ * jim.c: Pat <<< and >>> operators but converted to 32bit rotation.
+
+2005-02-27 00:04 antirez
+
+ * Makefile.vc: Makefile.vc with unix line endings
+
+2005-02-27 00:03 antirez
+
+ * Makefile.vc: removed to add it again without DOS line endings
+
+2005-02-26 23:43 antirez
+
+ * README, jim.c, jim.h: Pat's patch about callframe id type,
+ strtoll casting and errno applied.
+
+2005-02-26 23:15 antirez
+
+ * jim.c, test.tcl: Clemem's patch fixing expressions containing
+ newlines parsing.
+
+2005-02-26 21:14 antirez
+
+ * AUTHORS, BUGS, LICENSE, Makefile, Makefile.vc, README, TODO,
+ bench.tcl, jim-posix.c, jim.c, jim.h, regtest.tcl, test.tcl:
+ Initial import
+
+2005-02-26 21:14 antirez
+
+ * AUTHORS, BUGS, LICENSE, Makefile, Makefile.vc, README, TODO,
+ bench.tcl, jim-posix.c, jim.c, jim.h, regtest.tcl, test.tcl:
+ Initial revision
+
40 LICENSE
@@ -0,0 +1,40 @@
+/* Jim - A small embeddable Tcl interpreter
+ *
+ * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
+ * Copyright 2005 Clemens Hintze <c.hintze@gmx.net>
+ * Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
+ * Copyright 2008 oharboe - �yvind Harboe - oyvind.harboe@zylin.com
+ * Copyright 2008 Andrew Lunn <andrew@lunn.ch>
+ * Copyright 2008 Duane Ellis <openocd@duaneellis.com>
+ * Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de>
+ *
+ * The FreeBSD license
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * JIM TCL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * official policies, either expressed or implied, of the Jim Tcl Project.
+ **/
168 Makefile
@@ -0,0 +1,168 @@
+# Jim makefile
+#
+# This is a simple Makefile as it is expected that most users are likely
+# to embed Jim directly into their current build system. Jim is able to
+# make use of dynamically loaded extensions on unix provided you have the
+# dl library available. If not, set JIM_LIBS= on the make command line.
+#
+# make CC=gcc jim builds a standard Jim binary using gcc.
+# make CC=gcc LIBS= jim avoids attempts to link in libdl.a
+#
+#
+
+.SUFFIXES:
+.SUFFIXES: .c .so .xo .o .dll
+.PHONY: jim-aio-1.0.so
+
+SHELL = /bin/sh
+RM = rm -f
+OPT = -Os
+LDFLAGS = $(PROFILE)
+CFLAGS = -Wall -Wwrite-strings -W $(OPT) -g $(PROFILE)
+AR = /usr/bin/ar
+RANLIB = /usr/bin/ranlib
+LIBPATH =-L.
+INSTALL = /usr/bin/install
+INSTALL_PROGRAM= $(INSTALL)
+INSTALL_DATA= $(INSTALL) -m 644
+DESTDIR = /usr/local/bin/
+
+PROGRAMS = jim jim.exe
+JIM_OBJECTS = jim.o jimsh.o
+LIBS = -ldl
+
+stopit:
+ @echo "Use:"
+ @echo "make jim - to build the Jim interpreter"
+ @echo "---"
+ @echo "make eventloop - to build only the event loop extension (.SO)"
+ @echo "make aio - to build only the ANSI I/O extension (.SO)"
+ @echo "make aio-dll - to build only the ANSI I/O extension (.DLL)"
+ @echo "---"
+ @echo "make unix-ext - to build the AIO, POSIX and SDL extensions"
+ @echo "make posix - to build only the POSIX extension"
+ @echo "make hwio - to build only Hardware IO extension"
+ @echo "make sdl - to build only the SDL extension"
+ @echo "make readline - to build only the READLINE extension"
+ @echo "---"
+ @echo "make win32-ext - to build the WIN32 and WIN32COM extensions"
+ @echo "make win32 - to build only the WIN32 extension"
+ @echo "make win32com - to build only the WIN32COM extension"
+ @echo ""
+ @echo "Note, if 'make jim' does not work try 'make jim LIBS=\"\"'"
+ @echo ""
+ @echo "For default Jim is compiled with -Os, if you need more"
+ @echo "speed try: 'make OPT=\"-O3 -fomit-frame-pointer\"' but"
+ @echo "this will result in a much larger binary."
+
+all: $(DEFAULT_BUILD)
+
+profile:
+ @$(MAKE) clean jim PROFILE=-pg
+
+.c.o:
+ $(CC) -I. $(CFLAGS) $(DEFS) -c $< -o $@
+
+.c.xo:
+ $(CC) -I. $(CFLAGS) $(DEFS) -fPIC -c $< -o $@
+
+jim-win32-1.0.dll: im-win32.o
+ $(CC) -shared -o $@ $<
+
+jim-aio-1.0.dll: jim-aio.o
+ $(CC) -shared -o $@ $<
+
+jim-win32com-1.0.dll: jim-win32com.o
+ $(CC) -shared -o $@ $< -lole32 -luuid -loleaut32
+
+jim-aio-1.0.so: jim-aio.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc
+
+jim-posix-1.0.so: jim-posix.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc
+
+jim-hwio-1.0.so: jim-hwio.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc
+
+jim-eventloop-1.0.so: jim-eventloop.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc
+
+jim-udp-1.0.so: jim-udp.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc
+
+jim-sqlite-1.0.so: jim-sqlite.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc -lsqlite
+
+jim-readline-1.0.so: jim-readline.xo
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc -lreadline
+
+jim-sdl.xo: jim-sdl.c
+ $(CC) `sdl-config --cflags` -I. $(CFLAGS) $(DEFS) -fPIC -c $< -o $@
+
+jim-sdl-1.0.so: jim-sdl.xo
+ rm -f $@
+ $(LD) -G -z text -o $@ $< $(LIBS) -lc -L/usr/local/lib -lSDL -lSDL_gfx -lpthread
+
+jim: $(JIM_OBJECTS)
+ $(CC) $(LDFLAGS) -o jim $(JIM_OBJECTS) $(LIBS)
+
+readline: jim-readline-1.0.so
+posix: jim-posix-1.0.so
+hwio: jim-hwio-1.0.so
+eventloop: jim-eventloop-1.0.so
+udp: jim-udp-1.0.so
+sqlite: jim-sqlite-1.0.so
+aio: jim-aio-1.0.so
+aio-dll: jim-aio-1.0.dll
+sdl: jim-sdl-1.0.so
+win32: jim-win32-1.0.dll
+win32com: jim-win32com-1.0.dll
+unix-extensions: posix aio sdl hwio
+win32-extensions: win32 win32com
+
+clean:
+ $(RM) *.o *.so *.dll *.xo core .depend .*.swp gmon.out $(PROGRAMS)
+
+test: jim
+ ./jim test.tcl
+ ./jim regtest.tcl
+
+bench: jim
+ ./jim bench.tcl
+
+dep:
+ gcc -MM *.[ch] 2> /dev/null
+
+TAGS: jim.h jim.c jim-posix.c jim-hwio.c jim-win32.c jim-win32com.c
+ etags -o $@ $^
+
+wc:
+ wc -l jim.[ch]
+ wc -l *.[ch]
+
+clog:
+ cvs2cl
+
+commit:
+ cvs2cl
+ cvs commit
+
+update:
+ cvs update
+ cvs2cl
+
+bak:
+ cp -f jim.c jim.c.orig
+ cp -f jimsh.c jimsh.c.orig
+ cp -f jim.h jim.h.orig
+
+# Dependences
+jim-aio.o: jim-aio.c jim.h
+jim-posix.o: jim-posix.c jim.h
+jim-hwio.o: jim-hwio.c jim-hwio.inoutblock.h jim.h
+jim-sdl.o: jim-sdl.c jim.h
+jim-win32com.o: jim-win32com.c jim.h
+jim.o: jim.c jim.h
+jimsh.o: jimsh.c jim.h
+
+
181 Makefile.vc
@@ -0,0 +1,181 @@
+# -*- Makefile -*-
+#
+# This is a Microsoft Visual C NMAKE makefile to use in building the
+# Jim interpreter.
+#
+# Usage:
+# nmake -f Makefile.vc clean all
+#
+# To build a debug build, add DEBUG=1 to the command line. To build
+# for profiling, add PROFILE=1. eg:
+# nmake -f Makefile.vc DEBUG=1 clean all
+#
+#
+# Copyright (C) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
+#
+
+SRCDIR =.
+
+!ifndef DEBUG
+DEBUG =0
+!endif
+!ifndef PROFILE
+PROFILE =0
+!endif
+!ifndef SYMBOLS
+SYMBOLS = 0
+!endif
+!ifndef CC
+CC=cl
+!endif
+!ifndef LINK
+LINK=link
+!endif
+
+# If you have sqlite3 installed and want to build the extension add
+# SQLITE3DIR=c:\path\to\sqlite3
+#
+!ifndef SQLITE3DIR
+SQLITE3 =0
+!else
+SQLITE3 =1
+SQLITE_INC=-I$(SQLITE3DIR)
+SQLITE_LIB=-libpath:$(SQLITE3DIR) libsqlite3.lib
+!endif
+
+#-------------------------------------------------------------------------
+# There should be no need to edit below this point.
+#-------------------------------------------------------------------------
+
+!if $(DEBUG)
+OUTDIR =Debug
+CFLAGS =-Od -Zi -GZ -MDd -D_DEBUG
+LDFLAGS=-debug:full -debugtype:cv
+!else
+OUTDIR =Release
+!if $(SYMBOLS)
+CFLAGS =-Od -Zi -Op -Gs -MD -DNDEBUG
+LDFLAGS=-debug -opt:ref -opt:icf,3
+!else
+CFLAGS =-O2 -Otip -Gs -MD -DNDEBUG
+LDFLAGS=-release -opt:ref -opt:icf,3
+!endif
+!endif
+
+!if $(PROFILE)
+CFLAGS =$(CFLAGS) -Zi
+LDFLAGS=$(LDFLAGS) -profile -map
+!endif
+
+!if "$(OS)" == "Windows_NT"
+RMDIR = rmdir /s /q >NUL
+!else
+RMDIR = deltree /y
+!endif
+DEL = del /f /q
+
+TMPDIR =$(OUTDIR)\Objects
+
+CC =$(CC) -nologo
+LD =$(LINK) -nologo
+
+CFLAGS =$(CFLAGS) -W3 -YX -Fp$(TMPDIR)^\
+INC =
+DEFS =-DWIN32
+LIBS =
+
+all: jim aio win32 win32com win32api dll #sqlite3 eventloop
+jim: setup $(OUTDIR)\jim.exe
+jimwish: setup $(OUTDIR)\jimwish.exe
+dll: setup $(OUTDIR)\jim.dll
+aio: setup $(OUTDIR)\jim-aio-1.0.dll
+sqlite3: setup $(OUTDIR)\jim-sqlite3-1.0.dll
+eventloop: setup $(OUTDIR)\jim-eventloop-1.0.dll
+win32: setup $(OUTDIR)\jim-win32-1.0.dll
+win32api: setup $(OUTDIR)\jim-win32api-1.0.dll
+win32com: setup $(OUTDIR)\jim-win32com-1.0.dll
+
+$(OUTDIR)\jim.exe: $(TMPDIR)\jim.obj $(TMPDIR)\jimsh.obj
+ @$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)
+
+$(OUTDIR)\jim.dll: $(TMPDIR)\jim.dll.obj
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS)
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+
+$(OUTDIR)\jim-win32-1.0.dll: $(TMPDIR)\jim-win32.obj
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS) >NUL
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+
+$(OUTDIR)\jim-win32api-1.0.dll: $(TMPDIR)\jim-win32api.obj
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS) >NUL
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+
+$(OUTDIR)\jim-win32com-1.0.dll: $(TMPDIR)\jim-win32com.obj
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS) >NUL
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+
+$(OUTDIR)\jim-aio-1.0.dll: $(TMPDIR)\jim-aio.obj
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS) >NUL
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+
+$(OUTDIR)\jim-eventloop-1.0.dll: $(TMPDIR)\jim-eventloop.obj
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS) >NUL
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+
+$(OUTDIR)\jim-sqlite3-1.0.dll: $(TMPDIR)\jim-sqlite3.obj
+!if $(SQLITE3)
+ @$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS) $(SQLITE_LIB) >NUL
+ @if exist $(@:.dll=.exp) $(DEL) $(@:.dll=.exp)
+!else
+ @echo cannot build sqlite3 extension - SQLITE3DIR not defined
+!endif
+
+$(OUTDIR)\jimwish.exe: $(TMPDIR)\jim.obj $(TMPDIR)\jimwish.obj
+ @$(LD) $(LDFLAGS) -out:$@ $** $(LIBS) user32.lib
+
+.PHONY: all jim dll win32 win32api win32com jim jimwish aio sqlite3
+
+#-------------------------------------------------------------------------
+setup:
+ @if not exist $(OUTDIR) mkdir $(OUTDIR)
+ @if not exist $(TMPDIR) mkdir $(TMPDIR)
+
+test: jim
+ $(OUTDIR)\jim.exe test.tcl
+
+clean:
+ @if exist $(TMPDIR)\NUL $(RMDIR) $(TMPDIR) >NUL
+
+realclean: clean
+ @if exist $(OUTDIR)\NUL $(RMDIR) $(OUTDIR) >NUL
+
+#-------------------------------------------------------------------------
+
+.SUFFIXES:.c .cpp
+
+{$(SRCDIR)}.c{$(TMPDIR)}.obj::
+ @$(CC) $(CFLAGS) $(DEFS) $(INC) -Fo$(TMPDIR)\ -c @<<
+$<
+<<
+
+{$(SRCDIR)}.cpp{$(TMPDIR)}.obj::
+ @$(CC) $(CFLAGS) $(DEFS) $(INC) -Fo$(TMPDIR)\ -c @<<
+$<
+<<
+
+$(TMPDIR)\jim.obj: $(SRCDIR)\jim.c $(SRCDIR)\jim.h
+$(TMPDIR)\jim-aio.obj: $(SRCDIR)\jim-aio.c $(SRCDIR)\jim.h
+$(TMPDIR)\jim-eventloop.obj: $(SRCDIR)\jim-eventloop.c $(SRCDIR)\jim.h
+$(TMPDIR)\jim-win32.obj: $(SRCDIR)\jim-win32.c $(SRCDIR)\jim.h
+$(TMPDIR)\jim-win32api.obj: $(SRCDIR)\jim-win32api.c $(SRCDIR)\jim.h
+$(TMPDIR)\jim-win32com.obj: $(SRCDIR)\jim-win32com.c $(SRCDIR)\jim.h
+$(TMPDIR)\jim.dll.obj: $(SRCDIR)\jim.c $(SRCDIR)\jim.h
+ @$(CC) -DBUILD_Jim $(CFLAGS) $(DEFS) $(INC) -Fo$@ -c $(SRCDIR)\jim.c
+$(TMPDIR)\jim-sqlite3.obj: $(SRCDIR)\jim-sqlite3.c $(SRCDIR)\jim.h
+!if $(SQLITE3)
+ @$(CC) $(CFLAGS) $(DEFS) $(INC) $(SQLITE_INC) -Fo$(TMPDIR)\ -c $(SRCDIR)\jim-sqlite3.c
+!else
+ @echo cannot build sqlite3 extension - SQLITE3DIR not defined
+!endif
+
+#-------------------------------------------------------------------------
276 README
@@ -0,0 +1,276 @@
+The Jim Interpreter
+A small-footprint implementation of the Tcl programming language.
+
+--------------------------------------------------------------------------------
+WHAT IS JIM?
+--------------------------------------------------------------------------------
+
+Jim is a small footprint implementation of the Tcl programming language
+written from scratch. Currently it's a work in progress, but already
+capable to run non-trivial scripts (see the benchmark.tcl file for
+an example). There are many Tcl core commands not implemented, but the
+language itself offers already interesting features like {expand} and
+[dict], that are features that will appear on Tcl8.5, [lambda] with
+garbage collection, and a general GC/references system to build linked
+data structure with automatic memory management. Arrays in Jim are
+not collection of variables, but instead syntax sugar for [dict]tionaries.
+
+Other common features of the Tcl programming language are present, like
+the "everything is a string" behaviour, implemented internally as
+dual ported objects to ensure that the execution time does not reflect
+the semantic of the language :)
+
+--------------------------------------------------------------------------------
+WHEN JIM CAN BE USEFUL?
+--------------------------------------------------------------------------------
+
+1) If you are writing an application, and want to make it scriptable, with
+Jim you have a way to do it that does not require to link your application
+with a big system. You can just put jim.c and jim.h files in your project
+and use the Jim API to write the glue code that makes your application
+scriptable in Jim, with the following advantages:
+
+- Jim is not the next "little language", but it's a Tcl implementation.
+ You can reuse your knowledge if you already Tcl skills, or enjoy
+ the availability of documentation, books, web resources, ...
+ (for example check my online Tcl book at http://www.invece.org/tclwise)
+
+- Jim is simple, 10k lines of code. If you want to adapt it you can hack
+ the source code to feet the needs of your application. It makes you
+ able to have scripting for default, and avoid external dependences.
+
+ Having scripting support *inside*, and in a way that a given version
+ of your program always gets shipped a given version of Jim, you can
+ write part of your application in Jim itself. Like it happens for
+ Emacs/Elisp, or Gimp/Scheme, both this applications have the interpreter
+ inside.
+
+- Jim is Tcl, and Tcl looks like a configuration file if you want. So
+ if you use Jim you have also a flexible syntax for your config file.
+ This is a valid Tcl script:
+
+ set MyFeature on
+ ifssl {
+ set SslPort 45000
+ use compression
+ }
+
+ It looks like a configuration file, but if you implement the [ifssl]
+ and [use] commands, it's a valid Tcl script.
+
+- Tcl scales with the user. Not all know it, but Tcl is so powerful that
+ you can reprogram the language in itself. Jim support this features
+ of the Tcl programming language. You can write new control structures,
+ use the flexible data types it offers (Lists are a central data structure,
+ with Dictionaries that are also lists). Still Tcl is simpler for the
+ casual programmer, especially if compared to other languages offering
+ small footprint implementations (like Scheme and FORTH).
+
+- Because of the Tcl semantic (pass by value, everything is a command
+ since there are no reserved words), there is a nice API to glue
+ your application with Jim. See under the 'docs' directory to find
+ examples and documentation about it.
+
+- Jim is supported. If you need commercial software, contact the author
+ writing an email to 'antirez@gmail.com'.
+
+2) The other "field" where Jim can be useful is obviously embedded systems.
+
+3) We are working to make Jim as feature-complete as possible, thanks to
+ dynamically loaded extensions it may stay as little as it is today
+ but able to do interesting things for you. So it's not excluded that
+ in the future Jim will be an option as general purpose language.
+ But don't mind, for this there is already the mainstream Tcl
+ implementation ;).
+
+--------------------------------------------------------------------------------
+HOW BIG IS IT?
+--------------------------------------------------------------------------------
+
+Jim compiled with -Os is 85k currently. Still it lacks core commands
+that will make it a little bigger, but not too much... only what's
+strictly required will end inside the core, the rest will be implemented
+as extensions.
+
+Note that the actual Jim core is much smaller, if you strip away commands.
+If you can do without [expr] (that's big about code size), and some
+other command you may probably end with a 40k executable.
+
+--------------------------------------------------------------------------------
+HOW FAST IS IT?
+--------------------------------------------------------------------------------
+
+Jim is in most code faster than Tcl7.6p2 (latest 7.x version),
+and slower than Tcl 8.4.x. You can expect pretty decent performances
+for such a little interpreter.
+
+If you want a more precise measure, there is 'bench.tcl' inside this
+distribution that will run both under Jim and Tcl, so just execute
+it with both the interpreters and see what you get :)
+
+--------------------------------------------------------------------------------
+HOW TO COMPILE
+--------------------------------------------------------------------------------
+
+Jim was tested under Linux, FreeBSD, MacosX, Windows XP (mingw, MVC).
+
+To compile jim itself try:
+
+ make jim
+
+In non-linux systems you may have to complile without "-ldl" because
+it's not needed but will cause a compilation error (no configure for
+now... applications embedding Jim will probably have one already).
+
+In order to avoid to link against 'dl' just use:
+
+ make LIBS="" jim
+
+For instructions about how to compile extensions just try 'make'
+and see the available options. Check also the next section of this file.
+
+--------------------------------------------------------------------------------
+HOW TO COMPILE IN SYSTEMS WITH JUST ANSI-C SUPPORT
+--------------------------------------------------------------------------------
+
+Try:
+
+ make LIBS="" DEFS="-DJIM_ANSIC" jim
+
+This should compile Jim almost everywhere there is a decent ANSI-C compiler.
+
+--------------------------------------------------------------------------------
+EXTENSIONS
+--------------------------------------------------------------------------------
+
+POSIX
+=====
+
+This is the start of a library that should export to Jim useful bits of the
+POSIX API. For now there are just a few utility functions, but it's
+an example on how to write a simple library for Jim.
+
+WIN32
+=====
+
+This is the start of a library that should export to Jim useful bits of the
+WIN32 API. Currently there is just one function that is used to call windows
+applications. For example run jim and try the extension with:
+
+ package require win32
+ win32.shellexecute open notepad
+
+You should see a notepad application running.
+
+ANSI-I/O, SQLITE
+================
+
+There is documentation under the "doc" dictory about the "ANSI I/O"
+and "SQLITE" extensions.
+
+SDL
+===
+
+The SDL extension is currently undocumented (work in progress), but
+there is enought to start to play. That's an example script:
+
+ package require sdl
+
+ set xres 800
+ set yres 800
+ set s [sdl.screen $xres $yres]
+
+ set i 0
+ while 1 {
+ set x1 [rand $xres]
+ set y1 [rand $yres]
+ set x2 [rand $xres]
+ set y2 [rand $yres]
+ set rad [rand 40]
+ set r [rand 256]
+ set g [rand 256]
+ set b [rand 256]
+ $s fcircle $x1 $y1 $rad $r $g $b 200
+ incr i
+ if {$i > 2000} {$s flip}
+ if {$i == 3000} exit
+ }
+
+--------------------------------------------------------------------------------
+HOW TO EMBED JIM INTO APPLICATIONS / HOW TO WRITE EXTENSIONS FOR JIM
+--------------------------------------------------------------------------------
+
+See the documentation under the "doc" directory (work in progress).
+
+--------------------------------------------------------------------------------
+COPYRIGHT and LICENSE
+--------------------------------------------------------------------------------
+
+Copyright (C) 2005 Salvatore Sanfilippo
+All Rights Reserved
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ A copy of the license is also included in the source distribution
+ of Jim, as a TXT file name called LICENSE.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+--------------------------------------------------------------------------------
+HISTORY
+--------------------------------------------------------------------------------
+
+"first Jim goal: to vent my need to hack on Tcl."
+
+And actually this is exactly why I started Jim, in the first days
+of Jenuary 2005. After a month of hacking Jim was able to run
+simple scripts, now, after two months it started to be clear to
+me that it was not just the next toy to throw away but something
+that may evolve into a real interpreter. In the same time
+Pat Thoyts and Clemens Hintze started to contribute code, so that
+the development of new core commands was faster, and also more
+people hacking on the same code had as result fixes in the API,
+C macros, and so on.
+
+Currently we are at the point that the core interpreter is almost finished
+and it is entering the Beta stage. There is to add some other core command,
+to do a code review to ensure quality of all the parts and to write
+documentation.
+
+We already started to work on extensions like OOP, event loop,
+I/O, networking, regexp. Some extensions are already ready for
+prime time, like the Sqlite extension and the ANSI I/O.
+
+------------------------------------------------------------------------------
+Thanks to...
+------------------------------------------------------------------------------
+
+- First of all, thanks to every guy that are listed in the AUTHORS file,
+ that directly helped with code and ideas. Also check the ChangeLog
+ file for additional credits about patches or bug reports.
+- Elisa Manara that helped me to select this ill conceived name for
+ an interpreter.
+- Many people on the Tclers Chat that helped me to explore issues
+ about the use and the implementation of the Tcl programming language.
+- David Welton for the tech info sharing and our chats about
+ programming languages design and the ability of software to "scale down".
+- Martin S. Weber for the great help with Solaris issues, debugging of
+ problems with [load] on this arch, 64bit tests.
+- The authors of "valgrind", for this wonderful tool, that helped me a
+ lot to fix bugs in minutes instead of hours.
+
+
+----
+Enjoy!
+Salvatore Sanfilippo
+10 Mar 2005
+
+
65 STYLE
@@ -0,0 +1,65 @@
+This file summarizes the C style used for Jim.
+Copyright (C) 2005 Salvatore Sanfilippo.
+
+-----------
+INDENTATION
+-----------
+
+Indentation is 4 spaces, no smart-tabs are used (i.e.
+two indentation steps of 4 spaces will not be converted
+into a real tab, but 8 spaces).
+
+---------------
+FUNCTIONS NAMES
+---------------
+
+Functions names of exported functions are in the form:
+
+Jim_ExportedFunctionName()
+
+The prefix is "Jim_", every word composing the function name
+is capitalized.
+
+Not exported functions that are of general interest for the Jim
+core, like JimFreeInterp() are capitalized the same way, but the
+prefix used for this functions is "Jim" instead of "Jim_".
+Another example is:
+
+JimNotExportedFunction()
+
+Not exported functions that are not general, like functions
+implementing hashtables or Jim objects methods can be named
+in any prefix as long as capitalization rules are followed,
+like in:
+
+ListSetIndex()
+
+---------------
+VARIABLES NAMES
+---------------
+
+Global variables follow the same names convention of functions.
+
+Local variables have usually short names. A counter is just 'i', or 'j',
+or something like this. When a longer name is required, composed of
+more words, capitalization is used, but the first word starts in
+lowcase:
+
+thisIsALogVarName
+
+----
+GOTO
+----
+
+Goto is allowed every time it makes the code cleaner, like in complex
+functions that need to handle exceptions, there is often an "err" label
+at the end of the function where allocated resources are freed before to exit
+with an error. Goto is also used in order to excape multiple nexted loops.
+
+----------
+C FEATURES
+----------
+
+Only C89 ANSI C is allowed. C99 features can't be used currently.
+GCC extensions are not allowed.
+
100 TODO
@@ -0,0 +1,100 @@
+CORE LANGUAGE FEATURES
+
+- Proc default arguments
+- Traces
+- [static] command
+
+CORE COMMANDS
+
+- All the missing standard core commands not related to I/O, namespaces, ...
+- The current [expr] needs a lot of work, expecially operators && and ||
+ are not lazy. Math functions are not present but probably will never
+ be added as expr functions, but as Tcl commands, like [sin], [cos] and
+ so on.
+- [onleave] command, executing something as soon as the current procedure
+ returns. With no arguments it returns the script set, with one appends
+ the onleave script. There should be a way to reset.
+- [proc] without arguments may return a list of all the procedures
+ (no C commands). While with a single argument (the name of a proc)
+ may return [list $args $statics $body].
+
+OTHER COMMANDS NOT IN TCL BUT THAT SHOULD BE IN JIM
+
+- Set commands: [lunion], [lintersect], and [ldifference]
+
+EXTENSIONS LOADING
+
+- Avoid that the same extension can be loaded multiple times inside the
+ same interpreter. The extension should return its name on initialization
+ together with the version so that Jim_InitExtension will fail if the
+ extension with the same name is already loaded.
+
+EXTENSIONS
+
+- Regexp extension
+- OOP system
+- Event loop
+- Files
+- Sockets
+- Cryptography: hash functions, block ciphers, strim ciphers, PRNGs.
+- Tuplespace extension (http://wiki.tcl.tk/3947) (using sqlite as backend)
+- Zlib
+- Gdlib
+- CGI (interface compatible with ncgi, but possibly written in C for speed)
+
+SPEED OPTIMIZATIONS
+
+- Find a way to avoid interpolation/reparsing in "foo($bar)" tokens.
+ See the "sieve" and "ary" bench performances, result of this problem.
+ (to compare with sieve_dict is also useful.)
+- Experiment with better ways to do literal sharing.
+- Organize the 'script' object so that a single data structure is
+ used for a full command, and interpolation is done using an
+ 'interpolation token type' like JIM_TT_VAR and so on.
+ This way there is no need to run the array if integer objects
+ with the command structure. Also should help for better cache usage.
+- Generate .c from Jim programs, as calls to the Jim API to avoid
+ the performance penality of Jim_EvalObj() overhead. In the future
+ try to generate the calls like a JIT emitting assembler from
+ Jim directly.
+- Jim_GetDouble() should check if the object type is an integer into
+ a range that a double can represent without any loss, and directly
+ return the double value converting the integer one instead to pass
+ for the string repr.
+
+IMPLEMENTATION ISSUES
+
+- Objects lazy free.
+- Rewrite all the commands accepting a set of options to use Jim_GetEnum().
+- Every time an extension is loaded Jim should put the dlopen() (or win32
+ equivalent) handle in a list inside the interpreter structure. When
+ the interpreter is freed all this handles should be closed with dlclose().
+- *AssocData() function should allow to specify a delProc C function like
+ in the Tcl API. When the interpreter is destroied all the delProc functions
+ should be called to free the memory before to free the interpreter.
+- Convert dicts from lists directly without to pass from the string repr.
+
+ERROR MESSAGES
+
+- Display the procedure relative file number where the error happened.
+ Like:
+
+ In procedure 'check' line 11, called at file "test.tcl", line 1024
+
+ instead of just:
+
+ In procedure 'check' called at file "test.tcl", line 1024
+
+REFERENCES SYSTEM
+
+- Unify ref/getref/setref/collect/finalize under an unique [ref] command.
+- Add a 'call' attribute to references in order to call a given procedure
+ if the name of a reference is used as command name.
+
+API FUNCTIONS TO EXPORT
+
+- Jim_FormatString()
+
+RANDOM THINGS TO DO ASAP
+
+- .jimrc loading, using the ENV variable
571 bench.tcl
@@ -0,0 +1,571 @@
+set batchmode 0
+set benchmarks {}
+
+proc bench {title script} {
+ global benchmarks batchmode
+
+ set Title [string range "$title " 0 20]
+
+ set failed [catch {time $script} res]
+ if {$failed} {
+ if {!$batchmode} {puts "$Title - This test can't run on this interpreter"}
+ lappend benchmarks $title F
+ } else {
+ set t [lindex $res 0]
+ lappend benchmarks $title $t
+ set ts " $t"
+ set ts [string range $ts [expr {[string length $ts]-10}] end]
+ if {!$batchmode} {puts "$Title -$ts microseconds per iteration"}
+ }
+}
+
+### BUSY LOOP ##################################################################
+
+proc whilebusyloop {} {
+ set i 0
+ while {$i < 1850000} {
+ incr i
+ }
+}
+
+proc forbusyloop {} {
+ for {set i 0} {$i < 1850000} {incr i} {}
+}
+
+### FIBONACCI ##################################################################
+
+proc fibonacci {x} {
+ if {$x <= 1} {
+ expr 1
+ } else {
+ expr {[fibonacci [expr {$x-1}]] + [fibonacci [expr {$x-2}]]}
+ }
+}
+
+### HEAPSORT ###################################################################
+
+set IM 139968
+set IA 3877
+set IC 29573
+
+set last 42
+
+proc make_gen_random {} {
+ global IM IA IC
+ set params [list IM $IM IA $IA IC $IC]
+ set body [string map $params {
+ global last
+ expr {($max * [set last [expr {($last * IA + IC) % IM}]]) / IM}
+ }]
+ proc gen_random {max} $body
+}
+
+proc heapsort {ra_name} {
+ upvar 1 $ra_name ra
+ set n [llength $ra]
+ set l [expr {$n / 2}]
+ set ir [expr {$n - 1}]
+ while 1 {
+ if {$l} {
+ set rra [lindex $ra [incr l -1]]
+ } else {
+ set rra [lindex $ra $ir]
+ lset ra $ir [lindex $ra 0]
+ if {[incr ir -1] == 0} {
+ lset ra 0 $rra
+ break
+ }
+ }
+ set i $l
+ set j [expr {(2 * $l) + 1}]
+ while {$j <= $ir} {
+ set tmp [lindex $ra $j]
+ if {$j < $ir} {
+ if {$tmp < [lindex $ra [expr {$j + 1}]]} {
+ set tmp [lindex $ra [incr j]]
+ }
+ }
+ if {$rra >= $tmp} {
+ break
+ }
+ lset ra $i $tmp
+ incr j [set i $j]
+ }
+ lset ra $i $rra
+ }
+}
+
+proc heapsort_main {} {
+ set n 6100
+ make_gen_random
+
+ set data {}
+ for {set i 1} {$i <= $n} {incr i} {
+ lappend data [gen_random 1.0]
+ }
+ heapsort data
+}
+
+### SIEVE ######################################################################
+
+proc sieve {num} {
+ while {$num > 0} {
+ incr num -1
+ set count 0
+ for {set i 2} {$i <= 8192} {incr i} {
+ set flags($i) 1
+ }
+ for {set i 2} {$i <= 8192} {incr i} {
+ if {$flags($i) == 1} {
+ # remove all multiples of prime: i
+ for {set k [expr {$i+$i}]} {$k <= 8192} {incr k $i} {
+ set flags($k) 0
+ }
+ incr count
+ }
+ }
+ }
+ return $count
+}
+