cksum.c (f3aad83afda49dfa9e179e92f41d65514b524ae9) cksum.c (68d8bb3893ae5a7e96bcc5f5b6f0d430dda0216a)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * James W. Williams of NASA Goddard Space Flight Center.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

40 The Regents of the University of California. All rights reserved.\n";
41#endif /* not lint */
42
43#ifndef lint
44#if 0
45static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95";
46#endif
47static const char rcsid[] =
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * James W. Williams of NASA Goddard Space Flight Center.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

40 The Regents of the University of California. All rights reserved.\n";
41#endif /* not lint */
42
43#ifndef lint
44#if 0
45static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95";
46#endif
47static const char rcsid[] =
48 "$Id$";
48 "$Id: cksum.c,v 1.5 1997/07/06 03:18:13 bde Exp $";
49#endif /* not lint */
50
51#include <sys/cdefs.h>
52#include <sys/types.h>
53
54#include <err.h>
55#include <errno.h>
56#include <fcntl.h>

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

90 switch (ch) {
91 case 'o':
92 if (!strcmp(optarg, "1")) {
93 cfncn = csum1;
94 pfncn = psum1;
95 } else if (!strcmp(optarg, "2")) {
96 cfncn = csum2;
97 pfncn = psum2;
49#endif /* not lint */
50
51#include <sys/cdefs.h>
52#include <sys/types.h>
53
54#include <err.h>
55#include <errno.h>
56#include <fcntl.h>

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

90 switch (ch) {
91 case 'o':
92 if (!strcmp(optarg, "1")) {
93 cfncn = csum1;
94 pfncn = psum1;
95 } else if (!strcmp(optarg, "2")) {
96 cfncn = csum2;
97 pfncn = psum2;
98 } else if (*optarg == '3') {
99 cfncn = crc32;
100 pfncn = pcrc;
98 } else {
99 warnx("illegal argument to -o option");
100 usage();
101 }
102 break;
103 case '?':
104 default:
105 usage();

--- 33 unchanged lines hidden ---
101 } else {
102 warnx("illegal argument to -o option");
103 usage();
104 }
105 break;
106 case '?':
107 default:
108 usage();

--- 33 unchanged lines hidden ---