summaryrefslogtreecommitdiff
path: root/src/tac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tac.c')
-rw-r--r--src/tac.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tac.c b/src/tac.c
index 4681f3ab9..2e820fa07 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -43,6 +43,7 @@ tac -r -s '.\|
#include <regex.h>
+#include "die.h"
#include "error.h"
#include "filenamecat.h"
#include "safe-read.h"
@@ -272,7 +273,7 @@ tac_seekable (int input_fd, const char *file, off_t file_pos)
regoff_t ret;
if (1 < range)
- error (EXIT_FAILURE, 0, _("record too large"));
+ die (EXIT_FAILURE, 0, _("record too large"));
if (range == 1
|| ((ret = re_search (&compiled_separator, G_buffer,
@@ -281,8 +282,8 @@ tac_seekable (int input_fd, const char *file, off_t file_pos)
match_start = G_buffer - 1;
else if (ret == -2)
{
- error (EXIT_FAILURE, 0,
- _("error in regular expression search"));
+ die (EXIT_FAILURE, 0,
+ _("error in regular expression search"));
}
else
{
@@ -650,7 +651,7 @@ main (int argc, char **argv)
if (sentinel_length == 0)
{
if (*separator == 0)
- error (EXIT_FAILURE, 0, _("separator cannot be empty"));
+ die (EXIT_FAILURE, 0, _("separator cannot be empty"));
compiled_separator.buffer = NULL;
compiled_separator.allocated = 0;
@@ -659,7 +660,7 @@ main (int argc, char **argv)
error_message = re_compile_pattern (separator, strlen (separator),
&compiled_separator);
if (error_message)
- error (EXIT_FAILURE, 0, "%s", (error_message));
+ die (EXIT_FAILURE, 0, "%s", (error_message));
}
else
match_length = sentinel_length = *separator ? strlen (separator) : 1;