diff options
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r-- | generic/tkConsole.c | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 7a74344..c1d4c42 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -227,7 +227,7 @@ Tk_InitConsoleChannels( return; } - consoleInitPtr = Tcl_GetThreadData(&consoleInitKey, (int) sizeof(int)); + consoleInitPtr = (int *)Tcl_GetThreadData(&consoleInitKey, (int) sizeof(int)); if (*consoleInitPtr) { /* * We've already initialized console channels in this thread. @@ -255,13 +255,13 @@ Tk_InitConsoleChannels( * interp for it to live in. */ - info = ckalloc(sizeof(ConsoleInfo)); + info = (ConsoleInfo *) ckalloc(sizeof(ConsoleInfo)); info->consoleInterp = NULL; info->interp = NULL; info->refCount = 0; if (doIn) { - ChannelData *data = ckalloc(sizeof(ChannelData)); + ChannelData *data = (ChannelData *)ckalloc(sizeof(ChannelData)); data->info = info; data->info->refCount++; @@ -278,7 +278,7 @@ Tk_InitConsoleChannels( } if (doOut) { - ChannelData *data = ckalloc(sizeof(ChannelData)); + ChannelData *data = (ChannelData *)ckalloc(sizeof(ChannelData)); data->info = info; data->info->refCount++; @@ -295,7 +295,7 @@ Tk_InitConsoleChannels( } if (doErr) { - ChannelData *data = ckalloc(sizeof(ChannelData)); + ChannelData *data = (ChannelData *)ckalloc(sizeof(ChannelData)); data->info = info; data->info->refCount++; @@ -377,7 +377,7 @@ Tk_CreateConsoleWindow( * New ConsoleInfo for a new console window. */ - info = ckalloc(sizeof(ConsoleInfo)); + info = (ConsoleInfo *)ckalloc(sizeof(ConsoleInfo)); info->refCount = 0; /* @@ -407,7 +407,7 @@ Tk_CreateConsoleWindow( } } } else { - info = ckalloc(sizeof(ConsoleInfo)); + info = (ConsoleInfo *)ckalloc(sizeof(ConsoleInfo)); info->refCount = 0; } @@ -497,7 +497,7 @@ ConsoleOutput( int toWrite, /* How many bytes to write? */ int *errorCode) /* Where to store error code. */ { - ChannelData *data = instanceData; + ChannelData *data = (ChannelData *)instanceData; ConsoleInfo *info = data->info; *errorCode = 0; @@ -561,12 +561,17 @@ ConsoleOutput( /* ARGSUSED */ static int ConsoleInput( - ClientData instanceData, /* Unused. */ + void *dummy, /* Unused. */ char *buf, /* Where to store data read. */ int bufSize, /* How much space is available in the * buffer? */ int *errorCode) /* Where to store error code. */ { + (void)dummy; + (void)buf; + (void)bufSize; + (void)errorCode; + return 0; /* Always return EOF. */ } @@ -589,11 +594,12 @@ ConsoleInput( /* ARGSUSED */ static int ConsoleClose( - ClientData instanceData, /* Unused. */ - Tcl_Interp *interp) /* Unused. */ + ClientData instanceData, + Tcl_Interp *dummy) /* Unused. */ { - ChannelData *data = instanceData; + ChannelData *data = (ChannelData *)instanceData; ConsoleInfo *info = data->info; + (void)dummy; if (info) { if (info->refCount-- <= 1) { @@ -629,11 +635,13 @@ ConsoleClose( /* ARGSUSED */ static void ConsoleWatch( - ClientData instanceData, /* Device ID for the channel. */ + ClientData dummy, /* Device ID for the channel. */ int mask) /* OR-ed combination of TCL_READABLE, * TCL_WRITABLE and TCL_EXCEPTION, for the * events we are interested in. */ { + (void)dummy; + (void)mask; } /* @@ -656,12 +664,16 @@ ConsoleWatch( /* ARGSUSED */ static int ConsoleHandle( - ClientData instanceData, /* Device ID for the channel. */ + ClientData dummy, /* Device ID for the channel. */ int direction, /* TCL_READABLE or TCL_WRITABLE to indicate * which direction of the channel is being * requested. */ ClientData *handlePtr) /* Where to store handle */ { + (void)dummy; + (void)direction; + (void)handlePtr; + return TCL_ERROR; } @@ -694,7 +706,7 @@ ConsoleObjCmd( "eval", "hide", "show", "title", NULL}; enum option {CON_EVAL, CON_HIDE, CON_SHOW, CON_TITLE}; Tcl_Obj *cmd = NULL; - ConsoleInfo *info = clientData; + ConsoleInfo *info = (ConsoleInfo *)clientData; Tcl_Interp *consoleInterp = info->consoleInterp; if (objc < 2) { @@ -784,7 +796,7 @@ InterpreterObjCmd( int index, result = TCL_OK; static const char *const options[] = {"eval", "record", NULL}; enum option {OTHER_EVAL, OTHER_RECORD}; - ConsoleInfo *info = clientData; + ConsoleInfo *info = (ConsoleInfo *)clientData; Tcl_Interp *otherInterp = info->interp; if (objc < 2) { @@ -852,7 +864,7 @@ static void DeleteConsoleInterp( ClientData clientData) { - Tcl_Interp *interp = clientData; + Tcl_Interp *interp = (Tcl_Interp *)clientData; Tcl_DeleteInterp(interp); } @@ -879,7 +891,7 @@ InterpDeleteProc( ClientData clientData, Tcl_Interp *interp) { - ConsoleInfo *info = clientData; + ConsoleInfo *info = (ConsoleInfo *)clientData; if (info->consoleInterp == interp) { Tcl_DeleteThreadExitHandler(DeleteConsoleInterp, info->consoleInterp); @@ -911,7 +923,7 @@ static void ConsoleDeleteProc( ClientData clientData) { - ConsoleInfo *info = clientData; + ConsoleInfo *info = (ConsoleInfo *)clientData; if (info->consoleInterp) { Tcl_DeleteInterp(info->consoleInterp); @@ -946,7 +958,7 @@ ConsoleEventProc( XEvent *eventPtr) { if (eventPtr->type == DestroyNotify) { - ConsoleInfo *info = clientData; + ConsoleInfo *info = (ConsoleInfo *)clientData; Tcl_Interp *consoleInterp = info->consoleInterp; if (consoleInterp && !Tcl_InterpDeleted(consoleInterp)) { |