46 if (!ROXML_PARSER_ITEM(parser, *key)->func) {
48 ROXML_PARSER_ITEM(parser, *key)->func = func;
49 }
else if (!ROXML_PARSER_ITEM(parser, *key)->next){
57 while (collision->func)
61 ROXML_PARSER_ITEM(parser, *key)->next = collision;
62 collision->func = ROXML_PARSER_ITEM(parser, *key)->func;
63 collision->next = collision + 1;
67 collision->func = func;
68 collision->next = NULL;
70 ROXML_PARSER_ITEM(parser, *key)->func = roxml_parser_multiple;
75 while (collision->next)
76 collision = collision->next;
78 while (collision->func)
80 last->next = collision;
81 collision->func = func;
82 collision->next = NULL;
112 collision =
new + ROXML_PARSER_NCELLS;
114 for (i = 0; i < ROXML_PARSER_NCELLS; i++) {
116 if (parser[i].func) {
117 new[i].func = parser[i].func;
119 if (parser[i].next) {
122 new[i].next = collision;
126 collision->func = item->func;
129 collision->next = collision + 1;
133 collision = collision->next;
139 new[i].func = parser[0].func;
140 new[i].next = parser[0].next;
151 char *line_end = line;
155 line_end = line + len;
157 line_end = line + strlen(line);
159 while (chunk < line_end) {
161 int ret = ROXML_PARSER_ITEM(parser, *chunk)->func(parser, chunk, ctx);
166 }
else if (ret < 0) {
171 ret = ROXML_PARSER_ITEM(parser, 0)->func(parser, chunk, ctx);
176 }
else if (ret < 0) {
181 return (chunk - line);