=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/hexdump/odsyntax.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/hexdump/odsyntax.c 2002/02/16 21:27:47 1.10 --- src/usr.bin/hexdump/odsyntax.c 2002/04/08 15:59:05 1.11 *************** *** 1,4 **** ! /* $OpenBSD: odsyntax.c,v 1.10 2002/02/16 21:27:47 millert Exp $ */ /* $NetBSD: odsyntax.c,v 1.15 2001/12/07 15:14:29 bjh21 Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: odsyntax.c,v 1.11 2002/04/08 15:59:05 millert Exp $ */ /* $NetBSD: odsyntax.c,v 1.15 2001/12/07 15:14:29 bjh21 Exp $ */ /*- *************** *** 36,42 **** #ifndef lint /*static char sccsid[] = "from: @(#)odsyntax.c 5.4 (Berkeley) 3/8/91";*/ ! static char rcsid[] = "$OpenBSD: odsyntax.c,v 1.10 2002/02/16 21:27:47 millert Exp $"; #endif /* not lint */ #include --- 36,42 ---- #ifndef lint /*static char sccsid[] = "from: @(#)odsyntax.c 5.4 (Berkeley) 3/8/91";*/ ! static char rcsid[] = "$OpenBSD: odsyntax.c,v 1.11 2002/04/08 15:59:05 millert Exp $"; #endif /* not lint */ #include *************** *** 191,197 **** warnx( "hexdump(1) compatibility doesn't support the -%c option%s\n", ch, ch == 's' ? "; see strings(1)." : "."); ! usage(); } if (!fshead) { --- 191,197 ---- warnx( "hexdump(1) compatibility doesn't support the -%c option%s\n", ch, ch == 's' ? "; see strings(1)." : "."); ! oldusage(); } if (!fshead) { *************** *** 238,244 **** add("2/8 \" %16.14e\" \"\\n\""); } else if (*type_string == 'D') /* long doubles vary in size */ ! usage(); else add("2/8 \" %16.14e\" \"\\n\""); break; --- 238,244 ---- add("2/8 \" %16.14e\" \"\\n\""); } else if (*type_string == 'D') /* long doubles vary in size */ ! oldusage(); else add("2/8 \" %16.14e\" \"\\n\""); break; *************** *** 273,279 **** default: warnx("Bad type-size qualifier '%c'", *type_string); ! usage(); } type_string++; } else if (isdigit(*type_string)) --- 273,279 ---- default: warnx("Bad type-size qualifier '%c'", *type_string); ! oldusage(); } type_string++; } else if (isdigit(*type_string)) *************** *** 295,308 **** default: warnx("%d-byte integer formats are not " "supported", nbytes); ! usage(); } add(fmt[x][y]); break; default: ! usage(); } } } static void --- 295,318 ---- default: warnx("%d-byte integer formats are not " "supported", nbytes); ! oldusage(); } add(fmt[x][y]); break; default: ! oldusage(); } } + } + + void + oldusage() + { + extern char *__progname; + fprintf(stderr, "usage: %s [-aBbcDdeFfHhIiLlOovXx] [-j skip] " + "[-N length] [-t type_string] " + "[[+]offset[.][Bb]] [file ...]\n", __progname); + exit(1); } static void