Jim Tcl
Check-in [459cf36faa]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:after: Need to initialise 'ms'

Also fix a warning on Windows

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 459cf36faa01b3fedde6352195b123453a5cbb80
User & Date: steveb@workware.net.au 2017-10-15 23:00:23
Context
2017-10-15
23:53
jim: cmdPrivData needs to be saved and restored

If a C command invokes another C command (including indirectly), cmdPrivData was being changed but not restored check-in: 04fe854dc1 user: steveb@workware.net.au tags: trunk

23:00
after: Need to initialise 'ms'

Also fix a warning on Windows

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 459cf36faa user: steveb@workware.net.au tags: trunk

21:03
eventloop: remove leftover debugging

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 6dad0537c9 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to jim-eventloop.c.

50
51
52
53
54
55
56

57
58

59
60
61
62
63
64
65
...
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif

#if defined(__MINGW32__)
#include <windows.h>
#include <winsock.h>

#define usleep(US) Sleep((US) / 1000)
#define HAVE_USLEEP

#else
#include <sys/types.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif

................................................................................

    Jim_DecrRefCount(interp, objPtr);
}

static int JimELAfterCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    Jim_EventLoop *eventLoop = Jim_CmdPrivData(interp);
    double ms;
    jim_wide id;
    Jim_Obj *objPtr, *idObjPtr;
    static const char * const options[] = {
        "cancel", "info", "idle", NULL
    };
    enum
    { AFTER_CANCEL, AFTER_INFO, AFTER_IDLE, AFTER_RESTART, AFTER_EXPIRE, AFTER_CREATE };







>


>







 







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
...
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif

#if defined(__MINGW32__)
#include <windows.h>
#include <winsock.h>
#ifndef HAVE_USLEEP
#define usleep(US) Sleep((US) / 1000)
#define HAVE_USLEEP
#endif
#else
#include <sys/types.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif

................................................................................

    Jim_DecrRefCount(interp, objPtr);
}

static int JimELAfterCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    Jim_EventLoop *eventLoop = Jim_CmdPrivData(interp);
    double ms = 0;
    jim_wide id;
    Jim_Obj *objPtr, *idObjPtr;
    static const char * const options[] = {
        "cancel", "info", "idle", NULL
    };
    enum
    { AFTER_CANCEL, AFTER_INFO, AFTER_IDLE, AFTER_RESTART, AFTER_EXPIRE, AFTER_CREATE };