mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
4ab8215861
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
104 lines
3.4 KiB
Diff
104 lines
3.4 KiB
Diff
--- 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;
|