Age | Commit message (Collapse) | Author | Files | Lines |
|
eventloop doesn't need a filehandle, so so simplify the interface
by using file descriptors instead
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sweep through and clean up all (most) of the comments in the code.
While there, adjust some variable and function names to be more consistent,
and make a few small code changes - again, mostly for consistency.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
warn at compile time if subsecond sleep in [after] is not supported
Simplify time handling by keeping all times in milliseconds since initialisation.
No need for any sleep on -ve time
Use memset() in initialisation of eventLoop
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Prefer Jim_String() and Jim_Length() over Jim_GetString() where it makes sense.
Use Jim_ListGetIndex() where success is guaranteed.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Previously, Jim_DeleteFileHandler() would indiscriminately
delete the first matching file handler in the list.
Instead, it should delete the file handler matching the event mask.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The following should break when a handled signal is caught.
catch -signal { vwait forever }
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Simplifies the process of building loadable extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
"eof" event no longer exists
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- Check for mkdir with one arg at configure time
- mingw can't really do select(), so support only time events in eventloop
- Declare dlerror() to be compatible with mingw
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is very common to get the string value
without the length. Jim_String() is a macro which does that.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Which doesn't support select() with no fds.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The consequence is an excessive amount of calls to select
Reported-By: Patrick WEBER <patrick.weber@live.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Per v0.51, don't refer to the FreeBSD licence
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Especially for eCos, mingw32 and cygwin
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Use 'indent'. Not perfect, but at least consistent.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
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
|
|
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
|
|
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
|
|
Just assume direct static linking for now
|
|
|
|
* jim.c/h: bring in changes from OpenOCD. Warnings and
some bug fixes. Copyright list updated in jim.c
|
|
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
|
|
Also clean up some white space
|
|
Nvp, getopt, move interactive processing to jim-interactive.c
|
|
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>
|
|
Remove "FreeBSD license" statements, since it's not a correct term
I believe.
Small cleanup while being here.
|
|
This reverts commit 1e2fdd7d9e877fbe2c88a4c32f098ce1e575dc1d.
|
|
for relicensing all files within Jim project.
"FreeBSD license" isn't correct term, so basically remove it.
Try to make the whole place consistent.
|
|
|
|
* jim.c/h: bring in changes from OpenOCD. Warnings and
some bug fixes. Copyright list updated in jim.c
|
|
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.
|
|
* 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
|
|
|