summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinChan.c5
-rw-r--r--win/tclWinConsole.c5
-rw-r--r--win/tclWinFCmd.c1
-rw-r--r--win/tclWinInt.h4
-rw-r--r--win/tclWinPipe.c1
-rw-r--r--win/tclWinPort.h3
-rw-r--r--win/tclWinSerial.c2
-rw-r--r--win/tclWinThrd.c24
-rw-r--r--win/tclWinTime.c1
9 files changed, 31 insertions, 15 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 4c08464..8715b4d 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -108,10 +108,10 @@ static Tcl_Channel OpenFileChannel(HANDLE handle, char *channelName,
static const Tcl_ChannelType fileChannelType = {
"file", /* Type name. */
TCL_CHANNEL_VERSION_5, /* v5 channel */
- NULL, /* Close proc. */
+ NULL, /* Close proc. */
FileInputProc, /* Input proc. */
FileOutputProc, /* Output proc. */
- NULL,
+ NULL,
NULL, /* Set option proc. */
FileGetOptionProc, /* Get option proc. */
FileWatchProc, /* Set up the notifier to watch the channel. */
@@ -140,6 +140,7 @@ static const Tcl_ChannelType fileChannelType = {
#define POSIX_EPOCH_AS_FILETIME \
((long long) 116444736 * (long long) 1000000000)
+
/*
*----------------------------------------------------------------------
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index 8b289b1..b7288b7 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -280,6 +280,7 @@ static Tcl_ThreadDataKey dataKey;
*/
SRWLOCK gConsoleLock;
+
/* Process-wide list of console handles. Access control through gConsoleLock */
static ConsoleHandleInfo *gConsoleHandleInfoList;
@@ -904,7 +905,7 @@ ConsoleCheckProc(
/* See note above loop why this can be accessed without locks */
chanInfoPtr->flags |= CONSOLE_EVENT_QUEUED;
chanInfoPtr->numRefs += 1; /* So it does not go away while event
- * is in queue */
+ is in queue */
evPtr->header.proc = ConsoleEventProc;
evPtr->chanInfoPtr = chanInfoPtr;
Tcl_QueueEvent((Tcl_Event *) evPtr, TCL_QUEUE_TAIL);
@@ -972,7 +973,7 @@ ConsoleBlockModeProc(
static int
ConsoleCloseProc(
- void *instanceData, /* Pointer to ConsoleChannelInfo structure. */
+ void *instanceData, /* Pointer to ConsoleChannelInfo structure. */
TCL_UNUSED(Tcl_Interp *),
int flags)
{
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 0af484d..e7164df 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -53,6 +53,7 @@ enum {
static const int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN,
0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM};
+
const char *const tclpFileAttrStrings[] = {
"-archive", "-hidden", "-longname", "-readonly",
"-shortname", "-system", NULL
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 9995602..6de1432 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -75,10 +75,11 @@ typedef struct TclPipeThreadInfo {
* to do read/write operation. Additionally
* used as signal to stop (state set to -1) */
volatile LONG state; /* Indicates current state of the thread */
- void *clientData; /* Referenced data of the main thread */
+ void *clientData; /* Referenced data of the main thread */
HANDLE evWakeUp; /* Optional wake-up event worker set by shutdown */
} TclPipeThreadInfo;
+
/* If pipe-workers will use some tcl subsystem, we can use Tcl_Alloc without
* more overhead for finalize thread (should be executed anyway)
*
@@ -98,6 +99,7 @@ typedef struct TclPipeThreadInfo {
#define PTI_STATE_END 4 /* thread should stop work (worker is busy) */
#define PTI_STATE_DOWN 8 /* worker is down */
+
MODULE_SCOPE
TclPipeThreadInfo * TclPipeThreadCreateTI(TclPipeThreadInfo **pipeTIPtr,
void *clientData, HANDLE wakeEvent);
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index dbf3324..3f0269c 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1187,6 +1187,7 @@ TclpCreateProcess(
}
return result;
}
+
/*
*----------------------------------------------------------------------
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 8ab4548..efd9ff2 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -246,6 +246,7 @@ typedef DWORD_PTR * PDWORD_PTR;
# define EWOULDBLOCK 140 /* Operation would block */
#endif
+
/* Visual Studio doesn't have these, so just choose some high numbers */
#ifndef ESOCKTNOSUPPORT
# define ESOCKTNOSUPPORT 240 /* Socket type not supported */
@@ -414,6 +415,7 @@ typedef DWORD_PTR * PDWORD_PTR;
# endif
#endif /* !S_ISLNK */
+
/*
* Define MAXPATHLEN in terms of MAXPATH if available
*/
@@ -522,6 +524,7 @@ typedef DWORD_PTR * PDWORD_PTR;
/* This type is not defined in the Windows headers */
#define socklen_t int
+
/*
* The following macros have trivial definitions, allowing generic code to
* address platform-specific issues.
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index e27937e..d8193b4 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -613,6 +613,7 @@ SerialCloseProc(
return EINVAL;
}
+
if (serialPtr->validMask & TCL_READABLE) {
PurgeComm(serialPtr->handle, PURGE_RXABORT | PURGE_RXCLEAR);
CloseHandle(serialPtr->osRead.hEvent);
@@ -1479,6 +1480,7 @@ TclWinOpenSerialChannel(
infoPtr->channel = Tcl_CreateChannel(&serialChannelType, channelName,
infoPtr, permissions);
+
SetupComm(handle, infoPtr->sysBufRead, infoPtr->sysBufWrite);
PurgeComm(handle,
PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index d5c582b..d99de8c 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -79,10 +79,10 @@ static CRITICAL_SECTION joinLock;
#if TCL_THREADS
typedef struct ThreadSpecificData {
- HANDLE condEvent; /* Per-thread condition event */
+ HANDLE condEvent; /* Per-thread condition event */
struct ThreadSpecificData *nextPtr; /* Queue pointers */
struct ThreadSpecificData *prevPtr;
- int flags; /* See flags below */
+ int flags; /* See flags below */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
@@ -120,7 +120,7 @@ typedef struct {
static DWORD tlsKey;
typedef struct {
- Tcl_Mutex tlock;
+ Tcl_Mutex tlock;
CRITICAL_SECTION wlock;
} allocMutex;
#endif /* USE_THREAD_ALLOC */
@@ -131,12 +131,12 @@ typedef struct {
*/
typedef struct {
- LPTHREAD_START_ROUTINE lpStartAddress;
- /* Original startup routine */
- LPVOID lpParameter; /* Original startup data */
- unsigned int fpControl; /* Floating point control word from the
+ LPTHREAD_START_ROUTINE lpStartAddress; /* Original startup routine */
+ LPVOID lpParameter; /* Original startup data */
+ unsigned int fpControl; /* Floating point control word from the
* main thread */
} WinThread;
+
/*
*----------------------------------------------------------------------
@@ -567,9 +567,9 @@ Tcl_MutexLock(
*/
if (*mutexPtr == NULL) {
- csPtr = (CRITICAL_SECTION *) Tcl_Alloc(sizeof(CRITICAL_SECTION));
+ csPtr = (CRITICAL_SECTION *)Tcl_Alloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(csPtr);
- *mutexPtr = (Tcl_Mutex) csPtr;
+ *mutexPtr = (Tcl_Mutex)csPtr;
TclRememberMutex(mutexPtr);
}
TclpGlobalUnlock();
@@ -659,7 +659,7 @@ void
Tcl_ConditionWait(
Tcl_Condition *condPtr, /* Really (WinCondition **) */
Tcl_Mutex *mutexPtr, /* Really (CRITICAL_SECTION **) */
- const Tcl_Time *timePtr) /* Timeout on waiting period */
+ const Tcl_Time *timePtr) /* Timeout on waiting period */
{
WinCondition *winCondPtr; /* Per-condition queue head */
CRITICAL_SECTION *csPtr; /* Caller's Mutex, after casting */
@@ -926,6 +926,9 @@ TclpFinalizeCondition(
}
}
+
+
+
/*
* Additions by AOL for specialized thread memory allocator.
*/
@@ -1027,6 +1030,7 @@ TclpFreeAllocCache(
}
#endif /* USE_THREAD_ALLOC */
+
void *
TclpThreadCreateKey(void)
{
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 5636dc0..77f7547 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -103,6 +103,7 @@ static struct {
double microsecsScale; /* Denominator scale between clock / microsecs */
} wideClick = {0, 0, 0.0};
+
/*
* Declarations for functions defined later in this file.
*/