summaryrefslogtreecommitdiff
path: root/src/od.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/od.c')
-rw-r--r--src/od.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/od.c b/src/od.c
index 74f523c57..4ea272067 100644
--- a/src/od.c
+++ b/src/od.c
@@ -24,6 +24,7 @@
#include <sys/types.h>
#include "system.h"
#include "argmatch.h"
+#include "die.h"
#include "error.h"
#include "ftoastr.h"
#include "quote.h"
@@ -1102,7 +1103,7 @@ skip (uintmax_t n_skip)
}
if (n_skip != 0)
- error (EXIT_FAILURE, 0, _("cannot skip past end of combined input"));
+ die (EXIT_FAILURE, 0, _("cannot skip past end of combined input"));
return ok;
}
@@ -1654,10 +1655,10 @@ main (int argc, char **argv)
address_pad_len = 0;
break;
default:
- error (EXIT_FAILURE, 0,
- _("invalid output address radix '%c';\
+ die (EXIT_FAILURE, 0,
+ _("invalid output address radix '%c';\
it must be one character from [doxn]"),
- optarg[0]);
+ optarg[0]);
break;
}
break;
@@ -1692,7 +1693,7 @@ main (int argc, char **argv)
/* The minimum string length may be no larger than SIZE_MAX,
since we may allocate a buffer of this size. */
if (SIZE_MAX < tmp)
- error (EXIT_FAILURE, 0, _("%s is too large"), quote (optarg));
+ die (EXIT_FAILURE, 0, _("%s is too large"), quote (optarg));
string_min = tmp;
}
@@ -1773,7 +1774,7 @@ main (int argc, char **argv)
if (s_err != LONGINT_OK)
xstrtol_fatal (s_err, oi, c, long_options, optarg);
if (SIZE_MAX < w_tmp)
- error (EXIT_FAILURE, 0, _("%s is too large"), quote (optarg));
+ die (EXIT_FAILURE, 0, _("%s is too large"), quote (optarg));
desired_width = w_tmp;
}
break;
@@ -1792,8 +1793,8 @@ main (int argc, char **argv)
return EXIT_FAILURE;
if (flag_dump_strings && n_specs > 0)
- error (EXIT_FAILURE, 0,
- _("no type may be specified when dumping strings"));
+ die (EXIT_FAILURE, 0,
+ _("no type may be specified when dumping strings"));
n_files = argc - optind;
@@ -1889,7 +1890,7 @@ main (int argc, char **argv)
{
end_offset = n_bytes_to_skip + max_bytes_to_format;
if (end_offset < n_bytes_to_skip)
- error (EXIT_FAILURE, 0, _("skip-bytes + read-bytes is too large"));
+ die (EXIT_FAILURE, 0, _("skip-bytes + read-bytes is too large"));
}
if (n_specs == 0)
@@ -1979,7 +1980,7 @@ main (int argc, char **argv)
cleanup:
if (have_read_stdin && fclose (stdin) == EOF)
- error (EXIT_FAILURE, errno, _("standard input"));
+ die (EXIT_FAILURE, errno, _("standard input"));
return ok ? EXIT_SUCCESS : EXIT_FAILURE;
}