Deleted Added
full compact
output.c (199629) output.c (200956)
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[] = "@(#)output.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[] = "@(#)output.c 8.2 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/output.c 199629 2009-11-21 14:28:32Z jilles $");
39__FBSDID("$FreeBSD: head/bin/sh/output.c 200956 2009-12-24 18:41:14Z jilles $");
40
41/*
42 * Shell output routines. We use our own output routines because:
43 * When a builtin command is interrupted we have to discard
44 * any pending output.
45 * When a builtin command appears in back quotes, we want to
46 * save the output of the command in a region obtained
47 * via malloc, rather than doing a fork and reading the

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

309 }
310}
311
312/*
313 * Version of write which resumes after a signal is caught.
314 */
315
316int
40
41/*
42 * Shell output routines. We use our own output routines because:
43 * When a builtin command is interrupted we have to discard
44 * any pending output.
45 * When a builtin command appears in back quotes, we want to
46 * save the output of the command in a region obtained
47 * via malloc, rather than doing a fork and reading the

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

309 }
310}
311
312/*
313 * Version of write which resumes after a signal is caught.
314 */
315
316int
317xwrite(int fd, char *buf, int nbytes)
317xwrite(int fd, const char *buf, int nbytes)
318{
319 int ntry;
320 int i;
321 int n;
322
323 n = nbytes;
324 ntry = 0;
325 for (;;) {

--- 14 unchanged lines hidden ---
318{
319 int ntry;
320 int i;
321 int n;
322
323 n = nbytes;
324 ntry = 0;
325 for (;;) {

--- 14 unchanged lines hidden ---