diff options
-rw-r--r-- | misc/bsdsfv/bsdsfv-1.18-64bit.patch | 83 | ||||
-rw-r--r-- | misc/bsdsfv/bsdsfv-1.18-64bit.patch.gz | bin | 1001 -> 0 bytes | |||
-rw-r--r-- | misc/bsdsfv/bsdsfv-1.18-color.patch | 104 | ||||
-rw-r--r-- | misc/bsdsfv/bsdsfv-1.18-color.patch.gz | bin | 975 -> 0 bytes | |||
-rw-r--r-- | misc/bsdsfv/bsdsfv.SlackBuild | 8 |
5 files changed, 191 insertions, 4 deletions
diff --git a/misc/bsdsfv/bsdsfv-1.18-64bit.patch b/misc/bsdsfv/bsdsfv-1.18-64bit.patch new file mode 100644 index 0000000000000..d55b42d01b86e --- /dev/null +++ b/misc/bsdsfv/bsdsfv-1.18-64bit.patch @@ -0,0 +1,83 @@ +Index: bsdsfv/bsdsfv.c +=================================================================== +--- bsdsfv.orig/bsdsfv.c ++++ bsdsfv/bsdsfv.c +@@ -59,10 +59,10 @@ typedef struct sfvtable { + #include <sys/stat.h> + #include <sys/mman.h> + #include <dirent.h> ++#include <inttypes.h> + +- +-long +-UpdateCRC(unsigned long CRC, const char *buffer, long count) ++int32_t ++UpdateCRC(uint32_t CRC, const char *buffer, int32_t count) + { + /* + * Note: if you want to know how CRC32-checking works, I +@@ -70,7 +70,7 @@ UpdateCRC(unsigned long CRC, const char + * There is not much you can change in this function, so + * if you need a CRC32-check yourself, feel free to rip. + */ +- unsigned long CRCTABLE[] = { ++ uint32_t CRCTABLE[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, + 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, +@@ -175,13 +175,13 @@ UpdateCRC(unsigned long CRC, const char + + + +-long ++int32_t + GetFileCRC(char *filename) + { +- unsigned long crc = 0xffffffff; ++ uint32_t crc = 0xffffffff; + FILE *f; +- long totalread = 0; +- long localread; ++ int32_t totalread = 0; ++ int32_t localread; + + /* + * Note: different buffer sizes may result in noticable +@@ -306,7 +306,7 @@ main(int argc, char *argv[]) + FILE *missingfile; + DIR *dirp; + struct dirent *dp; +- long mycrc; ++ int32_t mycrc; + int cnt; + int dothisone; + char cfname[FNAMELEN]; +@@ -487,8 +487,8 @@ main(int argc, char *argv[]) + printf("Adding file: %s ... ", cfname); + fflush(stdout); + mycrc = GetFileCRC(cfname); +- printf("CRC = 0x%08lX\n", mycrc); +- sprintf(sfvline, "%s %08lX", cfname, mycrc); ++ printf("CRC = 0x%08" PRIX32 "\n", mycrc); ++ sprintf(sfvline, "%s %08" PRIX32, cfname, mycrc); + + // uncomment next 2 lines to + // convert filename to upper case, for whatever reason +@@ -516,7 +516,7 @@ main(int argc, char *argv[]) + printf("Testing %s ... ", cfname); + fflush(stdout); + mycrc = GetFileCRC(cfname); +- printf("local = 0x%08lX, listed = ", mycrc); ++ printf("local = 0x%08" PRIX32 ", listed = ", mycrc); + fflush(stdout); + + sfvfile = fopen(sfvname, "rt"); +@@ -675,7 +675,7 @@ main(int argc, char *argv[]) + + mycrc = GetFileCRC(dp->d_name); + +- printf("local = 0x%08lX ... ", mycrc); ++ printf("local = 0x%08" PRIX32 " ... ", mycrc); + + if (mycrc == sfvTable[cnt].crc) { + printf("OK\n"); diff --git a/misc/bsdsfv/bsdsfv-1.18-64bit.patch.gz b/misc/bsdsfv/bsdsfv-1.18-64bit.patch.gz Binary files differdeleted file mode 100644 index 4ef428f113875..0000000000000 --- a/misc/bsdsfv/bsdsfv-1.18-64bit.patch.gz +++ /dev/null diff --git a/misc/bsdsfv/bsdsfv-1.18-color.patch b/misc/bsdsfv/bsdsfv-1.18-color.patch new file mode 100644 index 0000000000000..92607f96f3de6 --- /dev/null +++ b/misc/bsdsfv/bsdsfv-1.18-color.patch @@ -0,0 +1,104 @@ +--- bsdsfv.orig/bsdsfv.c 2003-10-05 03:07:45.000000000 +0200 ++++ bsdsfv/bsdsfv.c 2009-11-11 09:04:53.000000000 +0100 +@@ -40,6 +40,14 @@ + #define BSDSFV_VERSION "BSDSFV for UNiX, $Revision: 1.18 $" + #define MISSINGTAG ".missing" + #define BADTAG ".bad" ++#define OPENBRACKET "\e[34;01m[\e[0m" ++#define CLOSEBRACKET "\e[34;01m]\e[0m" ++#define OKCOLOR "\e[32;01m" ++#define OKMSG "OK" ++#define BADCOLOR "\e[31;01m" ++#define BADMSG "BAD" ++#define MISSINGCOLOR "\e[33;01m" ++#define MISSINGMSG "MISSING" + + typedef struct sfvtable { + char filename[FNAMELEN]; +@@ -558,7 +566,7 @@ + printf("0x%08X - ", sfvTable[0].crc); + + if (sfvTable[0].crc == mycrc) { +- printf("OK\n"); ++ printf ("%s %s%s %s\n", OPENBRACKET, OKCOLOR, OKMSG, CLOSEBRACKET); + if (glftpdmode) { + sprintf(crap, "%s%s", + sfvTable[0].filename, +@@ -570,7 +578,7 @@ + unlink(crap); + } + } else { +- printf("BAD\n"); ++ printf ("%s %s%s %s\n", OPENBRACKET, BADCOLOR, BADMSG, CLOSEBRACKET); + badfiles++; + if (glftpdmode) { + sprintf(crap, "%s%s", +@@ -584,7 +592,7 @@ + } + } + } else { +- printf("MISSING\n"); ++ printf ("%s %s%s %s\n", OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET); + missingfiles++; + } + numfiles++; +@@ -592,10 +600,11 @@ + fclose(sfvfile); + } + +- printf +- ("\n%d file(s) tested - %d OK - %d bad - %d missing...\n", +- numfiles, numfiles - badfiles - missingfiles, badfiles, +- missingfiles); ++ printf ("\n%d file(s) tested - %s %s%d %s %s - %s %s%d %s %s - %s %s%d %s %s ...\n\n", ++ numfiles, ++ OPENBRACKET, OKCOLOR, numfiles - (badfiles + missingfiles), OKMSG, CLOSEBRACKET, ++ OPENBRACKET, BADCOLOR, badfiles, BADMSG, CLOSEBRACKET, ++ OPENBRACKET, MISSINGCOLOR, missingfiles, MISSINGMSG, CLOSEBRACKET); + fflush(stdout); + + +@@ -678,13 +687,13 @@ + printf("local = 0x%08lX ... ", mycrc); + + if (mycrc == sfvTable[cnt].crc) { +- printf("OK\n"); ++ printf ("%s %s%s %s\n", OPENBRACKET, OKCOLOR, OKMSG, CLOSEBRACKET); + } else { + if (mycrc == 0xffffffff) { +- printf("MISSING\n"); ++ printf ("%s %s%s %s\n", OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET); + missingfiles++; + } else { +- printf("BAD\n"); ++ printf ("%s %s%s %s\n", OPENBRACKET, BADCOLOR, BADMSG, CLOSEBRACKET); + badfiles++; + } + } +@@ -704,8 +713,9 @@ + } + } else { + printf +- ("Testing %s ... listed = 0x%08X ... Local = MISSING\n", +- sfvTable[cnt].filename, sfvTable[cnt].crc); ++ ("Testing %s ... listed = 0x%08X ... Local = ... %s %s%s %s\n", ++ sfvTable[cnt].filename, sfvTable[cnt].crc, ++ OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET); + missingfiles++; + if (glftpdmode) { + sprintf(crap, "%s%s", +@@ -751,9 +761,11 @@ + } + + printf +- ("\n%d file(s) tested - %d OK - %d bad - %d missing ...\n\n", +- numfiles, numfiles - (badfiles + missingfiles), badfiles, +- missingfiles); ++ ("\n%d file(s) tested - %s %s%d %s %s - %s %s%d %s %s - %s %s%d %s %s ...\n\n", ++ numfiles, ++ OPENBRACKET, OKCOLOR, numfiles - (badfiles + missingfiles), OKMSG, CLOSEBRACKET, ++ OPENBRACKET, BADCOLOR, badfiles, BADMSG, CLOSEBRACKET, ++ OPENBRACKET, MISSINGCOLOR, missingfiles, MISSINGMSG, CLOSEBRACKET); + + if (missingfiles) + return 2; diff --git a/misc/bsdsfv/bsdsfv-1.18-color.patch.gz b/misc/bsdsfv/bsdsfv-1.18-color.patch.gz Binary files differdeleted file mode 100644 index ab174f777220e..0000000000000 --- a/misc/bsdsfv/bsdsfv-1.18-color.patch.gz +++ /dev/null diff --git a/misc/bsdsfv/bsdsfv.SlackBuild b/misc/bsdsfv/bsdsfv.SlackBuild index 5e8a68fd5f507..6e5a0599c9326 100644 --- a/misc/bsdsfv/bsdsfv.SlackBuild +++ b/misc/bsdsfv/bsdsfv.SlackBuild @@ -62,11 +62,11 @@ chown -R root:root . chmod -R a-s,u+rw,go+r-w . #64bit patch borrowed from gentoo -zcat $CWD/bsdsfv-1.18-64bit.patch.gz | patch -p1 --verbose --backup --suffix=.orig +patch -p1 < $CWD/bsdsfv-1.18-64bit.patch -if [ $COLOR != no ]; then -#colorpatch made with help of pj's old gentoo patch -zcat $CWD/bsdsfv-1.18-color.patch.gz | patch -p1 --verbose --backup --suffix=.orig2 +if [ "$COLOR" != no ]; then + #colorpatch made with help of pj's old gentoo patch + patch -p1 < $CWD/bsdsfv-1.18-color.patch fi make CFLAGS="$SLKCFLAGS -Wall" || exit 1 |