atexit(close_stdout);
if (!(c = strrchr(argv[0], 'o')) || strcmp(c, "od")) {
- newsyntax(argc, &argv);
+ argv += newsyntax(argc, argv);
} else
errx(EXIT_FAILURE, _("calling hexdump as od has been deprecated "
"in favour to GNU coreutils od."));
void conv_c(PR *, u_char *);
void conv_u(PR *, u_char *);
int next(char **);
-void newsyntax(int, char ***);
+int newsyntax(int, char **);
off_t skip; /* bytes to skip */
-void
-newsyntax(int argc, char ***argvp)
+int
+newsyntax(int argc, char **argv)
{
int ch;
- char **argv;
char *hex_offt = "\"%07.7_Ax\n\"";
static const struct option longopts[] = {
{NULL, no_argument, NULL, 0}
};
- argv = *argvp;
while ((ch = getopt_long(argc, argv, "bcCde:f:n:os:vxhV", longopts, NULL)) != -1) {
switch (ch) {
case 'b':
add("\"%07.7_ax \" 8/2 \"%04x \" \"\\n\"");
}
- *argvp += optind;
+ return optind;
}
void __attribute__((__noreturn__)) usage(FILE *out)