static void parse_class (xmlNode *node) { xmlNode *i; gchar *name; g_assert (node); name = (gchar*)xmlGetProp (node, (const xmlChar*)"name"); if (!name) return; tagEntryInfo *tag = (tagEntryInfo*)malloc (sizeof (tagEntryInfo)); initTagEntry (tag, name); tag->isFileScope = 1; tag->kindName = "class"; tag->kind = 'c'; get_file_pos (node->line, &tag->filePosition, File.fp); tag->lineNumber = node->line; makeTagEntry (tag); for (i = node->children; i; i = i->next) { makeTags (i, name); } }
extern int main (int __unused__ argc, char **argv) { cookedArgs *args; #ifdef VMS extern int getredirection (int *ac, char ***av); /* do wildcard expansion and I/O redirection */ getredirection (&argc, &argv); #endif #ifdef AMIGA /* This program doesn't work when started from the Workbench */ if (argc == 0) exit (1); #endif #ifdef __EMX__ _wildcard (&argc, &argv); /* expand wildcards in argument list */ #endif #if defined (macintosh) && BUILD_MPW_TOOL == 0 argc = ccommand (&argv); #endif setCurrentDirectory (); setExecutableName (*argv++); sanitizeEnviron (); checkRegex (); args = cArgNewFromArgv (argv); previewFirstOption (args); testEtagsInvocation (); initializeParsing (); initOptions (); readOptionConfiguration (); verbose ("Reading initial options from command line\n"); parseOptions (args); checkOptions (); unifyLanguageMaps (); makeTags (args); /* Clean up. */ cArgDelete (args); freeKeywordTable (); freeRoutineResources (); freeSourceFileResources (); freeTagFileResources (); freeOptionResources (); freeParserResources (); freeRegexResources (); freeXcmdResources (); if (Option.guessParser) return (Option.guessParser == TRUE)? 0: 1; exit (0); return 0; }
int makeLayoutPart(DisjointBoxLayout& a_dbl, const Box& a_domainCoarsest) { // Vector<int> vecRefRat(2, 2); ParmParse pp; int eekflag= 0; int blockFactor, bufferSize, maxSize; Real fillRat; pp.get("block_factor", blockFactor); pp.get("buffer_size", bufferSize); pp.get("maxboxsize", maxSize); pp.get("fill_ratio", fillRat); int nlevels = 2; Vector<int> vecRefRat(nlevels); pp.getarr("ref_ratio", vecRefRat,0,nlevels); BRMeshRefine mesher(a_domainCoarsest, vecRefRat, fillRat, blockFactor, bufferSize, maxSize); int topLevel = 0; int baseLevel = 0; //tags at base level IntVectSet tags; eekflag = makeTags(tags, a_domainCoarsest); if (eekflag < 0) return eekflag; Vector<Vector<Box> > oldMeshes(nlevels); oldMeshes[0] = Vector<Box>(1, a_domainCoarsest); Box finerDomain = a_domainCoarsest; for (int ilev = 1; ilev < nlevels; ilev++) { finerDomain.refine(vecRefRat[ilev]); oldMeshes[ilev] = Vector<Box>(1, finerDomain); } Vector<Vector<Box> > newMeshes; mesher.regrid(newMeshes, tags, baseLevel, topLevel, oldMeshes); Vector<int> procAssign; eekflag = LoadBalance(procAssign, newMeshes[1]); if (eekflag != 0) return eekflag; a_dbl.define(newMeshes[1], procAssign); int iverbose; pp.get("verbose", iverbose); if (iverbose == 1) { pout() << "the grids coarser domain= " << a_domainCoarsest << " = " << a_dbl << endl; } return eekflag; }
extern int main (int __unused__ argc, char **argv) { cookedArgs *args; setCurrentDirectory (); setExecutableName (*argv++); sanitizeEnviron (); checkRegex (); args = cArgNewFromArgv (argv); previewFirstOption (args); testEtagsInvocation (); initializeParsing (); initOptions (); readOptionConfiguration (); verbose ("Reading initial options from command line\n"); parseOptions (args); checkOptions (); unifyLanguageMaps (); makeTags (args); /* Clean up. */ cArgDelete (args); freeKeywordTable (); freeRoutineResources (); freeSourceFileResources (); freeTagFileResources (); freeOptionResources (); freeParserResources (); freeRegexResources (); freeXcmdResources (); #ifdef HAVE_ICONV freeEncodingResources (); #endif if (Option.printLanguage) return (Option.printLanguage == TRUE)? 0: 1; exit (0); return 0; }
static void findTags (void) { xmlNode *i; xmlDocPtr doc = xmlParseFile(getInputFileName()); xmlNode *root; if (doc == NULL) { g_warning ("could not parse file"); } root = xmlDocGetRootElement(doc); for (i = root->children; i; i = i->next) { xmlNode *j; if (!i->name) continue; if (strcmp ((const char*)i->name, "namespace") !=0) continue; for (j = i->children; j; j = j->next) { makeTags (j, NULL); } } }