args.c (54245) | args.c (54278) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Keith Muller of the University of California, San Diego and Lance 7 * Visser of Convex Computer Corporation. 8 * --- 26 unchanged lines hidden (view full) --- 35 * SUCH DAMAGE. 36 */ 37 38#ifndef lint 39#if 0 40static char sccsid[] = "@(#)args.c 8.3 (Berkeley) 4/2/94"; 41#endif 42static const char rcsid[] = | 1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Keith Muller of the University of California, San Diego and Lance 7 * Visser of Convex Computer Corporation. 8 * --- 26 unchanged lines hidden (view full) --- 35 * SUCH DAMAGE. 36 */ 37 38#ifndef lint 39#if 0 40static char sccsid[] = "@(#)args.c 8.3 (Berkeley) 4/2/94"; 41#endif 42static const char rcsid[] = |
43 "$FreeBSD: head/bin/dd/args.c 54245 1999-12-07 03:32:37Z green $"; | 43 "$FreeBSD: head/bin/dd/args.c 54278 1999-12-08 02:44:46Z green $"; |
44#endif /* not lint */ 45 46#include <sys/types.h> 47 48#include <err.h> 49#include <errno.h> 50#include <limits.h> 51#include <stdlib.h> --- 116 unchanged lines hidden (view full) --- 168 if (in.offset > QUAD_MAX / in.dbsz || out.offset > QUAD_MAX / out.dbsz) 169 errx(1, "seek offsets cannot be larger than %qd", QUAD_MAX); 170} 171 172static int 173c_arg(a, b) 174 const void *a, *b; 175{ | 44#endif /* not lint */ 45 46#include <sys/types.h> 47 48#include <err.h> 49#include <errno.h> 50#include <limits.h> 51#include <stdlib.h> --- 116 unchanged lines hidden (view full) --- 168 if (in.offset > QUAD_MAX / in.dbsz || out.offset > QUAD_MAX / out.dbsz) 169 errx(1, "seek offsets cannot be larger than %qd", QUAD_MAX); 170} 171 172static int 173c_arg(a, b) 174 const void *a, *b; 175{ |
176 typedef const struct arg *c_arg_p; | |
177 | 176 |
178 return (strcmp(((c_arg_p)a)->name, ((c_arg_p)b)->name)); | 177 return (strcmp(((const struct arg *)a)->name, 178 ((const struct arg *)b)->name)); |
179} 180 181static void 182f_bs(arg) 183 char *arg; 184{ 185 quad_t res; 186 --- 139 unchanged lines hidden (view full) --- 326 ctab = cp->ctab; 327 } 328} 329 330static int 331c_conv(a, b) 332 const void *a, *b; 333{ | 179} 180 181static void 182f_bs(arg) 183 char *arg; 184{ 185 quad_t res; 186 --- 139 unchanged lines hidden (view full) --- 326 ctab = cp->ctab; 327 } 328} 329 330static int 331c_conv(a, b) 332 const void *a, *b; 333{ |
334 typedef const struct conv *c_conv_p; | |
335 | 334 |
336 return (strcmp(((c_conv_p)a)->name, ((c_conv_p)b)->name)); | 335 return (strcmp(((const struct conv *)a)->name, 336 ((const struct conv *)b)->name)); |
337} 338 339/* 340 * Convert an expression of the following forms to a quad_t. 341 * 1) A positive decimal number. 342 * 2) A positive decimal number followed by a b (mult by 512.) 343 * 3) A positive decimal number followed by a k (mult by 1 << 10.) 344 * 4) A positive decimal number followed by a m (mult by 1 << 20.) --- 87 unchanged lines hidden --- | 337} 338 339/* 340 * Convert an expression of the following forms to a quad_t. 341 * 1) A positive decimal number. 342 * 2) A positive decimal number followed by a b (mult by 512.) 343 * 3) A positive decimal number followed by a k (mult by 1 << 10.) 344 * 4) A positive decimal number followed by a m (mult by 1 << 20.) --- 87 unchanged lines hidden --- |