home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************
- * Listing 3 - ANTITEST.C Test driver for anti_venom function.
- *
- * Written by Kevin D. Weeks 10-8-89
- * Released to the Public Domain.
- *
- * Compile using small memory model and link to ANTIVENM.OBJ.
- */
- #include <stdio.h>
- #define BUF_SIZE 1024
-
- main()
- {
- int ret_code;
- char *buffer;
-
- buffer = (char *)malloc(BUF_SIZE); /* allocate an input buffer */
- ret_code = anti_venom(BUF_SIZE,buffer); /* test ourselves */
- if (ret_code == -1)
- printf("Virus detected\n");
- else
- if (ret_code == 1)
- printf("Execution error\n");
- else
- printf("OK\n");
- }
-