int main(int argc, char **argv) { FS *tfs; char *p; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); atexit(close_stdout); if (!(p = strrchr(argv[0], 'o')) || strcmp(p, "od")) { newsyntax(argc, &argv); } else errx(EXIT_FAILURE, _("calling hexdump as od has been deprecated " "in favour to GNU coreutils od.")); /* figure out the data block size */ for (blocksize = 0, tfs = fshead; tfs; tfs = tfs->nextfs) { tfs->bcnt = block_size(tfs); if (blocksize < tfs->bcnt) blocksize = tfs->bcnt; } /* rewrite the rules, do syntax checking */ for (tfs = fshead; tfs; tfs = tfs->nextfs) rewrite(tfs); (void)next(argv); display(); return exitval; }
int main_hexdump(rtems_shell_hexdump_globals* globals, int argc, char *argv[]) { FS *tfs; char *p; #if RTEMS_REMOVED (void)setlocale(LC_ALL, ""); #endif if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od")) newsyntax(globals, argc, &argv); else oldsyntax(globals, argc, &argv); /* figure out the data block size */ for (blocksize = 0, tfs = fshead; tfs; tfs = tfs->nextfs) { tfs->bcnt = size(globals, tfs); if (blocksize < tfs->bcnt) blocksize = tfs->bcnt; } /* rewrite the rules, do syntax checking */ for (tfs = fshead; tfs; tfs = tfs->nextfs) rewrite(globals, tfs); (void)next(globals, argv); display(globals); exit(exitval); return exitval; }
int main(int argc, char **argv) { FS *tfs; char *p; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); if (!(p = strrchr(argv[0], 'o')) || strcmp(p, "od")) newsyntax(argc, &argv); else oldsyntax(argc, &argv); /* figure out the data block size */ for (blocksize = 0, tfs = fshead; tfs; tfs = tfs->nextfs) { tfs->bcnt = size(tfs); if (blocksize < tfs->bcnt) blocksize = tfs->bcnt; } /* rewrite the rules, do syntax checking */ for (tfs = fshead; tfs; tfs = tfs->nextfs) rewrite(tfs); (void)next(argv); display(); return exitval; }
int main(int argc, char *argv[]) { FS *tfs; char *p; (void)setlocale(LC_ALL, ""); if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od")) newsyntax(argc, &argv); else oldsyntax(argc, &argv); /* figure out the data block size */ for (blocksize = 0, tfs = fshead; tfs; tfs = tfs->nextfs) { tfs->bcnt = size(tfs); if (blocksize < tfs->bcnt) blocksize = tfs->bcnt; } /* rewrite the rules, do syntax checking */ for (tfs = fshead; tfs; tfs = tfs->nextfs) rewrite(tfs); (void)next(argv); display(); exit(exitval); }