version 1.109, 2012/11/24 11:06:08 |
version 1.110, 2013/11/22 15:47:35 |
|
|
p++; |
p++; |
|
|
/* Found the best match already. */ |
/* Found the best match already. */ |
if (isspace(*p) || *p == '\0') |
if (ISSPACE(*p) || *p == '\0') |
return true; |
return true; |
|
|
do { |
do { |
|
|
if (*p == '\0') |
if (*p == '\0') |
break; |
break; |
p++; |
p++; |
} while (!isspace(*p)); |
} while (!ISSPACE(*p)); |
|
|
/* No better match later on... */ |
/* No better match later on... */ |
if (*p == '\0') |
if (*p == '\0') |
|
|
const char *cp; |
const char *cp; |
|
|
do { |
do { |
for (cp = line; *cp && !isspace(*cp) && *cp != '(';) { |
for (cp = line; *cp && !ISSPACE(*cp) && *cp != '(';) { |
if (*cp == '$') |
if (*cp == '$') |
/* Must be a dynamic source (would have been |
/* Must be a dynamic source (would have been |
* expanded otherwise), so call the Var module |
* expanded otherwise), so call the Var module |
|
|
if (*line != '\0') |
if (*line != '\0') |
add_target_nodes(line, cp); |
add_target_nodes(line, cp); |
|
|
while (isspace(*cp)) |
while (ISSPACE(*cp)) |
cp++; |
cp++; |
line = cp; |
line = cp; |
} while (*line != '!' && *line != ':' && *line); |
} while (*line != '!' && *line != ':' && *line); |
|
|
cp++; /* Advance beyond operator */ |
cp++; /* Advance beyond operator */ |
|
|
/* Get to the first source */ |
/* Get to the first source */ |
while (isspace(*cp)) |
while (ISSPACE(*cp)) |
cp++; |
cp++; |
*pos = cp; |
*pos = cp; |
return op; |
return op; |
|
|
* If it was .NULL, the source is the suffix to use when a |
* If it was .NULL, the source is the suffix to use when a |
* file has no valid suffix. |
* file has no valid suffix. |
*/ |
*/ |
while (*cp && !isspace(*cp)) |
while (*cp && !ISSPACE(*cp)) |
cp++; |
cp++; |
switch (specType) { |
switch (specType) { |
case SPECIAL_SUFFIXES: |
case SPECIAL_SUFFIXES: |
|
|
} |
} |
if (*cp != '\0') |
if (*cp != '\0') |
cp++; |
cp++; |
while (isspace(*cp)) |
while (ISSPACE(*cp)) |
cp++; |
cp++; |
line = cp; |
line = cp; |
} |
} |
|
|
* archive specifications (i.e. things with left |
* archive specifications (i.e. things with left |
* parentheses in them) and handle them accordingly. |
* parentheses in them) and handle them accordingly. |
*/ |
*/ |
while (*cp && !isspace(*cp)) { |
while (*cp && !ISSPACE(*cp)) { |
if (*cp == '(' && cp > line && cp[-1] != '$') { |
if (*cp == '(' && cp > line && cp[-1] != '$') { |
/* |
/* |
* Only stop for a left parenthesis if |
* Only stop for a left parenthesis if |
|
|
if (*cp) |
if (*cp) |
cp++; |
cp++; |
} |
} |
while (isspace(*cp)) |
while (ISSPACE(*cp)) |
cp++; |
cp++; |
line = cp; |
line = cp; |
} |
} |
|
|
bool isSystem; |
bool isSystem; |
|
|
/* find starting delimiter */ |
/* find starting delimiter */ |
while (isspace(*file)) |
while (ISSPACE(*file)) |
file++; |
file++; |
|
|
/* determine type of file */ |
/* determine type of file */ |
|
|
const char *efile; |
const char *efile; |
|
|
/* find beginning of name */ |
/* find beginning of name */ |
while (isspace(*file)) |
while (ISSPACE(*file)) |
file++; |
file++; |
if (*file == '\0') { |
if (*file == '\0') { |
Parse_Error(PARSE_FATAL, "Filename missing from \"%s\"", |
Parse_Error(PARSE_FATAL, "Filename missing from \"%s\"", |
|
|
return; |
return; |
} |
} |
/* sys5 delimits file up to next blank character or end of line */ |
/* sys5 delimits file up to next blank character or end of line */ |
for (efile = file; *efile != '\0' && !isspace(*efile);) |
for (efile = file; *efile != '\0' && !ISSPACE(*efile);) |
efile++; |
efile++; |
|
|
handle_include_file(file, efile, true, errIfMissing); |
handle_include_file(file, efile, true, errIfMissing); |
|
|
bool paren_to_match = false; |
bool paren_to_match = false; |
const char *name, *ename; |
const char *name, *ename; |
|
|
while (isspace(*p)) |
while (ISSPACE(*p)) |
p++; |
p++; |
if (*p == '!') { |
if (*p == '!') { |
not = true; |
not = true; |
p++; |
p++; |
} |
} |
while (isspace(*p)) |
while (ISSPACE(*p)) |
p++; |
p++; |
if (strncmp(p, "defined", 7) == 0) { |
if (strncmp(p, "defined", 7) == 0) { |
type = POISON_DEFINED; |
type = POISON_DEFINED; |
|
|
type = POISON_EMPTY; |
type = POISON_EMPTY; |
p += 5; |
p += 5; |
} |
} |
while (isspace(*p)) |
while (ISSPACE(*p)) |
p++; |
p++; |
if (*p == '(') { |
if (*p == '(') { |
paren_to_match = true; |
paren_to_match = true; |
p++; |
p++; |
} |
} |
while (isspace(*p)) |
while (ISSPACE(*p)) |
p++; |
p++; |
name = ename = p; |
name = ename = p; |
while (*p != '\0' && !isspace(*p)) { |
while (*p != '\0' && !ISSPACE(*p)) { |
if (*p == ')' && paren_to_match) { |
if (*p == ')' && paren_to_match) { |
paren_to_match = false; |
paren_to_match = false; |
p++; |
p++; |
|
|
p++; |
p++; |
ename = p; |
ename = p; |
} |
} |
while (isspace(*p)) |
while (ISSPACE(*p)) |
p++; |
p++; |
switch(type) { |
switch(type) { |
case POISON_NORMAL: |
case POISON_NORMAL: |
|
|
{ |
{ |
const char *eline; |
const char *eline; |
|
|
while (isspace(*line)) |
while (ISSPACE(*line)) |
line++; |
line++; |
for (eline = line; !isspace(*eline) && *eline != '\0';) |
for (eline = line; !ISSPACE(*eline) && *eline != '\0';) |
eline++; |
eline++; |
Var_Deletei(line, eline); |
Var_Deletei(line, eline); |
return true; |
return true; |
|
|
{ |
{ |
char *stripped; |
char *stripped; |
|
|
while (isspace(*line)) |
while (ISSPACE(*line)) |
line++; |
line++; |
|
|
/* delegate basic classification to the conditional module */ |
/* delegate basic classification to the conditional module */ |
|
|
do { |
do { |
line = Parse_ReadNextConditionalLine(linebuf); |
line = Parse_ReadNextConditionalLine(linebuf); |
if (line != NULL) { |
if (line != NULL) { |
while (isspace(*line)) |
while (ISSPACE(*line)) |
line++; |
line++; |
stripped = strip_comments(copy, line); |
stripped = strip_comments(copy, line); |
} |
} |
|
|
return true; |
return true; |
if (FEATURES(FEATURE_SYSVINCLUDE) && |
if (FEATURES(FEATURE_SYSVINCLUDE) && |
strncmp(line, "include", 7) == 0 && |
strncmp(line, "include", 7) == 0 && |
isspace(line[7]) && |
ISSPACE(line[7]) && |
strchr(line, ':') == NULL) { |
strchr(line, ':') == NULL) { |
/* It's an S3/S5-style "include". */ |
/* It's an S3/S5-style "include". */ |
lookup_sysv_include(line + 7, "include"); |
lookup_sysv_include(line + 7, "include"); |
|
|
} |
} |
if (FEATURES(FEATURE_CONDINCLUDE) && |
if (FEATURES(FEATURE_CONDINCLUDE) && |
strncmp(line, "sinclude", 8) == 0 && |
strncmp(line, "sinclude", 8) == 0 && |
isspace(line[8]) && |
ISSPACE(line[8]) && |
strchr(line, ':') == NULL) { |
strchr(line, ':') == NULL) { |
lookup_conditional_include(line+8, "sinclude"); |
lookup_conditional_include(line+8, "sinclude"); |
return true; |
return true; |
} |
} |
if (FEATURES(FEATURE_CONDINCLUDE) && |
if (FEATURES(FEATURE_CONDINCLUDE) && |
strncmp(line, "-include", 8) == 0 && |
strncmp(line, "-include", 8) == 0 && |
isspace(line[8]) && |
ISSPACE(line[8]) && |
strchr(line, ':') == NULL) { |
strchr(line, ':') == NULL) { |
lookup_conditional_include(line+8, "-include"); |
lookup_conditional_include(line+8, "-include"); |
return true; |
return true; |
|
|
if (cmd != NULL) { |
if (cmd != NULL) { |
do { |
do { |
cmd++; |
cmd++; |
} while (isspace(*cmd)); |
} while (ISSPACE(*cmd)); |
if (*cmd != '\0') { |
if (*cmd != '\0') { |
parse_commands(targets, cmd); |
parse_commands(targets, cmd); |
*pcommands_seen = true; |
*pcommands_seen = true; |