home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
tags18.zip
/
VIRUSCRC.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-05
|
1KB
|
50 lines
/*
VIRUSCRC.H
Kevin Dean
Fairview Mall P.O. Box 55074
1800 Sheppard Avenue East
Willowdale, Ontario
CANADA M2J 5B9
CompuServe ID: 76336,3114
March 24, 1991
This is the interface to the anti-virus CRC check in VALIDCRC.C
This code is public domain.
*/
typedef
unsigned long crc32_t;
union filecrc {
char searchstr[8]; /* String to search for. */
struct {
crc32_t polynomial; /* Polynomial for this file. */
crc32_t crc; /* Calculated CRC for this file. */
} x;
};
extern const union filecrc _viruscrc;
/* CRC validation return codes. */
enum {
CRC_VALID, /* CRC is valid. */
CRC_INVALID, /* CRC is invalid. */
CRC_ISZERO, /* CRC polynomial has been reset to zero. */
CRC_NOMEM, /* No memory for data buffer. */
CRC_FILEERR /* Program file not found. */
};
int validatecrc(const char *progname);
/* isvalidcrc() is declared to maintain compatibility with earlier releases. */
#define isvalidcrc(progname) (validatecrc(progname) == CRC_VALID)