/* Outputs an error message, via the #GScanner message handler.  */
void g_scanner_error(GScanner *scanner, const gchar *format,...)
/* Outputs an error message, via the #GScanner message handler.  */
void g_scanner_error(GScanner *scanner, const gchar *format,...)
{
  g_return_if_fail (scanner != NULL);
  g_return_if_fail (format != NULL);
  scanner->parse_errors++;
  if (scanner->msg_handler)
    {
      va_list args;
      gchar *string;
      va_start (args, format);
      string = g_strdup_vprintf (format, args);
      va_end (args);
      scanner->msg_handler (scanner, string, TRUE);
      g_free (string);
    }
}