static const char *parse_options (int argc, char **argv);
static void usage (void) NO_RETURN;
static void read_table (struct lexer *);
-static void output_msg (const struct msg *, void *);
+static void output_msg (const struct msg *, struct lexer *);
int
main (int argc, char **argv)
exit (1);
struct lexer *lexer = lex_create ();
- msg_set_handler (output_msg, lexer);
+ lex_set_message_handler (lexer, output_msg);
lex_include (lexer, reader);
lex_get (lexer);
return;
}
- lex_error (lexer, "Expecting valid value option");
+ lex_error (lexer, "Syntax error expecting valid value option.");
exit (1);
}
if (lex_match_id (lexer, table_stroke_to_string (stroke)))
return stroke;
- lex_error (lexer, "expecting stroke");
+ lex_error (lexer, "Syntax error expecting stroke.");
exit (1);
}
}
static void
-output_msg (const struct msg *m_, void *lexer_)
+output_msg (const struct msg *m_, struct lexer *lexer)
{
- struct lexer *lexer = lexer_;
struct msg m = {
.category = m_->category,
.severity = m_->severity,