version 1.8, 2008/02/04 22:36:40 |
version 1.9, 2008/02/06 10:37:10 |
|
|
#include <sys/dirent.h> |
#include <sys/dirent.h> |
#include <sys/resource.h> |
#include <sys/resource.h> |
|
|
|
#include <ctype.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
|
|
|
flags = 0; |
flags = 0; |
p = val = line; |
p = val = line; |
while (*p != ' ' && *p != '\t' && *p != '\0') |
while (!isspace(*p) && *p != '\0') |
p++; |
p++; |
|
|
if (*p == '\0') |
if (*p == '\0') |
|
|
*(p++) = '\0'; |
*(p++) = '\0'; |
module = val; |
module = val; |
|
|
while ((*p == ' ' || *p == '\t') && *p != '\0') |
while (isspace(*p)) |
p++; |
p++; |
|
|
if (*p == '\0') |
if (*p == '\0') |
goto bad; |
goto bad; |
|
|
val = p; |
val = p; |
while (*p != ' ' && *p != '\t') |
while (!isspace(*p) && *p != '\0') |
p++; |
p++; |
|
|
prog = NULL; |
prog = NULL; |
while (val[0] == '-') { |
while (val[0] == '-') { |
p = val; |
p = val; |
while (*p != ' ' && *p != '\t' && *p != '\0') |
while (!isspace(*p) && *p != '\0') |
p++; |
p++; |
|
|
if (*p == '\0') |
if (*p == '\0') |
|
|
return; |
return; |
} |
} |
|
|
if ((val = strchr(p, ' ' )) == NULL) |
val = p; |
|
while (!isspace(*val) && *val != '\0') |
|
val++; |
|
if (*val == '\0') |
goto bad; |
goto bad; |
|
|
*(val++) = '\0'; |
*(val++) = '\0'; |
|
|
dirname = NULL; |
dirname = NULL; |
TAILQ_INIT(&(mi->mi_modules)); |
TAILQ_INIT(&(mi->mi_modules)); |
TAILQ_INIT(&(mi->mi_ignores)); |
TAILQ_INIT(&(mi->mi_ignores)); |
for (sp = val; sp != NULL; sp = dp) { |
for (sp = val; *sp != '\0'; sp = dp) { |
dp = strchr(sp, ' '); |
dp = sp; |
if (dp != NULL) |
while (!isspace(*dp) && *dp != '\0') |
|
dp++; |
|
if (*dp != '\0') |
*(dp++) = '\0'; |
*(dp++) = '\0'; |
|
|
if (mi->mi_flags & MODULE_ALIAS) { |
if (mi->mi_flags & MODULE_ALIAS) { |