4 * Private functions for Mini-XML, a small XML-like file parsing library.
6 * Copyright 2003-2005 by Michael Sweet.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
20 * mxml_error() - Display an error message.
21 * mxml_integer_cb() - Default callback for integer values.
22 * mxml_opaque_cb() - Default callback for opaque values.
23 * mxml_real_cb() - Default callback for real number values.
27 * Include necessary headers...
35 * Error callback function...
38 void (*mxml_error_cb
)(const char *) = NULL
;
42 * 'mxml_error()' - Display an error message.
46 mxml_error(const char *format
, /* I - Printf-style format string */
47 ...) /* I - Additional arguments as needed */
49 va_list ap
; /* Pointer to arguments */
50 char *s
; /* Message string */
54 * Range check input...
61 * Format the error message string...
66 s
= mxml_strdupf(format
, ap
);
71 * And then display the error message...
77 fprintf(stderr
, "mxml: %s\n", s
);
88 * 'mxml_integer_cb()' - Default callback for integer values.
91 mxml_type_t
/* O - Node type */
92 mxml_integer_cb(mxml_node_t
*node
) /* I - Current node */
96 return (MXML_INTEGER
);
101 * 'mxml_opaque_cb()' - Default callback for opaque values.
104 mxml_type_t
/* O - Node type */
105 mxml_opaque_cb(mxml_node_t
*node
) /* I - Current node */
109 return (MXML_OPAQUE
);
114 * 'mxml_real_cb()' - Default callback for real number values.
117 mxml_type_t
/* O - Node type */
118 mxml_real_cb(mxml_node_t
*node
) /* I - Current node */