View | Details | Raw Unified
Collapse All | Expand All

(-) bsdsfv.c (-16 / +30 lines)
 Lines 37-45    Link Here 
#define FNAMELEN		250
#define FNAMELEN		250
#define MAXSFVFILE		1024
#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 MISSINGTAG 		".missing"
#define BADTAG 			".bad"
#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
typedef struct sfvtable
{
{
 Lines 523-529    Link Here 
			  if (listedcrc == mycrc)
			  if (listedcrc == mycrc)
				{
				{
				  printf ("OK\n");
				  printf ("%s %s%s %s\n", OPENBRACKET, OKCOLOR, OKMSG, CLOSEBRACKET);
				  if (glftpdmode)
				  if (glftpdmode)
					{
					{
					  sprintf (crap, "%s%s", sfvTable[0].filename,
					  sprintf (crap, "%s%s", sfvTable[0].filename,
 Lines 535-541    Link Here 
				}
				}
			  else
			  else
				{
				{
				  printf ("BAD\n");
				  printf ("%s %s%s %s\n", OPENBRACKET, BADCOLOR, BADMSG, CLOSEBRACKET);
				  badfiles++;
				  badfiles++;
				  if (glftpdmode)
				  if (glftpdmode)
					{
					{
 Lines 549-564    Link Here 
			}
			}
		  else
		  else
			{
			{
			  printf ("MISSING\n");
			  printf ("%s %s%s %s\n", OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET);
			  missingfiles++;
			  missingfiles++;
			}
			}
		  numfiles++;
		  numfiles++;
		  paramcnt++;
		  paramcnt++;
		}
		}
	  printf ("\n%d file(s) tested - %d OK - %d bad - %d missing...\n",
	  printf ("\n%d file(s) tested - %s %s%d %s %s - %s %s%d %s %s - %s %s%d %s %s ...\n\n",
			  numfiles, numfiles - badfiles - missingfiles, badfiles,
	  	numfiles,
			  missingfiles);
	  	OPENBRACKET, OKCOLOR, numfiles - (badfiles + missingfiles), OKMSG, CLOSEBRACKET,
	  	OPENBRACKET, BADCOLOR, badfiles, BADMSG, CLOSEBRACKET,
	  	OPENBRACKET, MISSINGCOLOR, missingfiles, MISSINGMSG, CLOSEBRACKET);
	  if (badfiles || missingfiles)
	  if (badfiles || missingfiles)
		return 1;
		return 1;
 Lines 635-652    Link Here 
				  if (mycrc == sfvTable[cnt].crc)
				  if (mycrc == sfvTable[cnt].crc)
					{
					{
					  printf ("OK\n");
					  printf ("%s %s%s %s\n", OPENBRACKET, OKCOLOR, OKMSG, CLOSEBRACKET);
					}
					}
				  else
				  else
					{
					{
					  if (mycrc == 0xffffffff)
					  if (mycrc == 0xffffffff)
						{
						{
						  printf ("MISSING\n");
						  printf ("%s %s%s %s\n", OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET);
						  missingfiles++;
						  missingfiles++;
						}
						}
					  else
					  else
						{
						{
						  printf ("BAD\n");
						  printf ("%s %s%s %s\n", OPENBRACKET, BADCOLOR, BADMSG, CLOSEBRACKET);
						  badfiles++;
						  badfiles++;
						}
						}
					}
					}
 Lines 668-675    Link Here 
			}
			}
		  else
		  else
			{
			{
			  printf ("Testing %s ... listed = 0x%08X ... Local = MISSING",
			  printf ("Testing %s ... listed = 0x%08X ... Local =            ... %s %s%s %s\n",
						  sfvTable[cnt].filename, sfvTable[cnt].crc);
						  sfvTable[cnt].filename, sfvTable[cnt].crc,
						  OPENBRACKET, MISSINGCOLOR, MISSINGMSG, CLOSEBRACKET);
			  missingfiles++;
			  missingfiles++;
			  if (glftpdmode)
			  if (glftpdmode)
				{
				{
 Lines 714-723    Link Here 
			}
			}
		  printf ("Completion Status: %s\n", NEWTAG);
		  printf ("Completion Status: %s\n", NEWTAG);
		}
		}
			  
	  printf ("\n%d file(s) tested - %d OK - %d bad - %d missing ...\n\n",
	printf ("\n%d file(s) tested - %s %s%d %s %s - %s %s%d %s %s - %s %s%d %s %s ...\n\n",
			  numfiles, numfiles - (badfiles + missingfiles), badfiles,
			numfiles,
			  missingfiles);
			OPENBRACKET, OKCOLOR, numfiles - (badfiles + missingfiles), OKMSG, CLOSEBRACKET,
			OPENBRACKET, BADCOLOR, badfiles, BADMSG, CLOSEBRACKET,
			OPENBRACKET, MISSINGCOLOR, missingfiles, MISSINGMSG, CLOSEBRACKET);
	  if (missingfiles)
	  if (missingfiles)
		return 2;
		return 2;