home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
waffle
/
aser28.zip
/
REJECT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-01
|
760b
|
30 lines
/*
Check whether a given e-mail address is in the REJECTFILE
For ASER - Waffle Archive Server
Exit code: -1 error occurs
0 no, e-mail address is not in the REJECTFILE
x yes, e-mail address is found at line x
1991, Budi Rahardjo
*/
#include <stdio.h>
#define REJECTFILE "e:/budi/reject/reject.lst"
main(argc,argv)
int argc; char **argv;
{
int result;
if (argc < 2) {
printf("reject: needs argument\n");
exit(-1);}
result = matchstring(argv[1],REJECTFILE);
if (result <0) {
printf("reject: Error in matching\n");
exit(-1); }
printf("reject: return value will be %d\n", result);
/* if name is found in REJECTFILE return the line number */
exit(result);
}