summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixTest.c')
-rw-r--r--unix/tclUnixTest.c47
1 files changed, 19 insertions, 28 deletions
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index e36e4a7..f51cf2e 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -6,10 +6,10 @@
* Copyright (c) 1996-1997 Sun Microsystems, Inc.
* Copyright (c) 1998 by Scriptics Corporation.
*
- * See the file "license.terms" for information on usage and redistribution of
- * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTest.c,v 1.33 2010/02/25 22:20:10 nijtmans Exp $
+ * RCS: @(#) $Id: tclUnixTest.c,v 1.34 2010/06/21 11:23:23 nijtmans Exp $
*/
#ifndef USE_TCL_STUBS
@@ -64,26 +64,17 @@ static const char *gotsig = "0";
* Forward declarations of functions defined later in this file:
*/
-static void TestFileHandlerProc(ClientData clientData, int mask);
-static int TestfilehandlerCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestfilewaitCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestfindexecutableCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestgetopenfileCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestgetdefencdirCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestsetdefencdirCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestalarmCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static int TestgotsigCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
-static void AlarmHandler(int signum);
-static int TestchmodCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
+static Tcl_CmdProc TestalarmCmd;
+static Tcl_CmdProc TestchmodCmd;
+static Tcl_CmdProc TestfilehandlerCmd;
+static Tcl_CmdProc TestfilewaitCmd;
+static Tcl_CmdProc TestfindexecutableCmd;
+static Tcl_CmdProc TestgetdefencdirCmd;
+static Tcl_CmdProc TestgetopenfileCmd;
+static Tcl_CmdProc TestgotsigCmd;
+static Tcl_CmdProc TestsetdefencdirCmd;
+static Tcl_FileProc TestFileHandlerProc;
+static void AlarmHandler(int signum);
/*
*----------------------------------------------------------------------
@@ -238,24 +229,24 @@ TestfilehandlerCmd(
if (strcmp(argv[3], "readable") == 0) {
Tcl_CreateFileHandler(GetFd(pipePtr->readFile), TCL_READABLE,
- TestFileHandlerProc, (ClientData) pipePtr);
+ TestFileHandlerProc, pipePtr);
} else if (strcmp(argv[3], "off") == 0) {
Tcl_DeleteFileHandler(GetFd(pipePtr->readFile));
} else if (strcmp(argv[3], "disabled") == 0) {
Tcl_CreateFileHandler(GetFd(pipePtr->readFile), 0,
- TestFileHandlerProc, (ClientData) pipePtr);
+ TestFileHandlerProc, pipePtr);
} else {
Tcl_AppendResult(interp, "bad read mode \"", argv[3], "\"", NULL);
return TCL_ERROR;
}
if (strcmp(argv[4], "writable") == 0) {
Tcl_CreateFileHandler(GetFd(pipePtr->writeFile), TCL_WRITABLE,
- TestFileHandlerProc, (ClientData) pipePtr);
+ TestFileHandlerProc, pipePtr);
} else if (strcmp(argv[4], "off") == 0) {
Tcl_DeleteFileHandler(GetFd(pipePtr->writeFile));
} else if (strcmp(argv[4], "disabled") == 0) {
Tcl_CreateFileHandler(GetFd(pipePtr->writeFile), 0,
- TestFileHandlerProc, (ClientData) pipePtr);
+ TestFileHandlerProc, pipePtr);
} else {
Tcl_AppendResult(interp, "bad read mode \"", argv[4], "\"", NULL);
return TCL_ERROR;
@@ -339,7 +330,7 @@ TestFileHandlerProc(
int mask) /* Indicates which events happened:
* TCL_READABLE or TCL_WRITABLE. */
{
- Pipe *pipePtr = (Pipe *) clientData;
+ Pipe *pipePtr = clientData;
if (mask & TCL_READABLE) {
pipePtr->readCount++;