summaryrefslogtreecommitdiffstats
path: root/win/tclWinSerial.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-20 13:14:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-20 13:14:26 (GMT)
commita9b046b5bd7c666a406a17cbb0d86a2842091bac (patch)
treea58a10a709008a92c2bd3cb895fcfac27531c9be /win/tclWinSerial.c
parent7208478d1c5c7ed65b3d0bdaced2740830f3859b (diff)
downloadtcl-a9b046b5bd7c666a406a17cbb0d86a2842091bac.zip
tcl-a9b046b5bd7c666a406a17cbb0d86a2842091bac.tar.gz
tcl-a9b046b5bd7c666a406a17cbb0d86a2842091bac.tar.bz2
(backport) more spacing/formatting tweaks. For now, macosx/unix/win only.
Diffstat (limited to 'win/tclWinSerial.c')
-rw-r--r--win/tclWinSerial.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 7e6b76a..d343d87 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -165,30 +165,30 @@ static COMMTIMEOUTS no_timeout = {
* Declarations for functions used only in this file.
*/
-static int SerialBlockProc(ClientData instanceData, int mode);
-static void SerialCheckProc(ClientData clientData, int flags);
-static int SerialCloseProc(ClientData instanceData,
+static int SerialBlockProc(void *instanceData, int mode);
+static void SerialCheckProc(void *clientData, int flags);
+static int SerialCloseProc(void *instanceData,
Tcl_Interp *interp, int flags);
static int SerialEventProc(Tcl_Event *evPtr, int flags);
-static void SerialExitHandler(ClientData clientData);
-static int SerialGetHandleProc(ClientData instanceData,
- int direction, ClientData *handlePtr);
+static void SerialExitHandler(void *clientData);
+static int SerialGetHandleProc(void *instanceData,
+ int direction, void **handlePtr);
static ThreadSpecificData *SerialInit(void);
-static int SerialInputProc(ClientData instanceData, char *buf,
+static int SerialInputProc(void *instanceData, char *buf,
int toRead, int *errorCode);
-static int SerialOutputProc(ClientData instanceData,
+static int SerialOutputProc(void *instanceData,
const char *buf, int toWrite, int *errorCode);
-static void SerialSetupProc(ClientData clientData, int flags);
-static void SerialWatchProc(ClientData instanceData, int mask);
-static void ProcExitHandler(ClientData clientData);
-static int SerialGetOptionProc(ClientData instanceData,
+static void SerialSetupProc(void *clientData, int flags);
+static void SerialWatchProc(void *instanceData, int mask);
+static void ProcExitHandler(void *clientData);
+static int SerialGetOptionProc(void *instanceData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
-static int SerialSetOptionProc(ClientData instanceData,
+static int SerialSetOptionProc(void *instanceData,
Tcl_Interp *interp, const char *optionName,
const char *value);
static DWORD WINAPI SerialWriterThread(LPVOID arg);
-static void SerialThreadActionProc(ClientData instanceData,
+static void SerialThreadActionProc(void *instanceData,
int action);
static int SerialBlockingRead(SerialInfo *infoPtr, LPVOID buf,
DWORD bufSize, LPDWORD lpRead, LPOVERLAPPED osPtr);
@@ -285,7 +285,7 @@ SerialInit(void)
static void
SerialExitHandler(
- TCL_UNUSED(ClientData))
+ TCL_UNUSED(void *))
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
SerialInfo *infoPtr;
@@ -323,7 +323,7 @@ SerialExitHandler(
static void
ProcExitHandler(
- TCL_UNUSED(ClientData))
+ TCL_UNUSED(void *))
{
Tcl_MutexLock(&serialMutex);
initialized = 0;
@@ -406,7 +406,7 @@ SerialGetMilliseconds(void)
void
SerialSetupProc(
- TCL_UNUSED(ClientData),
+ TCL_UNUSED(void *),
int flags) /* Event flags as passed to Tcl_DoOneEvent. */
{
SerialInfo *infoPtr;
@@ -461,7 +461,7 @@ SerialSetupProc(
static void
SerialCheckProc(
- TCL_UNUSED(ClientData),
+ TCL_UNUSED(void *),
int flags) /* Event flags as passed to Tcl_DoOneEvent. */
{
SerialInfo *infoPtr;
@@ -561,7 +561,7 @@ SerialCheckProc(
static int
SerialBlockProc(
- ClientData instanceData, /* Instance data for channel. */
+ void *instanceData, /* Instance data for channel. */
int mode) /* TCL_MODE_BLOCKING or
* TCL_MODE_NONBLOCKING. */
{
@@ -600,7 +600,7 @@ SerialBlockProc(
static int
SerialCloseProc(
- ClientData instanceData, /* Pointer to SerialInfo structure. */
+ void *instanceData, /* Pointer to SerialInfo structure. */
TCL_UNUSED(Tcl_Interp *),
int flags)
{
@@ -855,7 +855,7 @@ SerialBlockingWrite(
static int
SerialInputProc(
- ClientData instanceData, /* Serial state. */
+ void *instanceData, /* Serial state. */
char *buf, /* Where to store data read. */
int bufSize, /* How much space is available in the
* buffer? */
@@ -962,7 +962,7 @@ SerialInputProc(
static int
SerialOutputProc(
- ClientData instanceData, /* Serial state. */
+ void *instanceData, /* Serial state. */
const char *buf, /* The data buffer. */
int toWrite, /* How many bytes to write? */
int *errorCode) /* Where to store error code. */
@@ -1192,7 +1192,7 @@ SerialEventProc(
static void
SerialWatchProc(
- ClientData instanceData, /* Serial state. */
+ void *instanceData, /* Serial state. */
int mask) /* What events to watch for, OR-ed combination
* of TCL_READABLE, TCL_WRITABLE and
* TCL_EXCEPTION. */
@@ -1249,13 +1249,13 @@ SerialWatchProc(
static int
SerialGetHandleProc(
- ClientData instanceData, /* The serial state. */
+ void *instanceData, /* The serial state. */
TCL_UNUSED(int) /*direction*/,
- ClientData *handlePtr) /* Where to store the handle. */
+ void **handlePtr) /* Where to store the handle. */
{
SerialInfo *infoPtr = (SerialInfo *) instanceData;
- *handlePtr = (ClientData) infoPtr->handle;
+ *handlePtr = (void *)infoPtr->handle;
return TCL_OK;
}
@@ -1618,7 +1618,7 @@ SerialModemStatusStr(
static int
SerialSetOptionProc(
- ClientData instanceData, /* File state. */
+ void *instanceData, /* File state. */
Tcl_Interp *interp, /* For error reporting - can be NULL. */
const char *optionName, /* Which option to set? */
const char *value) /* New value for option. */
@@ -2042,7 +2042,7 @@ SerialSetOptionProc(
static int
SerialGetOptionProc(
- ClientData instanceData, /* File state. */
+ void *instanceData, /* File state. */
Tcl_Interp *interp, /* For error reporting - can be NULL. */
const char *optionName, /* Option to get. */
Tcl_DString *dsPtr) /* Where to store value(s). */
@@ -2279,7 +2279,7 @@ SerialGetOptionProc(
static void
SerialThreadActionProc(
- ClientData instanceData,
+ void *instanceData,
int action)
{
SerialInfo *infoPtr = (SerialInfo *) instanceData;