Changeset 2187
- Timestamp:
- 11/01/08 13:54:06 (2 months ago)
- Files:
-
- libswish3/trunk/bindings/perl/Makefile.PL (modified) (1 diff)
- libswish3/trunk/src/libswish3/libswish3.h (modified) (1 diff)
- libswish3/trunk/src/libswish3/parser.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libswish3/trunk/bindings/perl/Makefile.PL
r2179 r2187 19 19 DEFINE => '', # e.g., '-DHAVE_SOMETHING' 20 20 INC => 21 '-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include -I/usr/include/libxml2 -I. ',21 '-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include -I/usr/include/libxml2 -I. -I../../src/libswish3', 22 22 23 23 # Un-comment this if you add C files to link with later: libswish3/trunk/src/libswish3/libswish3.h
r2184 r2187 359 359 swish_TagStack *metastack; // stacks for tracking the tag => metaname 360 360 swish_TagStack *propstack; // stacks for tracking the tag => property 361 swish_TagStack * tagstack; // stacks for tracking xml/html tagtree361 swish_TagStack *domstack; // stacks for tracking xml/html dom tree 362 362 xmlParserCtxtPtr ctxt; // so we can free at end 363 363 swish_TokenIterator *token_iterator; // token container libswish3/trunk/src/libswish3/parser.c
r2184 r2187 142 142 const xmlChar *tag 143 143 ); 144 static xmlChar *b uild_tag(144 static xmlChar *bake_tag( 145 145 swish_ParserData *parser_data, 146 146 xmlChar *tag, … … 293 293 */ 294 294 static xmlChar * 295 b uild_tag(295 bake_tag( 296 296 swish_ParserData *parser_data, 297 297 xmlChar *tag, … … 692 692 swish_xfree(parser_data->tag); 693 693 694 parser_data->tag = b uild_tag(parser_data, (xmlChar *)tag, (xmlChar **)atts);694 parser_data->tag = bake_tag(parser_data, (xmlChar *)tag, (xmlChar **)atts); 695 695 696 696 if (SWISH_DEBUG & SWISH_DEBUG_PARSER) 697 697 SWISH_DEBUG_MSG("checking config for '%s' in watched tags", parser_data->tag); 698 698 699 /* all tags on tagstack */699 /* all tags on domstack */ 700 700 701 701 if (parser_data->tag == NULL) { 702 push_tag_stack(parser_data-> tagstack, (xmlChar *)tag, (xmlChar *)tag, SWISH_DOT);702 push_tag_stack(parser_data->domstack, (xmlChar *)tag, (xmlChar *)tag, SWISH_DOT); 703 703 } 704 704 else { 705 push_tag_stack(parser_data-> tagstack, (xmlChar *)tag, parser_data->tag, SWISH_DOT);705 push_tag_stack(parser_data->domstack, (xmlChar *)tag, parser_data->tag, SWISH_DOT); 706 706 } 707 707 … … 761 761 swish_xfree(parser_data->tag); 762 762 763 parser_data->tag = b uild_tag(parser_data, (xmlChar *)tag, NULL);763 parser_data->tag = bake_tag(parser_data, (xmlChar *)tag, NULL); 764 764 765 765 if (SWISH_DEBUG & SWISH_DEBUG_PARSER) … … 782 782 } 783 783 784 // always pop the raw tagstack785 st = pop_tag_stack(parser_data-> tagstack);784 // always pop the raw domstack 785 st = pop_tag_stack(parser_data->domstack); 786 786 free_swishTag(st); 787 787 … … 1078 1078 push_tag_stack(ptr->propstack, (xmlChar *)"_", (xmlChar *)"_", SWISH_SPACE); 1079 1079 1080 ptr-> tagstack = (swish_TagStack *)swish_xmalloc(sizeof(swish_TagStack));1081 ptr-> tagstack->name = "TagStack";1082 ptr-> tagstack->head = NULL;1083 ptr-> tagstack->temp = NULL;1084 ptr-> tagstack->count = 0;1085 push_tag_stack(ptr-> tagstack, (xmlChar *)".", (xmlChar *)".", SWISH_DOT);1080 ptr->domstack = (swish_TagStack *)swish_xmalloc(sizeof(swish_TagStack)); 1081 ptr->domstack->name = "DOMStack"; 1082 ptr->domstack->head = NULL; 1083 ptr->domstack->temp = NULL; 1084 ptr->domstack->count = 0; 1085 push_tag_stack(ptr->domstack, (xmlChar *)".", (xmlChar *)".", SWISH_DOT); 1086 1086 1087 1087 /* … … 1163 1163 free_swishTagStack(ptr->metastack); 1164 1164 free_swishTagStack(ptr->propstack); 1165 free_swishTagStack(ptr-> tagstack);1165 free_swishTagStack(ptr->domstack); 1166 1166 1167 1167 /* free named buffers */
