diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-24 11:12:50 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:41 +1000 |
commit | 571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb (patch) | |
tree | 407ada47686556fb16198c99b3c61ea595bdb6bd /jim-eventloop.c | |
parent | 2d8564100c86466b71408b24a4c6932ec942e7c5 (diff) | |
download | jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.zip jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.tar.gz jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.tar.bz2 |
Build improvements, bug fixes and compiler warnings
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
Diffstat (limited to 'jim-eventloop.c')
-rw-r--r-- | jim-eventloop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jim-eventloop.c b/jim-eventloop.c index 6295d42..60cafbb 100644 --- a/jim-eventloop.c +++ b/jim-eventloop.c @@ -335,7 +335,7 @@ int Jim_ProcessEvents(Jim_Interp *interp, int flags) { int mask = 0; - if (fe->mask & JIM_EVENT_READABLE && FD_ISSET(fd, &rfds)) { + if ((fe->mask & JIM_EVENT_READABLE) && FD_ISSET(fd, &rfds)) { mask |= JIM_EVENT_READABLE; if ((fe->mask & JIM_EVENT_FEOF) && feof(fe->handle)) mask |= JIM_EVENT_FEOF; @@ -472,13 +472,13 @@ static int JimELAfterCommand(Jim_Interp *interp, int argc, jim_wide ms, id; Jim_Obj *objPtr, *idObjPtr; const char *options[] = { - "info", "cancel", "restart", "expire", NULL + "info", "cancel", NULL }; enum {INFO, CANCEL, RESTART, EXPIRE, CREATE }; int option = CREATE ; if (argc < 3) { - Jim_WrongNumArgs(interp, 1, argv, "<after milliseconds> script"); + Jim_WrongNumArgs(interp, 1, argv, "<after milliseconds> script|cancel <id>"); return JIM_ERR; } if (Jim_GetWide(interp, argv[1], &ms) != JIM_OK) |