Deleted Added
full compact
odsyntax.c (92920) odsyntax.c (96787)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)odsyntax.c 8.2 (Berkeley) 5/4/95";
37#endif
38static const char rcsid[] =
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)odsyntax.c 8.2 (Berkeley) 5/4/95";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/usr.bin/hexdump/odsyntax.c 92920 2002-03-22 01:22:50Z imp $";
39 "$FreeBSD: head/usr.bin/hexdump/odsyntax.c 96787 2002-05-17 05:20:30Z tjr $";
40#endif /* not lint */
41
42#include <sys/types.h>
43
44#include <ctype.h>
45#include <err.h>
46#include <stdio.h>
47#include <stdlib.h>
48#include <unistd.h>
49
50#include "hexdump.h"
51
40#endif /* not lint */
41
42#include <sys/types.h>
43
44#include <ctype.h>
45#include <err.h>
46#include <stdio.h>
47#include <stdlib.h>
48#include <unistd.h>
49
50#include "hexdump.h"
51
52int deprecated;
52int odmode;
53
54static void odoffset(int, char ***);
55static void odprecede(void);
56
57void
58oldsyntax(argc, argvp)
59 int argc;
60 char ***argvp;
61{
62 extern enum _vflag vflag;
63 extern FS *fshead;
64 int ch;
65 char **argv;
66
53
54static void odoffset(int, char ***);
55static void odprecede(void);
56
57void
58oldsyntax(argc, argvp)
59 int argc;
60 char ***argvp;
61{
62 extern enum _vflag vflag;
63 extern FS *fshead;
64 int ch;
65 char **argv;
66
67 deprecated = 1;
67 odmode = 1;
68 argv = *argvp;
69 while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != -1)
70 switch (ch) {
71 case 'a':
72 odprecede();
73 add("16/1 \"%3_u \" \"\\n\"");
74 break;
75 case 'B':

--- 55 unchanged lines hidden (view full) ---

131 vflag = ALL;
132 break;
133 case 'P':
134 case 'p':
135 case 's':
136 case 'w':
137 case '?':
138 default:
68 argv = *argvp;
69 while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != -1)
70 switch (ch) {
71 case 'a':
72 odprecede();
73 add("16/1 \"%3_u \" \"\\n\"");
74 break;
75 case 'B':

--- 55 unchanged lines hidden (view full) ---

131 vflag = ALL;
132 break;
133 case 'P':
134 case 'p':
135 case 's':
136 case 'w':
137 case '?':
138 default:
139 warnx("od(1) has been deprecated for hexdump(1)");
140 if (ch != '?')
141 warnx("hexdump(1) compatibility doesn't support the -%c option%s",
142 ch, ch == 's' ? "; see strings(1)" : "");
143 usage();
144 }
145
146 if (!fshead) {
147 add("\"%07.7_Ao\n\"");

--- 121 unchanged lines hidden ---
139 if (ch != '?')
140 warnx("hexdump(1) compatibility doesn't support the -%c option%s",
141 ch, ch == 's' ? "; see strings(1)" : "");
142 usage();
143 }
144
145 if (!fshead) {
146 add("\"%07.7_Ao\n\"");

--- 121 unchanged lines hidden ---