Exemple #1
0
void processFiles(WCHAR* outname)
{
	int tally;
	// parse def info into vector
	printf("parsing def...");
	parseDef();
	printf("done! %d items found.\nparsing txt...", g_items.size());
	parseTxt();
	printf("done! %d items found.\n", g_txt.size());
	// iterate vector to find and mark disabled instances in infile.txt
	printf("tidying things up...\n");
	checkTxt();
	printf("writing result to %S...", outname);
	tally = writeOutput(outname);
	printf("Done!\n%d of %d items were commented out\n", tally, g_items.size());
}
Exemple #2
0
void FilterValParser::parse(filterValList_t *list)
{
    xmlNodePtr cur;

    cur = xmlDocGetRootElement(XMLDoc);

    cur = cur->xmlChildrenNode;
    while (cur != NULL) {
	 
        if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEF")) && (cur->ns == ns)) {
            // parse
            filterValItem_t item = parseDef(cur);
            // add 
            list->insert(make_pair(item.name, item));
#ifdef DEBUG	
            log->dlog(ch, "%s = %s", item.name.c_str(), item.svalue.c_str());
#endif	
        } 

        cur = cur->next;
    }
}