struct mtf_file *next_min; /* Next in the chain of minimums. */
int type; /* One of MTF_*. */
- struct variable **by; /* List of BY variables for this file. */
+ const struct variable **by; /* List of BY variables for this file. */
struct file_handle *handle; /* File handle. */
struct any_reader *reader; /* File reader. */
struct dictionary *dict; /* Dictionary from system file. */
{
if (lex_match (lexer, T_BY))
{
- struct variable **by;
+ const struct variable **by;
if (mtf.by_cnt)
{
}
lex_match (lexer, '=');
- if (!parse_variables (lexer, mtf.dict, &by, &mtf.by_cnt,
+ if (!parse_variables_const (lexer, mtf.dict, &by, &mtf.by_cnt,
PV_NO_DUPLICATE | PV_NO_SCRATCH))
goto error;
dict_set_documents (m, d_docs);
else
{
- char *new_docs;
- size_t new_len;
-
- new_len = strlen (m_docs) + strlen (d_docs);
- new_docs = xmalloc (new_len + 1);
- strcpy (new_docs, m_docs);
- strcat (new_docs, d_docs);
+ char *new_docs = xasprintf ("%s%s", m_docs, d_docs);
dict_set_documents (m, new_docs);
free (new_docs);
}