#include "config.h"#include "mxml.h"Go to the source code of this file.
Defines | |
| #define | STATE_NONE 0 |
| #define | STATE_PREPROCESSOR 1 |
| #define | STATE_C_COMMENT 2 |
| #define | STATE_CXX_COMMENT 3 |
| #define | STATE_STRING 4 |
| #define | STATE_CHARACTER 5 |
| #define | STATE_IDENTIFIER 6 |
Functions | |
| static mxml_node_t * | add_variable (mxml_node_t *parent, const char *name, mxml_node_t *type) |
| static void | safe_strcpy (char *dst, const char *src) |
| static int | scan_file (const char *filename, FILE *fp, mxml_node_t *doc) |
| static void | sort_node (mxml_node_t *tree, mxml_node_t *func) |
| static void | update_comment (mxml_node_t *parent, mxml_node_t *comment) |
| static void | write_documentation (mxml_node_t *doc) |
| static void | write_element (mxml_node_t *doc, mxml_node_t *element) |
| static void | write_string (const char *s) |
| static const char * | ws_cb (mxml_node_t *node, int where) |
| int | main (int argc, char *argv[]) |
| #define STATE_C_COMMENT 2 |
| #define STATE_CHARACTER 5 |
| #define STATE_CXX_COMMENT 3 |
| #define STATE_IDENTIFIER 6 |
| #define STATE_NONE 0 |
| #define STATE_PREPROCESSOR 1 |
| #define STATE_STRING 4 |
| static mxml_node_t * add_variable | ( | mxml_node_t * | parent, | |
| const char * | name, | |||
| mxml_node_t * | type | |||
| ) | [static] |
Definition at line 309 of file mxmldoc.c.
References mxml_node_s::child, mxml_node_s::last_child, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(), mxmlDelete(), mxmlElementSetAttr(), mxmlNewElement(), mxml_node_s::next, node, mxml_text_s::string, mxml_value_u::text, mxml_node_s::value, and mxml_text_s::whitespace.
Referenced by scan_file().
Definition at line 155 of file mxmldoc.c.
References MXML_DESCEND, MXML_NO_CALLBACK, mxmlDelete(), mxmlElementSetAttr(), mxmlFindElement(), mxmlLoadFile(), mxmlNewElement(), mxmlSaveFile(), scan_file(), write_documentation(), and ws_cb().
| static void safe_strcpy | ( | char * | dst, | |
| const char * | src | |||
| ) | [static] |
| static int scan_file | ( | const char * | filename, | |
| FILE * | fp, | |||
| mxml_node_t * | doc | |||
| ) | [static] |
Definition at line 438 of file mxmldoc.c.
References add_variable(), mxml_node_s::child, mxml_value_u::element, mxml_node_s::last_child, MXML_ADD_AFTER, MXML_ADD_BEFORE, MXML_ADD_TO_PARENT, MXML_DESCEND_FIRST, MXML_NO_PARENT, mxmlAdd(), mxmlDelete(), mxmlElementGetAttr(), mxmlElementSetAttr(), mxmlFindElement(), mxmlNewElement(), mxmlNewText(), mxml_value_s::name, mxml_node_s::next, node, sort_node(), STATE_C_COMMENT, STATE_CHARACTER, STATE_CXX_COMMENT, STATE_IDENTIFIER, STATE_NONE, STATE_PREPROCESSOR, STATE_STRING, mxml_text_s::string, mxml_value_u::text, update_comment(), mxml_node_s::value, and mxml_text_s::whitespace.
Referenced by main().
| static void sort_node | ( | mxml_node_t * | tree, | |
| mxml_node_t * | func | |||
| ) | [static] |
Definition at line 1613 of file mxmldoc.c.
References mxml_node_s::child, mxml_value_u::element, MXML_ADD_AFTER, MXML_ADD_BEFORE, MXML_ADD_TO_PARENT, MXML_DESCEND_FIRST, mxmlAdd(), mxmlDelete(), mxmlElementGetAttr(), mxmlElementSetAttr(), mxmlFindElement(), mxml_value_s::name, mxml_node_s::next, mxml_node_s::parent, and mxml_node_s::value.
Referenced by scan_file().
| static void update_comment | ( | mxml_node_t * | parent, | |
| mxml_node_t * | comment | |||
| ) | [static] |
Definition at line 1701 of file mxmldoc.c.
References mxml_value_u::element, mxmlElementSetAttr(), mxml_value_s::name, safe_strcpy(), mxml_text_s::string, mxml_value_u::text, and mxml_node_s::value.
Referenced by scan_file().
| static void write_documentation | ( | mxml_node_t * | doc | ) | [static] |
Definition at line 1801 of file mxmldoc.c.
References mxml_node_s::child, MXML_DESCEND_FIRST, MXML_NO_DESCEND, MXML_VERSION, mxmlElementGetAttr(), mxmlFindElement(), and write_element().
Referenced by main().
| static void write_element | ( | mxml_node_t * | doc, | |
| mxml_node_t * | element | |||
| ) | [static] |
Definition at line 2611 of file mxmldoc.c.
References mxml_node_s::child, MXML_DESCEND, MXML_NO_DESCEND, MXML_TEXT, mxmlFindElement(), mxmlWalkNext(), node, mxml_text_s::string, mxml_value_u::text, mxml_node_s::type, mxml_node_s::value, mxml_text_s::whitespace, and write_string().
Referenced by write_documentation().
| static void write_string | ( | const char * | s | ) | [static] |
| static const char * ws_cb | ( | mxml_node_t * | node, | |
| int | where | |||
| ) | [static] |
Definition at line 2714 of file mxmldoc.c.
References mxml_value_u::element, MXML_WS_AFTER_CLOSE, MXML_WS_AFTER_OPEN, MXML_WS_BEFORE_CLOSE, MXML_WS_BEFORE_OPEN, mxml_value_s::name, mxml_node_s::parent, and mxml_node_s::value.
Referenced by main().
1.5.4