Deleted Added
full compact
cksum.c (216370) cksum.c (229403)
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

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

38
39#ifndef lint
40#if 0
41static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95";
42#endif
43#endif /* not lint */
44
45#include <sys/cdefs.h>
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

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

38
39#ifndef lint
40#if 0
41static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95";
42#endif
43#endif /* not lint */
44
45#include <sys/cdefs.h>
46__FBSDID("$FreeBSD: head/usr.bin/cksum/cksum.c 216370 2010-12-11 08:32:16Z joel $");
46__FBSDID("$FreeBSD: head/usr.bin/cksum/cksum.c 229403 2012-01-03 18:51:58Z ed $");
47
48#include <sys/types.h>
49
50#include <err.h>
51#include <fcntl.h>
52#include <stdio.h>
53#include <stdlib.h>
54#include <string.h>

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

63{
64 uint32_t val;
65 int ch, fd, rval;
66 off_t len;
67 char *fn, *p;
68 int (*cfncn)(int, uint32_t *, off_t *);
69 void (*pfncn)(char *, uint32_t, off_t);
70
47
48#include <sys/types.h>
49
50#include <err.h>
51#include <fcntl.h>
52#include <stdio.h>
53#include <stdlib.h>
54#include <string.h>

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

63{
64 uint32_t val;
65 int ch, fd, rval;
66 off_t len;
67 char *fn, *p;
68 int (*cfncn)(int, uint32_t *, off_t *);
69 void (*pfncn)(char *, uint32_t, off_t);
70
71 if ((p = rindex(argv[0], '/')) == NULL)
71 if ((p = strrchr(argv[0], '/')) == NULL)
72 p = argv[0];
73 else
74 ++p;
75 if (!strcmp(p, "sum")) {
76 cfncn = csum1;
77 pfncn = psum1;
78 ++argv;
79 } else {

--- 57 unchanged lines hidden ---
72 p = argv[0];
73 else
74 ++p;
75 if (!strcmp(p, "sum")) {
76 cfncn = csum1;
77 pfncn = psum1;
78 ++argv;
79 } else {

--- 57 unchanged lines hidden ---