--- bsdsfv.c 2003-03-17 00:26:16.000000000 -0800 +++ bsdsfv.c.pj 2003-03-26 04:41:44.000000000 -0800 @@ -37,9 +37,18 @@ #define FNAMELEN 250 #define MAXSFVFILE 1024 -#define BSDSFV_VERSION "BSDSFV for UNiX, $Revision: 1.14 $" +#define BSDSFV_VERSION "BSDSFV for UNiX, $Revision: 1.14, \e[34;01m[\e[0m \e[32;01mColorized by PJ \e[34;01m]\e[0m $" #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 { @@ -523,7 +532,7 @@ if (listedcrc == mycrc) { - printf ("OK\n"); + printf ("%s %s%s %s\n", OPENBRACKET, OKCOLOR, OKMSG, CLOSEBRACKET); if (glftpdmode) { sprintf (crap, "%s%s", sfvTable[0].filename, @@ -535,7 +544,7 @@ } else { - printf ("BAD\n"); + printf ("%s %s%s %s\n", OPENBRACKET, BADCOLOR, BADMSG, CLOSEBRACKET); badfiles++; if (glftpdmode) { @@ -549,16 +558,18 @@ } else { - printf ("MISSING\n"); + printf ("%s %s%s %s\n", OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET); missingfiles++; } numfiles++; paramcnt++; } - 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); if (badfiles || missingfiles) return 1; @@ -635,18 +646,18 @@ 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++; } } @@ -668,8 +679,9 @@ } else { - printf ("Testing %s ... listed = 0x%08X ... Local = MISSING", - sfvTable[cnt].filename, sfvTable[cnt].crc); + printf ("Testing %s ... listed = 0x%08X ... local = ... %s %s%s %s\n", + sfvTable[cnt].filename, sfvTable[cnt].crc, + OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET); missingfiles++; if (glftpdmode) { @@ -714,10 +726,12 @@ } printf ("Completion Status: %s\n", NEWTAG); } - - printf ("\n%d file(s) tested - %d OK - %d bad - %d missing ...\n\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); if (missingfiles) return 2;