diff options
author | Jim Meyering <jim@meyering.net> | 1995-11-11 14:35:27 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-11-11 14:35:27 +0000 |
commit | 1b1382a3a9ace9d1fcc8a39a776a499ffefe010e (patch) | |
tree | 9fd0563df209cad78ff1bb402bd004c8326b62d3 /src | |
parent | ff0e0485216df03d621a425f029b5b0d51b60f24 (diff) | |
download | coreutils-1b1382a3a9ace9d1fcc8a39a776a499ffefe010e.tar.xz |
(cleanup): Add signal number parameter.
Update callers.
Diffstat (limited to 'src')
-rw-r--r-- | src/tac.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -146,7 +146,7 @@ With no FILE, or when FILE is -, read standard input.\n\ } static RETSIGTYPE -cleanup (void) +cleanup (int signum) { unlink (tempfile); exit (1); @@ -163,7 +163,7 @@ xmalloc (unsigned int n) if (p == 0) { error (0, 0, _("virtual memory exhausted")); - cleanup (); + cleanup (0); } return p; } @@ -177,7 +177,7 @@ xrealloc (char *p, unsigned int n) if (p == 0) { error (0, 0, _("virtual memory exhausted")); - cleanup (); + cleanup (0); } return p; } @@ -188,7 +188,7 @@ xwrite (int desc, const char *buffer, int size) if (full_write (desc, buffer, size) < 0) { error (0, errno, _("write error")); - cleanup (); + cleanup (0); } } @@ -295,7 +295,7 @@ tac (int fd, const char *file) else if (ret == -2) { error (0, 0, _("error in regular expression search")); - cleanup (); + cleanup (0); } else { @@ -439,23 +439,23 @@ save_stdin (void) if (fd == -1) { error (0, errno, "%s", tempfile); - cleanup (); + cleanup (0); } while ((bytes_read = safe_read (0, buffer, read_size)) > 0) if (full_write (fd, buffer, bytes_read) < 0) { error (0, errno, "%s", tempfile); - cleanup (); + cleanup (0); } if (close (fd) < 0) { error (0, errno, "%s", tempfile); - cleanup (); + cleanup (0); } if (bytes_read == -1) { error (0, errno, _("read error")); - cleanup (); + cleanup (0); } } |