sl@0: /* sl@0: * cat.c -- sl@0: * sl@0: * Program used when testing tclWinPipe.c sl@0: * sl@0: * Copyright (c) 1996 by Sun Microsystems, Inc. sl@0: * sl@0: * See the file "license.terms" for information on usage and redistribution sl@0: * of this file, and for a DISCLAIMER OF ALL WARRANTIES. sl@0: * sl@0: * RCS: @(#) $Id: cat.c,v 1.2 1998/09/14 18:40:19 stanton Exp $ sl@0: */ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: int sl@0: main() sl@0: { sl@0: char buf[1024]; sl@0: int n; sl@0: char *err; sl@0: sl@0: while (1) { sl@0: n = read(0, buf, sizeof(buf)); sl@0: if (n <= 0) { sl@0: break; sl@0: } sl@0: write(1, buf, n); sl@0: } sl@0: err = (sizeof(int) == 2) ? "stderr16" : "stderr32"; sl@0: write(2, err, strlen(err)); sl@0: sl@0: return 0; sl@0: } sl@0: