diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-02-24 10:45:04 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-02-24 10:45:04 (GMT) |
commit | 8282fe60d8a51812bfb3ced0032e52c0cc5f81b5 (patch) | |
tree | 484964998d32be03482d6e1078a27f1f3187f409 /generic/tclPipe.c | |
parent | 9f6e608ac5b1a6b4bb9382774a7ae4e263533dde (diff) | |
download | tcl-8282fe60d8a51812bfb3ced0032e52c0cc5f81b5.zip tcl-8282fe60d8a51812bfb3ced0032e52c0cc5f81b5.tar.gz tcl-8282fe60d8a51812bfb3ced0032e52c0cc5f81b5.tar.bz2 |
More tidying up (whitespace, spelling, useless parentheses, useless casts)
Diffstat (limited to 'generic/tclPipe.c')
-rw-r--r-- | generic/tclPipe.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/generic/tclPipe.c b/generic/tclPipe.c index e8e4f74..37dd5b1 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.22 2009/07/23 22:49:15 andreas_kupries Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.23 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -102,14 +102,15 @@ FileForRedirect( } file = TclpMakeFile(chan, writing ? TCL_WRITABLE : TCL_READABLE); if (file == NULL) { - Tcl_Obj* msg; + Tcl_Obj *msg; + Tcl_GetChannelError(chan, &msg); if (msg) { - Tcl_SetObjResult (interp, msg); + Tcl_SetObjResult(interp, msg); } else { - Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan), - "\" wasn't opened for ", - ((writing) ? "writing" : "reading"), NULL); + Tcl_AppendResult(interp, "channel \"", + Tcl_GetChannelName(chan), "\" wasn't opened for ", + ((writing) ? "writing" : "reading"), NULL); } return NULL; } @@ -475,19 +476,19 @@ TclCreatePipeline( * first process in pipeline (specified via < * or <@). */ int inputClose = 0; /* If non-zero, then inputFile should be - * closed when cleaning up. */ + * closed when cleaning up. */ int inputRelease = 0; TclFile outputFile = NULL; /* Writable file for output from last command * in pipeline (could be file or pipe). NULL * means use stdout. */ int outputClose = 0; /* If non-zero, then outputFile should be - * closed when cleaning up. */ + * closed when cleaning up. */ int outputRelease = 0; TclFile errorFile = NULL; /* Writable file for error output from all * commands in pipeline. NULL means use * stderr. */ int errorClose = 0; /* If non-zero, then errorFile should be - * closed when cleaning up. */ + * closed when cleaning up. */ int errorRelease = 0; const char *p; const char *nextArg; |