Lines Matching defs:redir
1 /* $NetBSD: redir.c,v 1.29 2004/07/08 03:57:33 christos Exp $ */
38 static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95";
40 __RCSID("$NetBSD: redir.c,v 1.29 2004/07/08 03:57:33 christos Exp $");
63 #include "redir.h"
107 redirect(union node *redir, int flags)
129 for (n = redir ; n ; n = n->nfile.next) {
175 openredirect(union node *redir, char memory[10], int flags)
177 int fd = redir->nfile.fd;
189 switch (redir->nfile.type) {
191 fname = redir->nfile.expfname;
202 fname = redir->nfile.expfname;
211 fname = redir->nfile.expfname;
216 fname = redir->nfile.expfname;
222 if (redir->ndup.dupfd >= 0) { /* if not ">&-" */
223 if (memory[redir->ndup.dupfd])
226 copyfd(redir->ndup.dupfd, fd);
232 f = openhere(redir);
258 openhere(union node *redir)
265 if (redir->type == NHERE) {
266 len = strlen(redir->nhere.doc->narg.text);
268 xwrite(pip[1], redir->nhere.doc->narg.text, len);
281 if (redir->type == NHERE)
282 xwrite(pip[1], redir->nhere.doc->narg.text, len);
284 expandhere(redir->nhere.doc, pip[1]);
327 INCLUDE "redir.h"