The error() function expects a trailing newline in its message.
Most callers do this already, so adding it to the few that don't.
lf_printf (file, "{\n");
lf_indent (file, +2);
if (function->code == NULL)
- error (function->line, "Function without body (or null statement)");
+ error (function->line, "Function without body (or null statement)\n");
lf_print__line_ref (file, function->code->line);
table_print_code (file, function->code);
if (function->is_internal)
}
if (bit == NULL && t == NULL)
error (instruction->line,
- "Conditional `%s' of field `%s' isn't expanded",
+ "Conditional `%s' of field `%s' isn't expanded\n",
condition->string, field->val_string);
switch (condition->test)
{
parse_macro_record (table *file, table_entry *record)
{
#if 1
- error (record->line, "Macros are not implemented");
+ error (record->line, "Macros are not implemented\n");
#else
/* parse the define record */
if (record->nr_fields < nr_define_fields)
if (curr->i >= 0)
return curr->i;
else
- error (NULL, "%s contains no valid names", names);
+ error (NULL, "%s contains no valid names\n", names);
return 0;
}
line_ref line; \
line.file_name = filter_filename (__FILE__); \
line.line_nr = __LINE__; \
- error (&line, EXPRESSION); \
+ error (&line, EXPRESSION "\n"); \
} while (0)
#define ASSERT(EXPRESSION) \
line_ref line; \
line.file_name = filter_filename (__FILE__); \
line.line_nr = __LINE__; \
- error(&line, "assertion failed - %s\n", #EXPRESSION); \
+ error (&line, "assertion failed - %s\n", #EXPRESSION); \
} \
} while (0)