aboutsummaryrefslogtreecommitdiffstats
path: root/src/paste.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/paste.c')
-rw-r--r--src/paste.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/paste.c b/src/paste.c
index 27b6a416e..73ddd1de6 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -41,8 +41,6 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
-#include "die.h"
-#include "error.h"
#include "fadvise.h"
/* The official name of this program (e.g., no 'g' prefix). */
@@ -159,7 +157,7 @@ collapse_escapes (char const *strptr)
static void
write_error (void)
{
- die (EXIT_FAILURE, errno, _("write error"));
+ error (EXIT_FAILURE, errno, _("write error"));
}
/* Output a single byte, reporting any write errors. */
@@ -210,7 +208,7 @@ paste_parallel (size_t nfiles, char **fnamptr)
{
fileptr[files_open] = fopen (fnamptr[files_open], "r");
if (fileptr[files_open] == nullptr)
- die (EXIT_FAILURE, errno, "%s", quotef (fnamptr[files_open]));
+ error (EXIT_FAILURE, errno, "%s", quotef (fnamptr[files_open]));
else if (fileno (fileptr[files_open]) == STDIN_FILENO)
opened_stdin = true;
fadvise (fileptr[files_open], FADVISE_SEQUENTIAL);
@@ -218,7 +216,7 @@ paste_parallel (size_t nfiles, char **fnamptr)
}
if (opened_stdin && have_read_stdin)
- die (EXIT_FAILURE, 0, _("standard input is closed"));
+ error (EXIT_FAILURE, 0, _("standard input is closed"));
/* Read a line from each file and output it to stdout separated by a
delimiter, until we go through the loop without successfully
@@ -511,9 +509,9 @@ main (int argc, char **argv)
{
/* Don't use the quote() quoting style, because that would double the
number of displayed backslashes, making the diagnostic look bogus. */
- die (EXIT_FAILURE, 0,
- _("delimiter list ends with an unescaped backslash: %s"),
- quotearg_n_style_colon (0, c_maybe_quoting_style, delim_arg));
+ error (EXIT_FAILURE, 0,
+ _("delimiter list ends with an unescaped backslash: %s"),
+ quotearg_n_style_colon (0, c_maybe_quoting_style, delim_arg));
}
bool ok = ((serial_merge ? paste_serial : paste_parallel)
@@ -522,6 +520,6 @@ main (int argc, char **argv)
free (delims);
if (have_read_stdin && fclose (stdin) == EOF)
- die (EXIT_FAILURE, errno, "-");
+ error (EXIT_FAILURE, errno, "-");
return ok ? EXIT_SUCCESS : EXIT_FAILURE;
}