summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-20 13:49:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-20 13:49:02 (GMT)
commitae22ee577e1296427b927dda75f49560f6256c60 (patch)
tree41badbabc8140d865699b5f639cd4c53edbe3851
parenta72c1f969cba896ca61001393f0f7b74fb52e194 (diff)
parenta9b046b5bd7c666a406a17cbb0d86a2842091bac (diff)
downloadtcl-ae22ee577e1296427b927dda75f49560f6256c60.zip
tcl-ae22ee577e1296427b927dda75f49560f6256c60.tar.gz
tcl-ae22ee577e1296427b927dda75f49560f6256c60.tar.bz2
Few more spacing/formatting tweaks
-rw-r--r--macosx/tclMacOSXFCmd.c8
-rw-r--r--macosx/tclMacOSXNotify.c2
-rw-r--r--unix/dltest/pkgb.c2
-rw-r--r--unix/dltest/pkgooa.c6
-rw-r--r--unix/tclEpollNotfy.c4
-rw-r--r--unix/tclKqueueNotfy.c2
-rw-r--r--unix/tclLoadAix.c6
-rw-r--r--unix/tclLoadDl.c4
-rw-r--r--unix/tclLoadDyld.c2
-rw-r--r--unix/tclLoadNext.c2
-rw-r--r--unix/tclLoadOSF.c2
-rw-r--r--unix/tclLoadShl.c4
-rw-r--r--unix/tclSelectNotfy.c2
-rw-r--r--unix/tclUnixChan.c32
-rw-r--r--unix/tclUnixFCmd.c6
-rw-r--r--unix/tclUnixNotfy.c8
-rw-r--r--unix/tclUnixTest.c34
-rw-r--r--unix/tclXtTest.c2
-rw-r--r--win/tclWinChan.c10
-rw-r--r--win/tclWinConsole.c2
-rw-r--r--win/tclWinDde.c18
-rw-r--r--win/tclWinFile.c38
-rw-r--r--win/tclWinInit.c4
-rw-r--r--win/tclWinLoad.c14
-rw-r--r--win/tclWinNotify.c2
-rw-r--r--win/tclWinPipe.c16
-rw-r--r--win/tclWinReg.c6
-rw-r--r--win/tclWinSerial.c22
-rw-r--r--win/tclWinSock.c2
-rw-r--r--win/tclWinTest.c8
30 files changed, 134 insertions, 136 deletions
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index e7effd0..15b4fcd 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.c
@@ -204,7 +204,7 @@ TclMacOSXGetFileAttribute(
#else
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"Mac OS X file attributes not supported", TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (char *)NULL);
return TCL_ERROR;
#endif /* HAVE_GETATTRLIST */
}
@@ -336,7 +336,7 @@ TclMacOSXSetFileAttribute(
if (newRsrcForkSize != 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"setting nonzero rsrclength not supported", TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (char *)NULL);
return TCL_ERROR;
}
@@ -377,7 +377,7 @@ TclMacOSXSetFileAttribute(
#else
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"Mac OS X file attributes not supported", TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (char *)NULL);
return TCL_ERROR;
#endif
}
@@ -649,7 +649,7 @@ SetOSTypeFromAny(
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"expected Macintosh OS type but got \"%s\": ", string));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "MAC_OSTYPE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "MAC_OSTYPE", (char *)NULL);
}
result = TCL_ERROR;
} else {
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index 7bf0fb3..9123656 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -1322,7 +1322,7 @@ FileHandlerEventProc(
*
* TclpNotifierData --
*
- * This function returns a ClientData pointer to be associated
+ * This function returns a void pointer to be associated
* with a Tcl_AsyncHandler.
*
* Results:
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index ca64a11..9c8aaae 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -52,7 +52,7 @@ Pkgb_SubObjCmd(
|| (Tcl_GetIntFromObj(interp, objv[2], &second) != TCL_OK)) {
char buf[TCL_INTEGER_SPACE];
snprintf(buf, sizeof(buf), "%d", Tcl_GetErrorLine(interp));
- Tcl_AppendResult(interp, " in line: ", buf, (void *)NULL);
+ Tcl_AppendResult(interp, " in line: ", buf, (char *)NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(first - second));
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index 60e3864..7a84481 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -108,18 +108,18 @@ Pkgooa_Init(
}
if (tclStubsPtr == NULL) {
Tcl_AppendResult(interp, "Tcl stubs are not initialized, "
- "did you compile using -DUSE_TCL_STUBS? ", (void *)NULL);
+ "did you compile using -DUSE_TCL_STUBS? ", (char *)NULL);
return TCL_ERROR;
}
if (Tcl_OOInitStubs(interp) == NULL) {
return TCL_ERROR;
}
if (tclOOStubsPtr == NULL) {
- Tcl_AppendResult(interp, "TclOO stubs are not initialized", (void *)NULL);
+ Tcl_AppendResult(interp, "TclOO stubs are not initialized", (char *)NULL);
return TCL_ERROR;
}
if (tclOOIntStubsPtr == NULL) {
- Tcl_AppendResult(interp, "TclOO internal stubs are not initialized", (void *)NULL);
+ Tcl_AppendResult(interp, "TclOO internal stubs are not initialized", (char *)NULL);
return TCL_ERROR;
}
diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c
index 659e659..2a1733a 100644
--- a/unix/tclEpollNotfy.c
+++ b/unix/tclEpollNotfy.c
@@ -731,7 +731,7 @@ TclpWaitForEvent(
i = read(tsdPtr->triggerEventFd, &eventFdVal, sizeof(eventFdVal));
if ((i != sizeof(eventFdVal)) && (errno != EAGAIN)) {
Tcl_Panic("%s: read from %p->triggerEventFd: %s",
- "Tcl_WaitForEvent", (void *) tsdPtr, strerror(errno));
+ "Tcl_WaitForEvent", tsdPtr, strerror(errno));
}
continue;
}
@@ -743,7 +743,7 @@ TclpWaitForEvent(
sizeof(triggerPipeVal));
if ((i != sizeof(triggerPipeVal)) && (errno != EAGAIN)) {
Tcl_Panic("%s: read from %p->triggerPipe[0]: %s",
- "Tcl_WaitForEvent", (void *) tsdPtr, strerror(errno));
+ "Tcl_WaitForEvent", tsdPtr, strerror(errno));
}
continue;
}
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index 487af9c..062139a 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -740,7 +740,7 @@ TclpWaitForEvent(
i = read(tsdPtr->triggerPipe[0], buf, 1);
if ((i == -1) && (errno != EAGAIN)) {
Tcl_Panic("Tcl_WaitForEvent: read from %p->triggerPipe: %s",
- (void *) tsdPtr, strerror(errno));
+ tsdPtr, strerror(errno));
}
continue;
}
diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c
index 17fca04..2f6b6d4 100644
--- a/unix/tclLoadAix.c
+++ b/unix/tclLoadAix.c
@@ -122,7 +122,7 @@ dlopen(
for (mp = modList; mp; mp = mp->next) {
if (strcmp(mp->name, path) == 0) {
mp->refCnt++;
- return (void *) mp;
+ return (void *)mp;
}
}
@@ -142,7 +142,7 @@ dlopen(
* a normal char *. Ugly.
*/
- mp->entry = (void *) load((char *)path, L_NOAUTODEFER, NULL);
+ mp->entry = (void *)load((char *)path, L_NOAUTODEFER, NULL);
if (mp->entry == NULL) {
free(mp->name);
free(mp);
@@ -231,7 +231,7 @@ dlopen(
errvalid = 0;
}
- return (void *) mp;
+ return (void *)mp;
}
/*
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index ee92318..23565c5 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -172,7 +172,7 @@ FindSymbol(
Tcl_DString newName, ds; /* Buffers for converting the name to
* system encoding and prepending an
* underscore*/
- void *handle = (void *) loadHandle->clientData;
+ void *handle = loadHandle->clientData;
/* Native handle to the loaded library */
void *proc; /* Address corresponding to the resolved
* symbol */
@@ -232,7 +232,7 @@ FindSymbol(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\": %s", symbol, errorStr));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol,
- (void *)NULL);
+ (char *)NULL);
}
}
return proc;
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 6aa14b2..54290ec 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -422,7 +422,7 @@ FindSymbol(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\": %s", symbol, errMsg));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol,
- (void *)NULL);
+ (char *)NULL);
}
return (void *)proc;
}
diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c
index 5acd397..12df7e4 100644
--- a/unix/tclLoadNext.c
+++ b/unix/tclLoadNext.c
@@ -153,7 +153,7 @@ FindSymbol(
if (proc == NULL && interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\"", symbol));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (char *)NULL);
}
return proc;
}
diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c
index 43f29c8..1c8b53a 100644
--- a/unix/tclLoadOSF.c
+++ b/unix/tclLoadOSF.c
@@ -170,7 +170,7 @@ FindSymbol(
if (proc == NULL && interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\"", symbol));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (char *)NULL);
}
return proc;
}
diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c
index 63e9328..9ddfa56 100644
--- a/unix/tclLoadShl.c
+++ b/unix/tclLoadShl.c
@@ -141,12 +141,12 @@ FindSymbol(
*/
if (shl_findsym(&handle, symbol, (short) TYPE_PROCEDURE,
- (void *) &proc) != 0) {
+ (void *)&proc) != 0) {
Tcl_DStringInit(&newName);
TclDStringAppendLiteral(&newName, "_");
Tcl_DStringAppend(&newName, symbol, TCL_INDEX_NONE);
if (shl_findsym(&handle, Tcl_DStringValue(&newName),
- (short) TYPE_PROCEDURE, (void *) &proc) != 0) {
+ (short) TYPE_PROCEDURE, (void *)&proc) != 0) {
proc = NULL;
}
Tcl_DStringFree(&newName);
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index 252c493..bede898 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -336,7 +336,7 @@ TclpInitNotifier(void)
clazz.hbrBackground = NULL;
clazz.lpszMenuName = NULL;
clazz.lpszClassName = className;
- clazz.lpfnWndProc = (void *) NotifierProc;
+ clazz.lpfnWndProc = (void *)NotifierProc;
clazz.hIcon = NULL;
clazz.hCursor = NULL;
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 3e887d0..0f63293 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -112,7 +112,7 @@ typedef struct {
if (interp) { \
Tcl_SetObjResult(interp, Tcl_ObjPrintf( \
"%s not supported for this platform", (detail))); \
- Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (void *)NULL); \
+ Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (char *)NULL); \
}
/*
@@ -841,7 +841,7 @@ TtySetOptionProc(
"bad value for -handshake: must be one of"
" xonxoff, rtscts, dtrdsr or none", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -862,7 +862,7 @@ TtySetOptionProc(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -xchar: should be a list of"
" two elements with each a single 8-bit character", -1));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", (char *)NULL);
}
Tcl_Free(argv);
return TCL_ERROR;
@@ -928,7 +928,7 @@ TtySetOptionProc(
"bad value for -ttycontrol: should be a list of"
" signal,value pairs", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
Tcl_Free(argv);
return TCL_ERROR;
@@ -970,7 +970,7 @@ TtySetOptionProc(
"bad signal \"%s\" for -ttycontrol: must be"
" DTR, RTS or BREAK", argv[i]));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
Tcl_Free(argv);
return TCL_ERROR;
@@ -1002,7 +1002,7 @@ TtySetOptionProc(
"bad mode \"%s\" for -closemode: must be"
" default, discard, or drain", value));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1060,7 +1060,7 @@ TtySetOptionProc(
"bad mode \"%s\" for -inputmode: must be"
" normal, password, raw, or reset", value));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1638,7 +1638,7 @@ TtyParseMode(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s: should be baud,parity,data,stop", bad));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1668,7 +1668,7 @@ TtyParseMode(
"n, o, or e"
#endif /* PAREXT */
));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1677,7 +1677,7 @@ TtyParseMode(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s data: should be 5, 6, 7, or 8", bad));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1685,7 +1685,7 @@ TtyParseMode(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s stop: should be 1 or 2", bad));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1792,7 +1792,7 @@ TclpOpenFileChannel(
if (interp != (Tcl_Interp *) NULL) {
Tcl_AppendResult(interp, "couldn't open \"",
TclGetString(pathPtr), "\": filename is invalid on this platform",
- (void *)NULL);
+ (char *)NULL);
}
return NULL;
}
@@ -2085,13 +2085,13 @@ Tcl_GetOpenFile(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" wasn't opened for writing", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "NOT_WRITABLE",
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
} else if (!forWriting && !(chanMode & TCL_READABLE)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" wasn't opened for reading", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "NOT_READABLE",
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
}
@@ -2123,7 +2123,7 @@ Tcl_GetOpenFile(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot get a FILE * for \"%s\"", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL",
- "FILE_FAILURE", (void *)NULL);
+ "FILE_FAILURE", (char *)NULL);
return TCL_ERROR;
}
*filePtr = f;
@@ -2134,7 +2134,7 @@ Tcl_GetOpenFile(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" cannot be used to get a FILE *", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "NO_DESCRIPTOR",
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
}
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 08b9d27..b65cdb1 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1532,7 +1532,7 @@ SetGroupAttribute(
" group \"%s\" does not exist",
TclGetString(fileName), string));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SETGRP",
- "NO_GROUP", (void *)NULL);
+ "NO_GROUP", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1603,7 +1603,7 @@ SetOwnerAttribute(
" user \"%s\" does not exist",
TclGetString(fileName), string));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SETOWN",
- "NO_USER", (void *)NULL);
+ "NO_USER", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1698,7 +1698,7 @@ SetPermissionsAttribute(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"unknown permission string format \"%s\"",
modeStringPtr));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "PERMISSION", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "PERMISSION", (char *)NULL);
}
return TCL_ERROR;
}
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 402e04f..984ee2f 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -131,12 +131,12 @@ TclpAlertNotifier(
if (write(tsdPtr->triggerEventFd, &eventFdVal,
sizeof(eventFdVal)) != sizeof(eventFdVal)) {
Tcl_Panic("Tcl_AlertNotifier: unable to write to %p->triggerEventFd",
- (void *) tsdPtr);
+ tsdPtr);
}
#else
if (write(tsdPtr->triggerPipe[1], "", 1) != 1) {
Tcl_Panic("Tcl_AlertNotifier: unable to write to %p->triggerPipe",
- (void *) tsdPtr);
+ tsdPtr);
}
#endif /* NOTIFIER_EPOLL && HAVE_EVENTFD */
#endif /* NOTIFIER_SELECT */
@@ -484,7 +484,7 @@ AtForkChild(void)
*
* TclpNotifierData --
*
- * This function returns a ClientData pointer to be associated
+ * This function returns a void pointer to be associated
* with a Tcl_AsyncHandler.
*
* Results:
@@ -503,7 +503,7 @@ TclpNotifierData(void)
#if defined(NOTIFIER_EPOLL) || defined(NOTIFIER_KQUEUE)
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- return (void *) tsdPtr;
+ return tsdPtr;
#else
return NULL;
#endif
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index cdb1caa..7fe62f7 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -164,7 +164,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
if (i >= MAX_PIPES) {
- Tcl_AppendResult(interp, "bad index ", objv[2], (void *)NULL);
+ Tcl_AppendResult(interp, "bad index ", objv[2], (char *)NULL);
return TCL_ERROR;
}
pipePtr = &testPipes[i];
@@ -193,7 +193,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
snprintf(buf, sizeof(buf), "%d %d", pipePtr->readCount, pipePtr->writeCount);
- Tcl_AppendResult(interp, buf, (void *)NULL);
+ Tcl_AppendResult(interp, buf, (char *)NULL);
} else if (strcmp(Tcl_GetString(objv[1]), "create") == 0) {
if (objc != 5) {
Tcl_WrongNumArgs(interp, 2, objv, "index readMode writeMode");
@@ -202,7 +202,7 @@ TestfilehandlerCmd(
if (pipePtr->readFile == NULL) {
if (!TclpCreatePipe(&pipePtr->readFile, &pipePtr->writeFile)) {
Tcl_AppendResult(interp, "couldn't open pipe: ",
- Tcl_PosixError(interp), (void *)NULL);
+ Tcl_PosixError(interp), (char *)NULL);
return TCL_ERROR;
}
#ifdef O_NONBLOCK
@@ -210,7 +210,7 @@ TestfilehandlerCmd(
fcntl(GetFd(pipePtr->writeFile), F_SETFL, O_NONBLOCK);
#else
Tcl_AppendResult(interp, "can't make pipes non-blocking",
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
#endif
}
@@ -226,7 +226,7 @@ TestfilehandlerCmd(
Tcl_CreateFileHandler(GetFd(pipePtr->readFile), 0,
TestFileHandlerProc, pipePtr);
} else {
- Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[3]), "\"", (void *)NULL);
+ Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[3]), "\"", (char *)NULL);
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[4]), "writable") == 0) {
@@ -238,7 +238,7 @@ TestfilehandlerCmd(
Tcl_CreateFileHandler(GetFd(pipePtr->writeFile), 0,
TestFileHandlerProc, pipePtr);
} else {
- Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[4]), "\"", (void *)NULL);
+ Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[4]), "\"", (char *)NULL);
return TCL_ERROR;
}
} else if (strcmp(Tcl_GetString(objv[1]), "empty") == 0) {
@@ -270,7 +270,7 @@ TestfilehandlerCmd(
memset(buffer, 'b', 10);
TclFormatInt(buf, write(GetFd(pipePtr->writeFile), buffer, 10));
- Tcl_AppendResult(interp, buf, (void *)NULL);
+ Tcl_AppendResult(interp, buf, (char *)NULL);
} else if (strcmp(Tcl_GetString(objv[1]), "oneevent") == 0) {
Tcl_DoOneEvent(TCL_FILE_EVENTS|TCL_DONT_WAIT);
} else if (strcmp(Tcl_GetString(objv[1]), "wait") == 0) {
@@ -279,7 +279,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
if (pipePtr->readFile == NULL) {
- Tcl_AppendResult(interp, "pipe ", Tcl_GetString(objv[2]), " doesn't exist", (void *)NULL);
+ Tcl_AppendResult(interp, "pipe ", Tcl_GetString(objv[2]), " doesn't exist", (char *)NULL);
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[3]), "readable") == 0) {
@@ -304,7 +304,7 @@ TestfilehandlerCmd(
} else {
Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
"\": must be close, clear, counts, create, empty, fill, "
- "fillpartial, oneevent, wait, or windowevent", (void *)NULL);
+ "fillpartial, oneevent, wait, or windowevent", (char *)NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -371,13 +371,13 @@ TestfilewaitCmd(
mask = TCL_WRITABLE|TCL_READABLE;
} else {
Tcl_AppendResult(interp, "bad argument \"", Tcl_GetString(objv[2]),
- "\": must be readable, writable, or both", (void *)NULL);
+ "\": must be readable, writable, or both", (char *)NULL);
return TCL_ERROR;
}
if (Tcl_GetChannelHandle(channel,
(mask & TCL_READABLE) ? TCL_READABLE : TCL_WRITABLE,
(void **) &data) != TCL_OK) {
- Tcl_AppendResult(interp, "couldn't get channel file", (void *)NULL);
+ Tcl_AppendResult(interp, "couldn't get channel file", (char *)NULL);
return TCL_ERROR;
}
fd = PTR2INT(data);
@@ -469,7 +469,7 @@ TestforkCmd(
pid = fork();
if (pid == -1) {
Tcl_AppendResult(interp,
- "Cannot fork", (void *)NULL);
+ "Cannot fork", (char *)NULL);
return TCL_ERROR;
}
/* Only needed when pthread_atfork is not present,
@@ -520,11 +520,11 @@ TestalarmCmd(
*/
action.sa_handler = AlarmHandler;
- memset((void *) &action.sa_mask, 0, sizeof(sigset_t));
+ memset((void *)&action.sa_mask, 0, sizeof(sigset_t));
action.sa_flags = SA_RESTART;
if (sigaction(SIGALRM, &action, NULL) < 0) {
- Tcl_AppendResult(interp, "sigaction: ", Tcl_PosixError(interp), (void *)NULL);
+ Tcl_AppendResult(interp, "sigaction: ", Tcl_PosixError(interp), (char *)NULL);
return TCL_ERROR;
}
(void) alarm(sec);
@@ -533,7 +533,7 @@ TestalarmCmd(
Tcl_AppendResult(interp,
"warning: sigaction SA_RESTART not support on this platform",
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
#endif
}
@@ -584,7 +584,7 @@ TestgotsigCmd(
TCL_UNUSED(int) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *))
{
- Tcl_AppendResult(interp, gotsig, (void *)NULL);
+ Tcl_AppendResult(interp, gotsig, (char *)NULL);
gotsig = "0";
return TCL_OK;
}
@@ -636,7 +636,7 @@ TestchmodCmd(
}
if (chmod(translated, mode) != 0) {
Tcl_AppendResult(interp, translated, ": ", Tcl_PosixError(interp),
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
}
Tcl_DStringFree(&buffer);
diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c
index c6bcc18..ad7cb77 100644
--- a/unix/tclXtTest.c
+++ b/unix/tclXtTest.c
@@ -117,7 +117,7 @@ TesteventloopCmd(
framePtr = oldFramePtr;
} else {
Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
- "\": must be done or wait", (void *)NULL);
+ "\": must be done or wait", (char *)NULL);
return TCL_ERROR;
}
return TCL_OK;
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index afd5de1..73b61ab 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -781,7 +781,7 @@ FileGetHandleProc(
return TCL_ERROR;
}
- *handlePtr = (void *) infoPtr->handle;
+ *handlePtr = (void *)infoPtr->handle;
return TCL_OK;
}
@@ -826,7 +826,7 @@ StoreElementInDict(
* duplicate keys.
*/
- Tcl_Obj *nameObj = Tcl_NewStringObj(name, -1);
+ Tcl_Obj *nameObj = Tcl_NewStringObj(name, TCL_INDEX_NONE);
Tcl_DictObjPut(NULL, dictObj, nameObj, valueObj);
}
@@ -910,9 +910,9 @@ StatOpenFile(
* Anything else and we definitely couldn't have got here anyway.
*/
if (attr & FILE_ATTRIBUTE_DIRECTORY) {
- STORE_ELEM("type", Tcl_NewStringObj("directory", -1));
+ STORE_ELEM("type", Tcl_NewStringObj("directory", TCL_INDEX_NONE));
} else {
- STORE_ELEM("type", Tcl_NewStringObj("file", -1));
+ STORE_ELEM("type", Tcl_NewStringObj("file", TCL_INDEX_NONE));
}
#undef STORE_ELEM
@@ -1194,7 +1194,7 @@ TclpOpenFileChannel(
"couldn't open \"%s\": bad file type",
TclGetString(pathPtr)));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "BAD_TYPE",
- (void *)NULL);
+ (char *)NULL);
break;
}
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index c77d97f..4ee8033 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -2303,7 +2303,7 @@ ConsoleSetOptionProc(
"bad mode \"%s\" for -inputmode: must be"
" normal, password, raw, or reset", value));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
return TCL_ERROR;
}
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index d883bac..f36407d 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -578,7 +578,7 @@ ExecuteRemoteObject(
Tcl_SetObjResult(riPtr->interp, Tcl_NewStringObj("permission denied: "
"a handler procedure must be defined for use in a safe "
"interp", -1));
- Tcl_SetErrorCode(riPtr->interp, "TCL", "DDE", "SECURITY_CHECK", (void *)NULL);
+ Tcl_SetErrorCode(riPtr->interp, "TCL", "DDE", "SECURITY_CHECK", (char *)NULL);
result = TCL_ERROR;
}
@@ -1050,7 +1050,7 @@ MakeDdeConnection(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"no registered server named \"%s\"", Tcl_DStringValue(&dString)));
Tcl_DStringFree(&dString);
- Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1281,7 +1281,7 @@ SetDdeError(
}
Tcl_SetObjResult(interp, Tcl_NewStringObj(errorMessage, -1));
- Tcl_SetErrorCode(interp, "TCL", "DDE", errorCode, (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", errorCode, (char *)NULL);
}
/*
@@ -1568,7 +1568,7 @@ DdeObjCmd(
Tcl_SetObjResult(interp,
Tcl_NewStringObj("cannot execute null data", -1));
Tcl_DStringFree(&dsBuf);
- Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (char *)NULL);
result = TCL_ERROR;
break;
}
@@ -1618,7 +1618,7 @@ DdeObjCmd(
if (length == 0) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("cannot request value of null data", -1));
- Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (char *)NULL);
result = TCL_ERROR;
goto cleanup;
}
@@ -1684,7 +1684,7 @@ DdeObjCmd(
if (length == 0) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("cannot have a null item", -1));
- Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (char *)NULL);
result = TCL_ERROR;
goto cleanup;
}
@@ -1738,7 +1738,7 @@ DdeObjCmd(
if (serviceName == NULL) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("invalid service name \"\"", -1));
- Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", (char *)NULL);
result = TCL_ERROR;
goto cleanup;
}
@@ -1787,7 +1787,7 @@ DdeObjCmd(
"permission denied: a handler procedure must be"
" defined for use in a safe interp", -1));
Tcl_SetErrorCode(interp, "TCL", "DDE", "SECURITY_CHECK",
- (void *)NULL);
+ (char *)NULL);
result = TCL_ERROR;
}
@@ -1852,7 +1852,7 @@ DdeObjCmd(
invalidServerResponse:
Tcl_SetObjResult(interp,
Tcl_NewStringObj("invalid data returned from server", -1));
- Tcl_SetErrorCode(interp, "TCL", "DDE", "BAD_RESPONSE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "DDE", "BAD_RESPONSE", (char *)NULL);
result = TCL_ERROR;
goto cleanup;
}
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index d572628..17f4898 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1535,12 +1535,12 @@ TclpGetUserHome(
result[i] = '/';
}
}
- NetApiBufferFree((void *) uiPtr);
+ NetApiBufferFree((void *)uiPtr);
}
Tcl_DStringFree(&ds);
}
if (wDomain != NULL) {
- NetApiBufferFree((void *) wDomain);
+ NetApiBufferFree((void *)wDomain);
}
return result;
@@ -2750,27 +2750,25 @@ TclpObjNormalizePath(
* Convert the entire known path to long form.
*/
- if (1) {
- WCHAR wpath[MAX_PATH];
- const WCHAR *nativePath;
- DWORD wpathlen;
+ WCHAR wpath[MAX_PATH];
+ const WCHAR *nativePath;
+ DWORD wpathlen;
- Tcl_DStringInit(&ds);
- nativePath =
- Tcl_UtfToWCharDString(path, lastValidPathEnd - path, &ds);
- wpathlen = GetLongPathNameProc(nativePath,
- (WCHAR *) wpath, MAX_PATH);
- /*
- * We have to make the drive letter uppercase.
- */
+ Tcl_DStringInit(&ds);
+ nativePath =
+ Tcl_UtfToWCharDString(path, lastValidPathEnd - path, &ds);
+ wpathlen = GetLongPathNameProc(nativePath,
+ (WCHAR *) wpath, MAX_PATH);
+ /*
+ * We have to make the drive letter uppercase.
+ */
- if (wpath[0] >= 'a') {
- wpath[0] -= ('a' - 'A');
- }
- Tcl_DStringAppend(&dsNorm, (const char *) wpath,
- wpathlen * sizeof(WCHAR));
- Tcl_DStringFree(&ds);
+ if (wpath[0] >= 'a') {
+ wpath[0] -= ('a' - 'A');
}
+ Tcl_DStringAppend(&dsNorm, (const char *) wpath,
+ wpathlen * sizeof(WCHAR));
+ Tcl_DStringFree(&ds);
#endif /* TclNORM_LONG_PATH */
}
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 4ed5c6d..4234ceb 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -575,7 +575,7 @@ TclpFindVariable(
* entries in environ (for unsuccessful
* searches). */
{
- Tcl_Size i, length, result = -1;
+ Tcl_Size i, length, result = TCL_INDEX_NONE;
const WCHAR *env;
const char *p1, *p2;
char *envUpper, *nameUpper;
@@ -599,7 +599,7 @@ TclpFindVariable(
*/
Tcl_DStringInit(&envString);
- envUpper = Tcl_WCharToUtfDString(env, -1, &envString);
+ envUpper = Tcl_WCharToUtfDString(env, TCL_INDEX_NONE, &envString);
p1 = strchr(envUpper, '=');
if (p1 == NULL) {
continue;
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index 62590ef..1cc7ae1 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -133,32 +133,32 @@ TclpDlopen(
if (interp) {
switch (lastError) {
case ERROR_MOD_NOT_FOUND:
- Tcl_SetErrorCode(interp, "WIN_LOAD", "MOD_NOT_FOUND", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_LOAD", "MOD_NOT_FOUND", (char *)NULL);
goto notFoundMsg;
case ERROR_DLL_NOT_FOUND:
- Tcl_SetErrorCode(interp, "WIN_LOAD", "DLL_NOT_FOUND", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_LOAD", "DLL_NOT_FOUND", (char *)NULL);
notFoundMsg:
Tcl_AppendToObj(errMsg, "this library or a dependent library"
" could not be found in library path", TCL_INDEX_NONE);
break;
case ERROR_PROC_NOT_FOUND:
- Tcl_SetErrorCode(interp, "WIN_LOAD", "PROC_NOT_FOUND", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_LOAD", "PROC_NOT_FOUND", (char *)NULL);
Tcl_AppendToObj(errMsg, "A function specified in the import"
" table could not be resolved by the system. Windows"
" is not telling which one, I'm sorry.", TCL_INDEX_NONE);
break;
case ERROR_INVALID_DLL:
- Tcl_SetErrorCode(interp, "WIN_LOAD", "INVALID_DLL", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_LOAD", "INVALID_DLL", (char *)NULL);
Tcl_AppendToObj(errMsg, "this library or a dependent library"
" is damaged", TCL_INDEX_NONE);
break;
case ERROR_DLL_INIT_FAILED:
- Tcl_SetErrorCode(interp, "WIN_LOAD", "DLL_INIT_FAILED", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_LOAD", "DLL_INIT_FAILED", (char *)NULL);
Tcl_AppendToObj(errMsg, "the library initialization"
" routine failed", TCL_INDEX_NONE);
break;
case ERROR_BAD_EXE_FORMAT:
- Tcl_SetErrorCode(interp, "WIN_LOAD", "BAD_EXE_FORMAT", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_LOAD", "BAD_EXE_FORMAT", (char *)NULL);
Tcl_AppendToObj(errMsg, "Bad exe format. Possibly a 32/64-bit mismatch.", TCL_INDEX_NONE);
break;
default:
@@ -227,7 +227,7 @@ FindSymbol(
if (proc == NULL && interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\"", symbol));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (char *)NULL);
}
return proc;
}
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 758276e..2c93a41 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -425,7 +425,7 @@ NotifierProc(
*
* TclpNotifierData --
*
- * This function returns a ClientData pointer to be associated
+ * This function returns a void pointer to be associated
* with a Tcl_AsyncHandler.
*
* Results:
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 16efd6a..d587dda 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1334,7 +1334,7 @@ ApplicationType(
}
header.e_magic = 0;
- ReadFile(hFile, (void *) &header, sizeof(header), &read, NULL);
+ ReadFile(hFile, (void *)&header, sizeof(header), &read, NULL);
if (header.e_magic != IMAGE_DOS_SIGNATURE) {
/*
* Doesn't have the magic number for relocatable executables. If
@@ -1369,7 +1369,7 @@ ApplicationType(
buf[0] = '\0';
SetFilePointer(hFile, header.e_lfanew, NULL, FILE_BEGIN);
- ReadFile(hFile, (void *) buf, 2, &read, NULL);
+ ReadFile(hFile, (void *)buf, 2, &read, NULL);
CloseHandle(hFile);
if ((buf[0] == 'N') && (buf[1] == 'E')) {
@@ -1880,10 +1880,10 @@ Tcl_CreatePipe(
return TCL_ERROR;
}
- *rchan = Tcl_MakeFileChannel((void *) readHandle, TCL_READABLE);
+ *rchan = Tcl_MakeFileChannel((void *)readHandle, TCL_READABLE);
Tcl_RegisterChannel(interp, *rchan);
- *wchan = Tcl_MakeFileChannel((void *) writeHandle, TCL_WRITABLE);
+ *wchan = Tcl_MakeFileChannel((void *)writeHandle, TCL_WRITABLE);
Tcl_RegisterChannel(interp, *wchan);
return TCL_OK;
@@ -2120,7 +2120,7 @@ PipeClose2Proc(
if (pipePtr->errorFile) {
WinFile *filePtr = (WinFile *) pipePtr->errorFile;
- errChan = Tcl_MakeFileChannel((void *) filePtr->handle,
+ errChan = Tcl_MakeFileChannel((void *)filePtr->handle,
TCL_READABLE);
Tcl_Free(filePtr);
Tcl_SetChannelOption(NULL, errChan, "-profile", "replace");
@@ -2515,12 +2515,12 @@ PipeGetHandleProc(
if (direction == TCL_READABLE && infoPtr->readFile) {
filePtr = (WinFile*) infoPtr->readFile;
- *handlePtr = (void *) filePtr->handle;
+ *handlePtr = (void *)filePtr->handle;
return TCL_OK;
}
if (direction == TCL_WRITABLE && infoPtr->writeFile) {
filePtr = (WinFile*) infoPtr->writeFile;
- *handlePtr = (void *) filePtr->handle;
+ *handlePtr = (void *)filePtr->handle;
return TCL_OK;
}
return TCL_ERROR;
@@ -3266,7 +3266,7 @@ TclpOpenTemporaryFile(
TclDecrRefCount(tmpObj);
}
- return Tcl_MakeFileChannel((void *) handle,
+ return Tcl_MakeFileChannel((void *)handle,
TCL_READABLE|TCL_WRITABLE);
gotError:
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index a0b4e90..68e22cb 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -466,7 +466,7 @@ DeleteKey(
if (*keyName == '\0') {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("bad key: cannot delete root keys", -1));
- Tcl_SetErrorCode(interp, "WIN_REG", "DEL_ROOT_KEY", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_REG", "DEL_ROOT_KEY", (char *)NULL);
Tcl_Free(buffer);
return TCL_ERROR;
}
@@ -1146,7 +1146,7 @@ ParseKeyName(
if (!rootName) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad key \"%s\": must start with a valid root", name));
- Tcl_SetErrorCode(interp, "WIN_REG", "NO_ROOT_KEY", (void *)NULL);
+ Tcl_SetErrorCode(interp, "WIN_REG", "NO_ROOT_KEY", (char *)NULL);
return TCL_ERROR;
}
@@ -1538,7 +1538,7 @@ AppendSystemError(
}
snprintf(id, sizeof(id), "%ld", error);
- Tcl_SetErrorCode(interp, "WINDOWS", id, msg, (void *)NULL);
+ Tcl_SetErrorCode(interp, "WINDOWS", id, msg, (char *)NULL);
Tcl_AppendToObj(resultPtr, msg, length);
Tcl_SetObjResult(interp, resultPtr);
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 14f36fd..c18837e 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -1255,7 +1255,7 @@ SerialGetHandleProc(
{
SerialInfo *infoPtr = (SerialInfo *) instanceData;
- *handlePtr = (void *) infoPtr->handle;
+ *handlePtr = (void *)infoPtr->handle;
return TCL_OK;
}
@@ -1655,7 +1655,7 @@ SerialSetOptionProc(
"bad mode \"%s\" for -closemode: must be"
" default, discard, or drain", value));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", (void *)NULL);
+ "VALUE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1680,7 +1680,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad value \"%s\" for -mode: should be baud,parity,data,stop",
value));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1744,7 +1744,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad value \"%s\" for -handshake: must be one of"
" xonxoff, rtscts, dtrdsr or none", value));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "HANDSHAKE", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "HANDSHAKE", (char *)NULL);
}
return TCL_ERROR;
}
@@ -1773,7 +1773,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -xchar: should be a list of"
" two elements with each a single 8-bit character", TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", (char *)NULL);
}
Tcl_Free((void *)argv);
return TCL_ERROR;
@@ -1830,7 +1830,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad value \"%s\" for -ttycontrol: should be "
"a list of signal,value pairs", value));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "TTYCONTROL", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "TTYCONTROL", (char *)NULL);
}
Tcl_Free((void *)argv);
return TCL_ERROR;
@@ -1848,7 +1848,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't set DTR signal", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "OPERATION",
- "FCONFIGURE", "TTY_SIGNAL", (void *)NULL);
+ "FCONFIGURE", "TTY_SIGNAL", (char *)NULL);
}
res = TCL_ERROR;
break;
@@ -1860,7 +1860,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't set RTS signal", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "OPERATION",
- "FCONFIGURE", "TTY_SIGNAL", (void *)NULL);
+ "FCONFIGURE", "TTY_SIGNAL", (char *)NULL);
}
res = TCL_ERROR;
break;
@@ -1872,7 +1872,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't set BREAK signal", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "OPERATION",
- "FCONFIGURE", "TTY_SIGNAL", (void *)NULL);
+ "FCONFIGURE", "TTY_SIGNAL", (char *)NULL);
}
res = TCL_ERROR;
break;
@@ -1883,7 +1883,7 @@ SerialSetOptionProc(
"bad signal name \"%s\" for -ttycontrol: must be"
" DTR, RTS or BREAK", argv[i]));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "TTY_SIGNAL",
- (void *)NULL);
+ (char *)NULL);
}
res = TCL_ERROR;
break;
@@ -1923,7 +1923,7 @@ SerialSetOptionProc(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad value \"%s\" for -sysbuffer: should be "
"a list of one or two integers > 0", value));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SYS_BUFFER", (void *)NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SYS_BUFFER", (char *)NULL);
}
return TCL_ERROR;
}
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 2d083bb..c51d69d 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1730,7 +1730,7 @@ TcpConnect(
* Set kernel space buffering
*/
- TclSockMinimumBuffers((void *) statePtr->sockets->fd,
+ TclSockMinimumBuffers((void *)statePtr->sockets->fd,
TCP_BUFFER_SIZE);
/*
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index 1a6a3db..753fe12 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -152,7 +152,7 @@ TesteventloopCmd(
framePtr = oldFramePtr;
} else {
Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
- "\": must be done or wait", (void *)NULL);
+ "\": must be done or wait", (char *)NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -206,11 +206,11 @@ TestvolumetypeCmd(
if (found == 0) {
Tcl_AppendResult(interp, "could not get volume type for \"",
- (path?path:""), "\"", (void *)NULL);
+ (path?path:""), "\"", (char *)NULL);
Tcl_WinConvertError(GetLastError());
return TCL_ERROR;
}
- Tcl_AppendResult(interp, volType, (void *)NULL);
+ Tcl_AppendResult(interp, volType, (char *)NULL);
return TCL_OK;
#undef VOL_BUF_SIZE
}
@@ -657,7 +657,7 @@ TestchmodCmd(
}
if (TestplatformChmod(translated, mode) != 0) {
Tcl_AppendResult(interp, translated, ": ", Tcl_PosixError(interp),
- (void *)NULL);
+ (char *)NULL);
return TCL_ERROR;
}
Tcl_DStringFree(&buffer);