aboutsummaryrefslogtreecommitdiff
path: root/jim-eventloop.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-09Allow jim to be used as an autoconf subdirSteve Bennett1-0/+1
Ensure that no public headers include the autoconf header, jimautoconf.h, as it leads to problems with redefined symbols. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-20Declare some internal functions staticSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Licence wording updates.Steve Bennett1-2/+0
Per v0.51, don't refer to the FreeBSD licence Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix -Wshadow warningsSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Portability fixesSteve Bennett1-4/+17
Especially for eCos, mingw32 and cygwin Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Remove dependence of jim core on stderrSteve Bennett1-2/+4
Remove Jim_PrintErrorMessage() and create Jim_MakeErrorMessage() instead. Move errorInfo to stdlib since it is now required. Also move lassign from tclcompat to stdlib as a core command. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Make jim more reentrantSteve Bennett1-2/+2
Make the exec wait table allocated and per-interpeter Use reentrant variants of some libc calls Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Ensure that Tcl extensions can be built-in or externalSteve Bennett1-0/+3
All C extensions must call Jim_PackageProvide() make-c-ext ensures that Tcl extensions call Jim_PackageProvide() if compiled in. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Minor cleanups and fixesSteve Bennett1-9/+0
array get for odd length list now returns an error comment fixes and small code rearrangement Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15eventloop improvements and enhancementsSteve Bennett1-60/+252
Move Jim_EvalObjBackground() out of the core to eventloop Time events are now kept and triggered in time order Time handlers are removed before execution Add 'update' Add 'after info' and 'after idle' Include time events in the return from Jim_ProcessEvents() Add Tcl eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some eventloop bugsSteve Bennett1-9/+21
bgerror is supposed to be suppressed subsequently if it returns break vwait should error on invalid array element vwait should return an empty result Don't accept 'after info' since it isn't supported Also add some eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Implement 'after ms'Steve Bennett1-2/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some eventloop problemsSteve Bennett1-4/+15
File handlers now pass through the error code and the handler is deleted on error. If there is nothing to do, vwait returns. If bgerror doesn't exist, print the original error to stderr. Also remove the 'eof' event handler since it isn't needed. Can just call [eof $f]. This also fixes source locations within 'readable' scripts. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Clean up the indentation messSteve Bennett1-85/+90
Use 'indent'. Not perfect, but at least consistent. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some build problems and add lost featuresSteve Bennett1-7/+3
Add some missing files needed for autoconf Make jim build standalone and without host jimsh Use (FILE *) for eventloop file handle Don't expect to support dynlib if no mmu Re-add nvp and win32 support (untested) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Documentation, build system updatesSteve Bennett1-1/+2
Document reference-related commands *: ref, getref, setref, finalize, lambda were missing Build system updates *: Add check for long long to configure *: Change -Dwith_jim_ext_... to -Djim_ext_... *: Fix jim-eventloop when compiling with no long long
2010-10-15Various general fixes and cleanupsSteve Bennett1-76/+51
Add lsearch -command, update case to use lsearch Rename tcl6.tcl to tclcompat.tcl Remove // style comments Expand some tabs to spaces Fix some compiler warnings Remove some unused functions Don't close fd=-1 in exec
2010-10-15Build improvements, bug fixes and compiler warningsSteve Bennett1-3/+3
Remove unimplemented 'after restart|expire' from eventloop Allow libjim to be build as a shared library On some platforms, regex.h needs stdlib.h first Use ualarm() only for times < 1 second Fix warnings found by clang static analyser *: printf/syslog %m isn't portable *: some variables set but never read *: some possible null pointer references (although mostly impossible) *: also minor fixes to jim unit tests Fix 'syslog -options <n>' Must null terminate readlink() result
2010-10-15Simplify use of eventloopSteve Bennett1-8/+1
Just assume direct static linking for now
2010-10-15Fix eCos compatiblity problems with autotools.oyvind1-3/+2
2010-10-152009-10-08 Øyvind Harboeoharboe1-7/+14
* jim.c/h: bring in changes from OpenOCD. Warnings and some bug fixes. Copyright list updated in jim.c
2010-10-15Convert jim-aio.c to use subcmdSteve Bennett1-6/+6
Also: - make stream.server set SO_REUSEADDR - do object reference properly for callbacks - white space cleanup in jim-eventloop.c - fix the pwd command - add support for JIM_MODFLAG_FULLARGV to subcmd - make verbose runtests easier to read - bio might not be available
2010-10-15Make static extensions buildSteve Bennett1-1/+1
Also clean up some white space
2010-10-15Strip out unneeded junk from JimSteve Bennett1-8/+1
Nvp, getopt, move interactive processing to jim-interactive.c
2010-10-15Cutover to new workware fork of Jim TclSteve Bennett1-35/+42
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-02-01Bring corrected license as mentioned in freebsd/...Wojciech A. Koszek1-2/+0
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-0/+2
This reverts commit 1e2fdd7d9e877fbe2c88a4c32f098ce1e575dc1d.
2010-02-01Bring correct license -- I think freebsd/ directory has an agreementsWojciech A. Koszek1-2/+0
for relicensing all files within Jim project. "FreeBSD license" isn't correct term, so basically remove it. Try to make the whole place consistent.
2009-10-19Fix eCos compatiblity problems with autotools.oyvind1-3/+2
2009-10-082009-10-08 Øyvind Harboeoharboe1-39/+35
* jim.c/h: bring in changes from OpenOCD. Warnings and some bug fixes. Copyright list updated in jim.c
2008-07-23 * jim.c: reduce stack usage. Important for embedded devices withoutoharboe1-18/+47
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-08 * changes to jim-eventloop.[ch]oharboe1-29/+101
* 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-06-16 * retire CVS keyword expansion. Plays havoc with patches.oharboe1-2/+0
2005-09-19Fixed a bug reported by Craig Denson about jim-eveloop.c and filemasks.antirez1-3/+3
2005-04-18First version of the Jim eventloop extension, exportingantirez1-0/+448
[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.