ANSIify function definitions to avoid a warning.
This commit is contained in:
parent
c86f1a950a
commit
6b76694948
@ -62,9 +62,7 @@ __FBSDID("$FreeBSD$");
|
||||
static void usage(void);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int ch, fd, rval;
|
||||
u_int32_t len, val;
|
||||
@ -132,7 +130,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr, "usage: cksum [-o 1 | 2 | 3] [file ...]\n");
|
||||
(void)fprintf(stderr, " sum [file ...]\n");
|
||||
|
@ -111,9 +111,7 @@ static const u_int32_t crctab[] = {
|
||||
u_int32_t crc_total = ~0; /* The crc over a number of files. */
|
||||
|
||||
int
|
||||
crc(fd, cval, clen)
|
||||
int fd;
|
||||
u_int32_t *cval, *clen;
|
||||
crc(int fd, u_int32_t *cval, u_int32_t *clen)
|
||||
{
|
||||
u_char *p;
|
||||
int nr;
|
||||
|
@ -98,9 +98,7 @@ static const u_int32_t crctab[256] = {
|
||||
u_int32_t crc32_total = 0 ;
|
||||
|
||||
int
|
||||
crc32(fd, cval, clen)
|
||||
int fd;
|
||||
u_int32_t *cval, *clen;
|
||||
crc32(int fd, u_int32_t *cval, u_int32_t *clen)
|
||||
{
|
||||
u_int32_t lcrc = ~0;
|
||||
char buf[BUFSIZ], *p ;
|
||||
|
@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "extern.h"
|
||||
|
||||
void
|
||||
pcrc(fn, val, len)
|
||||
char *fn;
|
||||
u_int32_t val, len;
|
||||
pcrc(char *fn, u_int32_t val, u_int32_t len)
|
||||
{
|
||||
(void)printf("%lu %lu", (u_long) val, (u_long) len);
|
||||
if (fn)
|
||||
@ -55,9 +53,7 @@ pcrc(fn, val, len)
|
||||
}
|
||||
|
||||
void
|
||||
psum1(fn, val, len)
|
||||
char *fn;
|
||||
u_int32_t val, len;
|
||||
psum1(char *fn, u_int32_t val, u_int32_t len)
|
||||
{
|
||||
(void)printf("%lu %lu", (u_long) val, (u_long) (len + 1023) / 1024);
|
||||
if (fn)
|
||||
@ -66,9 +62,7 @@ psum1(fn, val, len)
|
||||
}
|
||||
|
||||
void
|
||||
psum2(fn, val, len)
|
||||
char *fn;
|
||||
u_int32_t val, len;
|
||||
psum2(char *fn, u_int32_t val, u_int32_t len)
|
||||
{
|
||||
(void)printf("%lu %lu", (u_long) val, (u_long) (len + 511) / 512);
|
||||
if (fn)
|
||||
|
@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "extern.h"
|
||||
|
||||
int
|
||||
csum1(fd, cval, clen)
|
||||
int fd;
|
||||
u_int32_t *cval, *clen;
|
||||
csum1(int fd, u_int32_t *cval, u_int32_t *clen)
|
||||
{
|
||||
u_int32_t total;
|
||||
int nr;
|
||||
|
@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "extern.h"
|
||||
|
||||
int
|
||||
csum2(fd, cval, clen)
|
||||
int fd;
|
||||
u_int32_t *cval, *clen;
|
||||
csum2(int fd, u_int32_t *cval, u_int32_t *clen)
|
||||
{
|
||||
u_int32_t lcrc, total;
|
||||
int nr;
|
||||
|
@ -63,9 +63,7 @@ int lflag, sflag, xflag, zflag;
|
||||
static void usage(void);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct stat sb1, sb2;
|
||||
off_t skip1, skip2;
|
||||
@ -169,7 +167,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr,
|
||||
|
@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "extern.h"
|
||||
|
||||
void
|
||||
eofmsg(file)
|
||||
const char *file;
|
||||
eofmsg(const char *file)
|
||||
{
|
||||
if (!sflag)
|
||||
warnx("EOF on %s", file);
|
||||
@ -58,9 +57,7 @@ eofmsg(file)
|
||||
}
|
||||
|
||||
void
|
||||
diffmsg(file1, file2, byte, line)
|
||||
const char *file1, *file2;
|
||||
off_t byte, line;
|
||||
diffmsg(const char *file1, const char *file2, off_t byte, off_t line)
|
||||
{
|
||||
if (!sflag)
|
||||
(void)printf("%s %s differ: char %lld, line %lld\n",
|
||||
|
@ -59,10 +59,8 @@ static u_char *remmap(u_char *, int, off_t);
|
||||
#define ROUNDPAGE(i) ((i) & ~pagemask)
|
||||
|
||||
void
|
||||
c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
|
||||
int fd1, fd2;
|
||||
const char *file1, *file2;
|
||||
off_t skip1, len1, skip2, len2;
|
||||
c_regular(int fd1, const char *file1, off_t skip1, off_t len1,
|
||||
int fd2, const char *file2, off_t skip2, off_t len2)
|
||||
{
|
||||
u_char ch, *p1, *p2, *m1, *m2, *e1, *e2;
|
||||
off_t byte, length, line;
|
||||
@ -147,10 +145,7 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
|
||||
}
|
||||
|
||||
static u_char *
|
||||
remmap(mem, fd, offset)
|
||||
u_char *mem;
|
||||
int fd;
|
||||
off_t offset;
|
||||
remmap(u_char *mem, int fd, off_t offset)
|
||||
{
|
||||
if (mem != NULL)
|
||||
munmap(mem, MMAP_CHUNK);
|
||||
|
@ -50,10 +50,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "extern.h"
|
||||
|
||||
void
|
||||
c_special(fd1, file1, skip1, fd2, file2, skip2)
|
||||
int fd1, fd2;
|
||||
const char *file1, *file2;
|
||||
off_t skip1, skip2;
|
||||
c_special(int fd1, const char *file1, off_t skip1,
|
||||
int fd2, const char *file2, off_t skip2)
|
||||
{
|
||||
int ch1, ch2;
|
||||
off_t byte, line;
|
||||
|
Loading…
Reference in New Issue
Block a user