1 /* Copyright (C) 2002 Free Software Foundation, Inc.
3 This file is part of GNU Bash, the Bourne Again SHell.
5 Bash is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
10 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 You should have received a copy of the GNU General Public License along
16 with Bash; see the file COPYING. If not, write to the Free Software
17 Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
21 #include <sys/types.h>
23 #if defined (HAVE_UNISTD_H)
35 extern ssize_t zread __P((int, char *, size_t));
36 extern int zwrite __P((int, char *, ssize_t));
38 /* Dump contents of file descriptor FD to OFD. FN is the filename for
39 error messages (not used right now). */
52 nr = zread (fd, lbuf, sizeof (lbuf));
60 else if (zwrite (ofd, lbuf, nr) < 0)