version 1.5, 1996/07/11 11:57:09 |
version 1.6, 1996/07/12 07:23:59 |
|
|
|
|
debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value); |
debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value); |
|
|
if (strlen(name) > sizeof(ebuf)-12) |
|
yyerror("name is too long"); |
|
n = 0; |
n = 0; |
for (cp = name; *cp; ) |
for (cp = name; *cp; ) |
n += *cp++; |
n += *cp++; |
|
|
continue; |
continue; |
if (action != LOOKUP) { |
if (action != LOOKUP) { |
if (action != INSERT || s->s_type != CONST) { |
if (action != INSERT || s->s_type != CONST) { |
(void) sprintf(ebuf, "%s redefined", name); |
(void) snprintf(ebuf, sizeof(ebuf), "%s redefined", name); |
yyerror(ebuf); |
yyerror(ebuf); |
} |
} |
} |
} |
|
|
} |
} |
|
|
if (action == LOOKUP) { |
if (action == LOOKUP) { |
(void) sprintf(ebuf, "%s undefined", name); |
(void) snprintf(ebuf, sizeof(ebuf), "%s undefined", name); |
yyerror(ebuf); |
yyerror(ebuf); |
return(NULL); |
return(NULL); |
} |
} |