free_pool_memory(msg);
/* Store the name both pass 1 and pass 2 */
if (*(item->value)) {
- scan_err2(lc, _("Attempt to redefine name \"%s\" to \"%s\"."),
- *(item->value), lc->str);
+ scan_err5(lc, _("Attempt to redefine \"%s\" from \"%s\" to \"%s\" referenced on line %d : %s\n"),
+ item->name, *(item->value), lc->str, lc->line_no, lc->line);
return;
}
*(item->value) = bstrdup(lc->str);
lex_get_token(lc, T_NAME);
/* Store the name */
if (pass == 1) {
+ if (*(item->value)) {
+ scan_err5(lc, _("Attempt to redefine \"%s\" from \"%s\" to \"%s\" referenced on line %d : %s\n"),
+ item->name, *(item->value), lc->str, lc->line_no, lc->line);
+ return;
+ }
*(item->value) = bstrdup(lc->str);
}
scan_to_eol(lc);
{
lex_get_token(lc, T_STRING);
if (pass == 1) {
+ if (*(item->value)) {
+ scan_err5(lc, _("Attempt to redefine \"%s\" from \"%s\" to \"%s\" referenced on line %d : %s\n"),
+ item->name, *(item->value), lc->str, lc->line_no, lc->line);
+ return;
+ }
*(item->value) = bstrdup(lc->str);
}
scan_to_eol(lc);
if (lc->str[0] != '|') {
do_shell_expansion(lc->str, sizeof_pool_memory(lc->str));
}
+ if (*(item->value)) {
+ scan_err5(lc, _("Attempt to redefine \"%s\" from \"%s\" to \"%s\" referenced on line %d : %s\n"),
+ item->name, *(item->value), lc->str, lc->line_no, lc->line);
+ return;
+ }
*(item->value) = bstrdup(lc->str);
}
scan_to_eol(lc);
sprintf(&sig[j], "%02x", digest[i]);
j += 2;
}
+ if (*(item->value)) {
+ scan_err5(lc, _("Attempt to redefine \"%s\" from \"%s\" to \"%s\" referenced on line %d : %s\n"),
+ item->name, *(item->value), lc->str, lc->line_no, lc->line);
+ return;
+ }
*(item->value) = bstrdup(sig);
}
scan_to_eol(lc);