Deleted Added
full compact
cksum.c (87212) cksum.c (92920)
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 "$FreeBSD: head/usr.bin/cksum/cksum.c 87212 2001-12-02 12:54:40Z markm $";
48 "$FreeBSD: head/usr.bin/cksum/cksum.c 92920 2002-03-22 01:22:50Z imp $";
49#endif /* not lint */
50
51#include <sys/types.h>
52
53#include <err.h>
54#include <fcntl.h>
55#include <stdio.h>
56#include <stdlib.h>
57#include <string.h>
58#include <unistd.h>
59
60#include "extern.h"
61
49#endif /* not lint */
50
51#include <sys/types.h>
52
53#include <err.h>
54#include <fcntl.h>
55#include <stdio.h>
56#include <stdlib.h>
57#include <string.h>
58#include <unistd.h>
59
60#include "extern.h"
61
62static void usage __P((void));
62static void usage(void);
63
64int
65main(argc, argv)
66 int argc;
67 char **argv;
68{
69 int ch, fd, rval;
70 u_int32_t len, val;
71 char *fn, *p;
63
64int
65main(argc, argv)
66 int argc;
67 char **argv;
68{
69 int ch, fd, rval;
70 u_int32_t len, val;
71 char *fn, *p;
72 int (*cfncn) __P((int, u_int32_t *, u_int32_t *));
73 void (*pfncn) __P((char *, u_int32_t, u_int32_t));
72 int (*cfncn)(int, u_int32_t *, u_int32_t *);
73 void (*pfncn)(char *, u_int32_t, u_int32_t);
74
75 if ((p = rindex(argv[0], '/')) == NULL)
76 p = argv[0];
77 else
78 ++p;
79 if (!strcmp(p, "sum")) {
80 cfncn = csum1;
81 pfncn = psum1;

--- 59 unchanged lines hidden ---
74
75 if ((p = rindex(argv[0], '/')) == NULL)
76 p = argv[0];
77 else
78 ++p;
79 if (!strcmp(p, "sum")) {
80 cfncn = csum1;
81 pfncn = psum1;

--- 59 unchanged lines hidden ---