Deleted Added
full compact
odsyntax.c (30921) odsyntax.c (48566)
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 "$Id: odsyntax.c,v 1.5 1997/07/10 06:48:21 charnier Exp $";
39 "$Id: odsyntax.c,v 1.6 1997/11/04 05:33:14 ache Exp $";
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>

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

217 skip = strtol(num, (char **)&end, base ? base : 8);
218
219 /* if end isn't the same as p, we got a non-octal digit */
220 if (end != p) {
221 skip = 0;
222 return;
223 }
224
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>

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

217 skip = strtol(num, (char **)&end, base ? base : 8);
218
219 /* if end isn't the same as p, we got a non-octal digit */
220 if (end != p) {
221 skip = 0;
222 return;
223 }
224
225 if (*p)
225 if (*p) {
226 if (*p == 'B') {
227 skip *= 1024;
228 ++p;
229 } else if (*p == 'b') {
230 skip *= 512;
231 ++p;
232 }
226 if (*p == 'B') {
227 skip *= 1024;
228 ++p;
229 } else if (*p == 'b') {
230 skip *= 512;
231 ++p;
232 }
233 }
233
234 if (*p) {
235 skip = 0;
236 return;
237 }
238
239 /*
240 * If the offset uses a non-octal base, the base of the offset

--- 27 unchanged lines hidden ---
234
235 if (*p) {
236 skip = 0;
237 return;
238 }
239
240 /*
241 * If the offset uses a non-octal base, the base of the offset

--- 27 unchanged lines hidden ---