sum1.c (9b50d9027575220cb6dd09b3e62f03f511e908b8) sum1.c (4933ffaed9927902d8e810b6989996c0e1221321)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

36#endif /* not lint */
37
38#include <sys/types.h>
39#include <unistd.h>
40
41int
42csum1(fd, cval, clen)
43 register int fd;
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

36#endif /* not lint */
37
38#include <sys/types.h>
39#include <unistd.h>
40
41int
42csum1(fd, cval, clen)
43 register int fd;
44 u_long *cval, *clen;
44 u_int32_t *cval, *clen;
45{
45{
46 register u_long total;
46 register u_int32_t total;
47 register int nr;
48 register u_int crc;
49 register u_char *p;
50 u_char buf[8192];
51
52 /*
53 * 16-bit checksum, rotating right before each addition;
54 * overflow is discarded.

--- 15 unchanged lines hidden ---
47 register int nr;
48 register u_int crc;
49 register u_char *p;
50 u_char buf[8192];
51
52 /*
53 * 16-bit checksum, rotating right before each addition;
54 * overflow is discarded.

--- 15 unchanged lines hidden ---