, cur, "Block Comments"); (doc, cur, " ; Strings "); (doc, cur," Directives "); (doc, cur," Types "); (doc, cur," Keywords ");;
} else
{= xmlNodeListGetString (doc, cur-> xmlChildrenNode, 1); (strcmp (curNode, "type") == 0)
{_types. push_back ((const char *) key);
} else
{_keywords. push_back ((const char *) key);
} (key);
}
} = cur-> next;
};
} parseXMLDoc (xmlDocPtr doc, char * nodeName, char * curNode)
{cur; = xmlDocGetRootElement (doc); = cur-> xmlChildrenNode; (cur! = NULL)
{((! xmlStrcmp (cur-> name, (const xmlChar *) nodeName)))
{(doc, cur, curNode);
} = cur-> next;
}
} loadHighlightingData ()
{doc1; char * filename = "config. xml "; = xmlReadFile (filename, NULL, XML_PARSE_NONET); (is_valid (doc1," schema. xsd ") == 1)
{i = 0; xmldoc = NULL; * uri; ((xmldoc = xmlReadFile (filename, NULL, 0)) == NULL) return; cur = xmlDocGetRootElement (xmldoc); (xmldoc, " ; style "," entry "); (xmldoc," keywords "," keyword "); (xmldoc," types "," type "); (uri); (color); (font);
} else
{
// error in XMLXMLError; = xmlGetLastError (); _alert (XMLError-> message);
}
}
//
// 'style_parse ()' - Parse text and produce style data.
// _parse (const char * text, * style, length) {current; col; last; buf [255],
* bufptr; char * temp;
// Style letters:
//
// A - Plain
// B - Line comments
// C - Block comments
// D - Strings
// E - Directives
// F - Types
// G - Keywords (current = * style, col = 0, last = 0; length> 0; length -, text + +) {(current == 'B' | | current == 'F' | | current == 'G') current = 'A'; (current == 'A') {
// Check for directives, comments, strings, and keywords. (col == 0 && * text == '#') {
// Set style to directive = 'E';
} else if (strncmp (text, "/ /",
) == 0) {= 'B'; (; length> 0 && * text! = ' n'; length -, text + +) * style + + = ' B '; (length == 0) break;
} else if (strncmp (text, "/ *",
) == 0) {= 'C';
} else ...