From 6e482312717189c6f7cf98d4a7e18b04cc72dbb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Wed, 4 Feb 2004 23:39:08 +0000 Subject: [PATCH] - merged alpha and LFS patches (it all comes to types) Changed files: cksfv-LFS.patch -> 1.2 --- cksfv-LFS.patch | 100 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 90 insertions(+), 10 deletions(-) diff --git a/cksfv-LFS.patch b/cksfv-LFS.patch index b19d185..a84afd3 100644 --- a/cksfv-LFS.patch +++ b/cksfv-LFS.patch @@ -1,6 +1,6 @@ -diff -ur cksfv-1.3.orig/src/Makefile cksfv-1.3/src/Makefile +diff -ur cksfv-1.3.orig/src/Makefile cksfv-1.3.LFS/src/Makefile --- cksfv-1.3.orig/src/Makefile 2001-07-06 08:33:08.000000000 +0200 -+++ cksfv-1.3/src/Makefile 2004-02-04 23:22:15.000000000 +0100 ++++ cksfv-1.3.LFS/src/Makefile 2004-02-04 23:55:31.000000000 +0100 @@ -17,7 +17,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -10,10 +10,56 @@ diff -ur cksfv-1.3.orig/src/Makefile cksfv-1.3/src/Makefile SRCS= cksfv.c print.c crc32.c readsfv.c newsfv.c cksfv: $(SRCS) -diff -ur cksfv-1.3.orig/src/newsfv.c cksfv-1.3/src/newsfv.c ---- cksfv-1.3.orig/src/newsfv.c 2004-02-04 23:14:26.000000000 +0100 -+++ cksfv-1.3/src/newsfv.c 2004-02-04 23:22:38.000000000 +0100 -@@ -47,7 +47,7 @@ +diff -ur cksfv-1.3.orig/src/crc32.c cksfv-1.3.LFS/src/crc32.c +--- cksfv-1.3.orig/src/crc32.c 2001-07-06 08:33:08.000000000 +0200 ++++ cksfv-1.3.LFS/src/crc32.c 2004-02-05 00:40:35.000000000 +0100 +@@ -23,7 +23,7 @@ + + #define BUFFERSIZE 16384 /* (16k) buffer size for reading from the file */ + +-static const unsigned long crctable[256] = { ++static const unsigned int crctable[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, +@@ -91,11 +91,12 @@ + }; + + +-int crc32(register int fd, unsigned long *main_val, unsigned long *main_len) ++int crc32(register int fd, unsigned int *main_val, unsigned long long *main_len) + { + char buf[BUFFERSIZE], *p; +- int len = 0, nr; +- unsigned long crc = ~0, crc32_total = ~0; ++ long long len = 0; ++ int nr; ++ unsigned int crc = ~0, crc32_total = ~0; + + while ((nr = read(fd, buf, sizeof(buf))) > 0) + for (len += nr, p = buf; nr--; ++p) { +diff -ur cksfv-1.3.orig/src/newsfv.c cksfv-1.3.LFS/src/newsfv.c +--- cksfv-1.3.orig/src/newsfv.c 2001-07-06 08:33:08.000000000 +0200 ++++ cksfv-1.3.LFS/src/newsfv.c 2004-02-04 23:55:31.000000000 +0100 +@@ -24,21 +24,22 @@ + + extern void pnsfv_head(); + extern void pfileinfo(char**); +-extern void pcrc(char*, unsigned long); +-extern int crc32(int, unsigned long*, unsigned long*); ++extern void pcrc(char*, unsigned int); ++extern int crc32(int, unsigned int*, unsigned long long*); + + int newsfv(char **argv) + { + int fd, rval = 0; + char *fn; +- unsigned long len, val; ++ unsigned long long len; ++ unsigned int val; + + pnsfv_head(); + pfileinfo(argv); while (*argv) { fn = *argv++; @@ -22,10 +68,44 @@ diff -ur cksfv-1.3.orig/src/newsfv.c cksfv-1.3/src/newsfv.c fprintf(stderr, "cksfv: %s: %s\n", fn, strerror(errno)); rval = 1; continue; -diff -ur cksfv-1.3.orig/src/readsfv.c cksfv-1.3/src/readsfv.c ---- cksfv-1.3.orig/src/readsfv.c 2004-02-04 23:14:26.000000000 +0100 -+++ cksfv-1.3/src/readsfv.c 2004-02-04 23:22:53.000000000 +0100 -@@ -87,11 +87,11 @@ +diff -ur cksfv-1.3.orig/src/print.c cksfv-1.3.LFS/src/print.c +--- cksfv-1.3.orig/src/print.c 2001-07-06 08:33:08.000000000 +0200 ++++ cksfv-1.3.LFS/src/print.c 2004-02-04 23:55:31.000000000 +0100 +@@ -59,9 +59,9 @@ + } + } + +-void pcrc(char *fn, unsigned long val) ++void pcrc(char *fn, unsigned int val) + { +- printf("%s %.8lX\n", fn, val); ++ printf("%s %.8X\n", fn, val); + } + + void prsfv_head(char *fn) +diff -ur cksfv-1.3.orig/src/readsfv.c cksfv-1.3.LFS/src/readsfv.c +--- cksfv-1.3.orig/src/readsfv.c 2001-07-06 08:33:08.000000000 +0200 ++++ cksfv-1.3.LFS/src/readsfv.c 2004-02-04 23:55:31.000000000 +0100 +@@ -28,7 +28,7 @@ + #include + #include + +-extern int crc32(int, unsigned long*, unsigned long*); ++extern int crc32(int, unsigned int*, unsigned long long*); + extern void prsfv_head(char*); + + int find_file(char*, char*); +@@ -39,7 +39,8 @@ + FILE *fd; + char buf[512], *end, filename[512], crc[9], path[256]; + int file, rval = 0; +- unsigned long len, val, sfvcrc; ++ unsigned long long len; ++ unsigned int val, sfvcrc; + + if (quiet == 0) { + prsfv_head(fn); +@@ -79,11 +80,11 @@ snprintf(path, 256, "%s/%s", dir, filename); /* can we open the file */ -- 2.43.0