cksum.c (31056) | cksum.c (34447) |
---|---|
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: cksum.c,v 1.7 1997/11/09 05:35:26 obrien Exp $"; | 48 "$Id: cksum.c,v 1.8 1997/11/09 05:47:55 obrien 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> --- 7 unchanged lines hidden (view full) --- 64static void usage __P((void)); 65 66int 67main(argc, argv) 68 int argc; 69 char **argv; 70{ 71 register int ch, fd, rval; | 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> --- 7 unchanged lines hidden (view full) --- 64static void usage __P((void)); 65 66int 67main(argc, argv) 68 int argc; 69 char **argv; 70{ 71 register int ch, fd, rval; |
72 u_long len, val; | 72 u_int32_t len, val; |
73 char *fn, *p; | 73 char *fn, *p; |
74 int (*cfncn) __P((int, unsigned long *, unsigned long *)); 75 void (*pfncn) __P((char *, unsigned long, unsigned long)); | 74 int (*cfncn) __P((int, u_int32_t *, u_int32_t *)); 75 void (*pfncn) __P((char *, u_int32_t, u_int32_t)); |
76 77 if ((p = rindex(argv[0], '/')) == NULL) 78 p = argv[0]; 79 else 80 ++p; 81 if (!strcmp(p, "sum")) { 82 cfncn = csum1; 83 pfncn = psum1; --- 59 unchanged lines hidden --- | 76 77 if ((p = rindex(argv[0], '/')) == NULL) 78 p = argv[0]; 79 else 80 ++p; 81 if (!strcmp(p, "sum")) { 82 cfncn = csum1; 83 pfncn = psum1; --- 59 unchanged lines hidden --- |