CacheDbVersionActionFixtureClass() : ActionTestFixtureClass() , FileTestFixtureClass(wxT("cache_db_version")) , Action(RunningThreads, wxID_ANY) , DetectorCacheAction(RunningThreads, wxID_ANY) { // need to make sure the directory exists TouchTestDir(); InitTagCache(TestProjectDir); }
long ParseXML(char *buffer, TagPtr *dict) { long length, pos; TagPtr moduleDict; #if PLIST_DEBUG gTagsParsed = 0; gLastTag = NULL; #endif if (InitTagCache()) return -1; pos = 0; while (1) { moduleDict = (TagPtr)-1; // have to detect changes to by-ref parameter length = ParseNextTag(buffer + pos, &moduleDict); if (length == -1) break; pos += length; if (moduleDict == 0) continue; // did we actually create anything? if (moduleDict != (TagPtr)-1) { if (moduleDict->type == kTagTypeDict) break; if (moduleDict->type == kTagTypeArray) break; FreeTag(moduleDict); } } *dict = moduleDict; #if PLIST_DEBUG if (length == -1) printf("ParseXML gagged (-1) after %s (%d tags); buf+pos: %s\n", gLastTag,gTagsParsed,buffer+pos); #endif // for tidyness even though kext parsing resets all of malloc FreeTagCache(); // return 0 for no error return (length != -1) ? 0 : -1; }