summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das>2008-07-21 21:46:47 (GMT)
committerdas <das>2008-07-21 21:46:47 (GMT)
commit45fca6378191844231368026abfba87f18334f39 (patch)
tree1fe202de0120e5691d6e63ee2b16a770a8cb2963 /unix
parent35f986c4f26a93c0b5a0f91c81deaea2a1e5f30f (diff)
downloadtcl-45fca6378191844231368026abfba87f18334f39.zip
tcl-45fca6378191844231368026abfba87f18334f39.tar.gz
tcl-45fca6378191844231368026abfba87f18334f39.tar.bz2
fix warnings, formatting
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixPipe.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 6d4ac4e..a243889 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPipe.c,v 1.43 2008/07/21 21:02:20 ferrieux Exp $
+ * RCS: @(#) $Id: tclUnixPipe.c,v 1.44 2008/07/21 21:46:47 das Exp $
*/
#include "tclInt.h"
@@ -784,27 +784,26 @@ TclpCreateCommandChannel(
*----------------------------------------------------------------------
*/
int
-Tcl_CreatePipe (
- Tcl_Interp *interp,
- Tcl_Channel *rchan,
- Tcl_Channel *wchan,
- int flags
- )
+Tcl_CreatePipe(
+ Tcl_Interp *interp,
+ Tcl_Channel *rchan,
+ Tcl_Channel *wchan,
+ int flags)
{
- int fileNums [2];
+ int fileNums[2];
- if (pipe (fileNums) < 0) {
- Tcl_AppendResult (interp, "pipe creation failed: ",
- Tcl_PosixError (interp), (char *) NULL);
- return TCL_ERROR;
+ if (pipe(fileNums) < 0) {
+ Tcl_AppendResult(interp, "pipe creation failed: ",
+ Tcl_PosixError(interp), NULL);
+ return TCL_ERROR;
}
- *rchan = Tcl_MakeFileChannel ((ClientData) fileNums [0],
- TCL_READABLE);
- Tcl_RegisterChannel (interp, *rchan);
- *wchan = Tcl_MakeFileChannel ((ClientData) fileNums [1],
- TCL_WRITABLE);
- Tcl_RegisterChannel (interp, *wchan);
+ *rchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[0]),
+ TCL_READABLE);
+ Tcl_RegisterChannel(interp, *rchan);
+ *wchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[1]),
+ TCL_WRITABLE);
+ Tcl_RegisterChannel(interp, *wchan);
return TCL_OK;
}