* 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 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>
#define __JIM_EVENTLOOP_CORE__
#ifdef __ECOS
#include <pkgconf/jimtcl.h>
-#endif
-#ifdef __ECOS
+#include <sys/time.h>
#include <cyg/jimtcl/jim.h>
#include <cyg/jimtcl/jim-eventloop.h>
#else
Jim_TimeEvent *timeEventHead;
} Jim_EventLoop;
-void Jim_CreateFileHandler(Jim_Interp *interp, void *handle, int mask,
+static void Jim_CreateFileHandler(Jim_Interp *interp, void *handle, int mask,
Jim_FileProc *proc, void *clientData,
Jim_EventFinalizerProc *finalizerProc)
{
// fprintf(stderr,"raus\n");
}
-void Jim_DeleteFileHandler(Jim_Interp *interp, void *handle)
+static void Jim_DeleteFileHandler(Jim_Interp *interp, void *handle)
{
Jim_FileEvent *fe, *prev = NULL;
Jim_EventLoop *eventLoop = Jim_GetAssocData(interp, "eventloop");
}
}
-// The same for signals.
-void Jim_CreateSignalHandler(Jim_Interp *interp, int signum,
- Jim_FileProc *proc, void *clientData,
- Jim_EventFinalizerProc *finalizerProc)
-{
-}
-void Jim_DeleteSignalHandler(Jim_Interp *interp, int signum)
-{
-}
-
/* That's another part of this extension that needs to be ported
* to WIN32. */
static void JimGetTime(long *seconds, long *milliseconds)
*milliseconds = tv.tv_usec/1000;
}
-jim_wide Jim_CreateTimeHandler(Jim_Interp *interp, jim_wide milliseconds,
+static jim_wide Jim_CreateTimeHandler(Jim_Interp *interp, jim_wide milliseconds,
Jim_TimeProc *proc, void *clientData,
Jim_EventFinalizerProc *finalizerProc)
{
return id;
}
-jim_wide Jim_DeleteTimeHandler(Jim_Interp *interp, jim_wide id)
+static jim_wide Jim_DeleteTimeHandler(Jim_Interp *interp, jim_wide id)
{
Jim_TimeEvent *te, *prev = NULL;
Jim_EventLoop *eventLoop = Jim_GetAssocData(interp, "eventloop");
}
/* ---------------------------------------------------------------------- */
-void JimELAssocDataDeleProc(Jim_Interp *interp, void *data)
+static void JimELAssocDataDeleProc(Jim_Interp *interp, void *data)
{
void *next;
Jim_FileEvent *fe;
return JIM_OK;
}
-void JimAfterTimeHandler(Jim_Interp *interp, void *clientData)
+static void JimAfterTimeHandler(Jim_Interp *interp, void *clientData)
{
Jim_Obj *objPtr = clientData;
Jim_EvalObjBackground(interp, objPtr);
}
-void JimAfterTimeEventFinalizer(Jim_Interp *interp, void *clientData)
+static void JimAfterTimeEventFinalizer(Jim_Interp *interp, void *clientData)
{
Jim_Obj *objPtr = clientData;
int tlen ;
jim_wide remain = 0;
const char *tok = Jim_GetString(argv[2], &tlen);
- if (sscanf(tok,"after#%lld",&id) == 1) {
+ if (sscanf(tok,"after#%" JIM_WIDE_MODIFIER, &id) == 1) {
remain = Jim_DeleteTimeHandler(interp, id);
if (remain > -2) {
Jim_SetResult(interp, Jim_NewIntObj(interp, remain));