2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)exclude.c 1.9 04/03/04 joerg */
15 * 9-Dec-93 R.-D. Marzusch, marzusch@odiehh.hanse.de:
16 * added 'exclude' option (-x) to specify pathnames NOT to be included in
28 /* this allows for 1000 entries to be excluded ... */
31 static char *excl[MAXEXCL];
33 void exclude(char *fn);
34 int is_excluded(char *fn);
42 for (i = 0; excl[i] && i < MAXEXCL; i++)
47 "Can't exclude '%s' - too many entries in table\n",
51 excl[i] = (char *) malloc(strlen(fn) + 1);
52 if (excl[i] == NULL) {
54 errmsg("Can't allocate memory for excluded filename\n");
57 "Can't allocate memory for excluded filename\n");
70 * very dumb search method ...
72 for (i = 0; excl[i] && i < MAXEXCL; i++) {
73 if (strcmp(excl[i], fn) == 0) {
74 return (1); /* found -> excluded filenmae */
77 return (0); /* not found -> not excluded */