
Data Structures | |
| struct | _XTag |
| struct | _XAttribute |
| struct | _XTagParser |
Defines | |
| #define | MIN(a, b) ((a)<(b)?(a):(b)) |
| #define | MAX(a, b) ((a)>(b)?(a):(b)) |
| #define | X_NONE 0 |
| #define | X_WHITESPACE 1<<0 |
| #define | X_OPENTAG 1<<1 |
| #define | X_CLOSETAG 1<<2 |
| #define | X_DQUOTE 1<<3 |
| #define | X_SQUOTE 1<<4 |
| #define | X_EQUAL 1<<5 |
| #define | X_SLASH 1<<6 |
| #define | FORWARD(N) |
Typedefs | |
| typedef struct _XTag | XTag |
| typedef struct _XAttribute | XAttribute |
| typedef struct _XTagParser | XTagParser |
Functions | |
| void | xtag_free (XTag *xtag) |
| XTag * | xtag_new_parse (const char *s, int n) |
| char * | xtag_get_name (XTag *xtag) |
| char * | xtag_get_pcdata (XTag *xtag) |
| char * | xtag_get_attribute (XTag *xtag, const char *attribute) |
| XTag * | xtag_first_child (XTag *xtag, const char *name) |
| XTag * | xtag_next_child (XTag *xtag, char *name) |
| int | xtag_snprint (char *buf, int n, XTag *xtag) |
| static int | xtag_cin (char c, int char_class) |
| static int | xtag_index (XTagParser *parser, int char_class) |
| static void | xtag_skip_over (XTagParser *parser, int char_class) |
| static void | xtag_skip_whitespace (XTagParser *parser) |
| static char * | xtag_slurp_to (XTagParser *parser, int good_end, int bad_end) |
| static int | xtag_assert_and_pass (XTagParser *parser, int char_class) |
| static char * | xtag_slurp_quoted (XTagParser *parser) |
| static XAttribute * | xtag_parse_attribute (XTagParser *parser) |
| static XTag * | xtag_parse_tag (XTagParser *parser) |
| static int | xtag_snprints (char *buf, int n,...) |
| #define FORWARD | ( | N | ) |
| #define MAX | ( | a, | |||
| b | ) | ((a)>(b)?(a):(b)) |
| #define MIN | ( | a, | |||
| b | ) | ((a)<(b)?(a):(b)) |
Referenced by Play(), RGB2HSV(), and xtag_snprints().
| #define X_CLOSETAG 1<<2 |
Referenced by xtag_cin(), xtag_parse_attribute(), and xtag_parse_tag().
| #define X_DQUOTE 1<<3 |
Referenced by xtag_cin(), and xtag_slurp_quoted().
| #define X_EQUAL 1<<5 |
Referenced by xtag_cin(), and xtag_parse_attribute().
| #define X_NONE 0 |
Referenced by xtag_parse_tag().
| #define X_OPENTAG 1<<1 |
Referenced by xtag_cin(), and xtag_parse_tag().
| #define X_SLASH 1<<6 |
Referenced by xtag_cin(), xtag_parse_attribute(), and xtag_parse_tag().
| #define X_SQUOTE 1<<4 |
Referenced by xtag_cin(), and xtag_slurp_quoted().
| #define X_WHITESPACE 1<<0 |
Referenced by xtag_cin(), xtag_parse_attribute(), xtag_parse_tag(), and xtag_skip_whitespace().
| typedef struct _XAttribute XAttribute |
| typedef struct _XTagParser XTagParser |
| static int xtag_assert_and_pass | ( | XTagParser * | parser, | |
| int | char_class | |||
| ) | [static] |
References _XTagParser::start, _XTagParser::valid, and xtag_cin().
Referenced by xtag_parse_attribute(), xtag_parse_tag(), and xtag_slurp_quoted().
| static int xtag_cin | ( | char | c, | |
| int | char_class | |||
| ) | [static] |
References X_CLOSETAG, X_DQUOTE, X_EQUAL, X_OPENTAG, X_SLASH, X_SQUOTE, and X_WHITESPACE.
Referenced by xtag_assert_and_pass(), xtag_index(), xtag_parse_tag(), xtag_skip_over(), xtag_slurp_quoted(), and xtag_slurp_to().
References _XTag::children, _XTag::current_child, _XList::data, _XTag::name, and _XList::next.
Referenced by ParseText(), and xtag_next_child().
| static void xtag_free | ( | XTag * | xtag | ) |
References _XTag::attributes, _XTag::children, _XList::data, _XAttribute::name, _XTag::name, _XList::next, _XTag::pcdata, _XAttribute::value, and xlist_free().
Referenced by ReaderDelete(), and xtag_new_parse().
| char * xtag_get_attribute | ( | XTag * | xtag, | |
| const char * | attribute | |||
| ) |
References _XTag::attributes, _XList::data, _XAttribute::name, _XList::next, and _XAttribute::value.
Referenced by ParseText().
| static char * xtag_get_name | ( | XTag * | xtag | ) |
| char * xtag_get_pcdata | ( | XTag * | xtag | ) |
References _XTag::children, _XList::data, _XList::next, and _XTag::pcdata.
Referenced by ParseText().
| static int xtag_index | ( | XTagParser * | parser, | |
| int | char_class | |||
| ) | [static] |
References _XTagParser::end, i, _XTagParser::start, and xtag_cin().
Referenced by xtag_parse_tag(), and xtag_slurp_to().
| static XTag * xtag_new_parse | ( | const char * | s, | |
| int | n | |||
| ) |
References _XTag::attributes, _XTag::children, _XTag::current_child, _XTagParser::current_tag, _XTagParser::end, _XTag::name, _XTag::parent, _XTag::pcdata, _XTagParser::start, _XTagParser::valid, xlist_append(), xtag_free(), and xtag_parse_tag().
Referenced by ParseText(), and ReaderCreate().
References _XTag::current_child, _XList::data, _XTag::name, _XList::next, and xtag_first_child().
Referenced by ReaderRead().
| static XAttribute* xtag_parse_attribute | ( | XTagParser * | parser | ) | [static] |
References _XAttribute::name, name, _XTagParser::start, _XTagParser::valid, _XAttribute::value, X_CLOSETAG, X_EQUAL, X_SLASH, X_WHITESPACE, xtag_assert_and_pass(), xtag_skip_whitespace(), xtag_slurp_quoted(), and xtag_slurp_to().
Referenced by xtag_parse_tag().
| static XTag* xtag_parse_tag | ( | XTagParser * | parser | ) | [static] |
References _XTag::attributes, _XTag::children, _XTag::current_child, _XTagParser::current_tag, _XTag::name, name, _XTag::parent, _XTag::pcdata, _XTagParser::start, _XTagParser::valid, X_CLOSETAG, X_NONE, X_OPENTAG, X_SLASH, X_WHITESPACE, xlist_append(), xtag_assert_and_pass(), xtag_cin(), xtag_parse_attribute(), xtag_skip_whitespace(), and xtag_slurp_to().
Referenced by xtag_new_parse(), and xtag_parse_tag().
| static void xtag_skip_over | ( | XTagParser * | parser, | |
| int | char_class | |||
| ) | [static] |
References _XTagParser::end, i, _XTagParser::start, _XTagParser::valid, and xtag_cin().
Referenced by xtag_skip_whitespace().
| static void xtag_skip_whitespace | ( | XTagParser * | parser | ) | [static] |
References X_WHITESPACE, and xtag_skip_over().
Referenced by xtag_parse_attribute(), xtag_parse_tag(), and xtag_slurp_quoted().
| static char* xtag_slurp_quoted | ( | XTagParser * | parser | ) | [static] |
References _XTagParser::start, _XTagParser::valid, X_DQUOTE, X_SQUOTE, xtag_assert_and_pass(), xtag_cin(), and xtag_skip_whitespace().
Referenced by xtag_parse_attribute().
| static char* xtag_slurp_to | ( | XTagParser * | parser, | |
| int | good_end, | |||
| int | bad_end | |||
| ) | [static] |
References _XTagParser::start, _XTagParser::valid, xtag_cin(), and xtag_index().
Referenced by xtag_parse_attribute(), and xtag_parse_tag().
| int xtag_snprint | ( | char * | buf, | |
| int | n, | |||
| XTag * | xtag | |||
| ) |
| static int xtag_snprints | ( | char * | buf, | |
| int | n, | |||
| ... | ||||
| ) | [static] |
1.5.6