Deleted Added
full compact
redir.c (250267) redir.c (253650)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/redir.c 250267 2013-05-05 10:51:40Z jilles $");
39__FBSDID("$FreeBSD: head/bin/sh/redir.c 253650 2013-07-25 15:08:41Z jilles $");
40
41#include <sys/types.h>
42#include <sys/stat.h>
43#include <signal.h>
44#include <string.h>
45#include <fcntl.h>
46#include <errno.h>
47#include <unistd.h>

--- 271 unchanged lines hidden (view full) ---

319 ckfree(rp);
320 INTON;
321}
322
323/*
324 * Undo all redirections. Called on error or interrupt.
325 */
326
40
41#include <sys/types.h>
42#include <sys/stat.h>
43#include <signal.h>
44#include <string.h>
45#include <fcntl.h>
46#include <errno.h>
47#include <unistd.h>

--- 271 unchanged lines hidden (view full) ---

319 ckfree(rp);
320 INTON;
321}
322
323/*
324 * Undo all redirections. Called on error or interrupt.
325 */
326
327#ifdef mkinit
328
329INCLUDE "redir.h"
330
331RESET {
327void
328resetredir(void)
329{
332 while (redirlist)
333 popredir();
334}
335
330 while (redirlist)
331 popredir();
332}
333
336#endif
337
338/* Return true if fd 0 has already been redirected at least once. */
339int
340fd0_redirected_p(void)
341{
342 return fd0_redirected != 0;
343}
344

--- 19 unchanged lines hidden ---
334
335/* Return true if fd 0 has already been redirected at least once. */
336int
337fd0_redirected_p(void)
338{
339 return fd0_redirected != 0;
340}
341

--- 19 unchanged lines hidden ---