summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index a493bca..f15daa5 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -324,7 +324,6 @@ PipeSetupProc(
PipeInfo *infoPtr;
Tcl_Time blockTime = { 0, 0 };
int block = 1;
- WinFile *filePtr;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
if (!(flags & TCL_FILE_EVENTS)) {
@@ -338,13 +337,11 @@ PipeSetupProc(
for (infoPtr = tsdPtr->firstPipePtr; infoPtr != NULL;
infoPtr = infoPtr->nextPtr) {
if (infoPtr->watchMask & TCL_WRITABLE) {
- filePtr = (WinFile*) infoPtr->writeFile;
if (WaitForSingleObject(infoPtr->writable, 0) != WAIT_TIMEOUT) {
block = 0;
}
}
if (infoPtr->watchMask & TCL_READABLE) {
- filePtr = (WinFile*) infoPtr->readFile;
if (WaitForRead(infoPtr, 0) >= 0) {
block = 0;
}
@@ -379,7 +376,6 @@ PipeCheckProc(
{
PipeInfo *infoPtr;
PipeEvent *evPtr;
- WinFile *filePtr;
int needEvent;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -403,13 +399,11 @@ PipeCheckProc(
*/
needEvent = 0;
- filePtr = (WinFile*) infoPtr->writeFile;
if ((infoPtr->watchMask & TCL_WRITABLE) &&
(WaitForSingleObject(infoPtr->writable, 0) != WAIT_TIMEOUT)) {
needEvent = 1;
}
- filePtr = (WinFile*) infoPtr->readFile;
if ((infoPtr->watchMask & TCL_READABLE) &&
(WaitForRead(infoPtr, 0) >= 0)) {
needEvent = 1;
@@ -1651,7 +1645,6 @@ TclpCreateCommandChannel(
Tcl_Pid *pidPtr) /* An array of process identifiers. */
{
char channelName[16 + TCL_INTEGER_SPACE];
- int channelId;
DWORD id;
PipeInfo *infoPtr = (PipeInfo *) ckalloc((unsigned) sizeof(PipeInfo));
@@ -1670,21 +1663,6 @@ TclpCreateCommandChannel(
infoPtr->writeError = 0;
infoPtr->channel = (Tcl_Channel) NULL;
- /*
- * Use one of the fds associated with the channel as the
- * channel id.
- */
-
- if (readFile) {
- channelId = (int) ((WinFile*)readFile)->handle;
- } else if (writeFile) {
- channelId = (int) ((WinFile*)writeFile)->handle;
- } else if (errorFile) {
- channelId = (int) ((WinFile*)errorFile)->handle;
- } else {
- channelId = 0;
- }
-
infoPtr->validMask = 0;
infoPtr->threadId = Tcl_GetCurrentThread();
@@ -2291,7 +2269,6 @@ PipeEventProc(
{
PipeEvent *pipeEvPtr = (PipeEvent *)evPtr;
PipeInfo *infoPtr;
- WinFile *filePtr;
int mask;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -2328,14 +2305,12 @@ PipeEventProc(
* as being writable unless we have detected EOF.
*/
- filePtr = (WinFile*) ((PipeInfo*)infoPtr)->writeFile;
mask = 0;
if ((infoPtr->watchMask & TCL_WRITABLE) &&
(WaitForSingleObject(infoPtr->writable, 0) != WAIT_TIMEOUT)) {
mask = TCL_WRITABLE;
}
- filePtr = (WinFile*) ((PipeInfo*)infoPtr)->readFile;
if ((infoPtr->watchMask & TCL_READABLE) &&
(WaitForRead(infoPtr, 0) >= 0)) {
if (infoPtr->readFlags & PIPE_EOF) {