version 1.1, 1995/10/18 08:45:00 |
version 1.2, 1996/03/27 19:32:23 |
|
|
/* $NetBSD: sum2.c,v 1.4 1995/03/26 05:15:25 glass Exp $ */ |
/* $OpenBSD$ */ |
|
/* $NetBSD: sum2.c,v 1.5 1996/02/27 21:17:28 cgd Exp $ */ |
|
|
/*- |
/*- |
* Copyright (c) 1991, 1993 |
* Copyright (c) 1991, 1993 |
|
|
#ifndef lint |
#ifndef lint |
#if 0 |
#if 0 |
static char sccsid[] = "@(#)sum2.c 8.1 (Berkeley) 6/6/93"; |
static char sccsid[] = "@(#)sum2.c 8.1 (Berkeley) 6/6/93"; |
|
static char rcsid[] = "$NetBSD: sum2.c,v 1.5 1996/02/27 21:17:28 cgd Exp $"; |
#else |
#else |
static char rcsid[] = "$NetBSD: sum2.c,v 1.4 1995/03/26 05:15:25 glass Exp $"; |
static char rcsid[] = "$OpenBSD$"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
#include "extern.h" |
|
|
int |
int |
csum2(fd, cval, clen) |
csum2(fd, cval, clen) |
register int fd; |
register int fd; |
u_long *cval, *clen; |
u_int32_t *cval, *clen; |
{ |
{ |
register u_long crc, total; |
register u_int32_t crc, total; |
register int nr; |
register int nr; |
register u_char *p; |
register u_char *p; |
u_char buf[8192]; |
u_char buf[8192]; |