/* Get a stand-in variable name and make sure it's unique. */
if (!lex_force_id (lexer))
return false;
- if (dict_lookup_var (dict, lex_tokid (lexer)))
- msg (SW, _("Dummy variable name `%s' hides dictionary "
- "variable `%s'."),
- lex_tokid (lexer), lex_tokid (lexer));
- if (find_macro (block, ss_cstr (lex_tokid (lexer))))
+ if (dict_lookup_var (dict, lex_tokcstr (lexer)))
+ msg (SW, _("Dummy variable name `%s' hides dictionary variable `%s'."),
+ lex_tokcstr (lexer), lex_tokcstr (lexer));
+ if (find_macro (block, lex_tokss (lexer)))
{
msg (SE, _("Dummy variable name `%s' is given twice."),
- lex_tokid (lexer));
+ lex_tokcstr (lexer));
return false;
}
/* Make a new macro. */
macro = pool_alloc (block->pool, sizeof *macro);
- ss_alloc_substring_pool (¯o->name, ss_cstr (lex_tokid (lexer)),
- block->pool);
+ ss_alloc_substring_pool (¯o->name, lex_tokss (lexer), block->pool);
ll_push_tail (&block->macros, ¯o->ll);
/* Skip equals sign. */
/* Strip trailing whitespace, check for & remove terminal dot. */
ds_rtrim (line, ss_cstr (CC_SPACES));
- dot = ds_chomp (line, settings_get_endcmd ());
+ dot = ds_chomp (line, '.');
input = ds_ss (line);
in_apos = in_quote = false;
while ((c = ss_first (input)) != EOF)
}
}
if (dot)
- ds_put_byte (&output, settings_get_endcmd ());
+ ds_put_byte (&output, '.');
ds_swap (line, &output);
ds_destroy (&output);