void GenCOptions( // PROCESS ALL OPTIONS char **argv ) // - command line vector { auto OPT_STORAGE data; char* env_var; // - environment var for compiler indirectionLevel = 0; InitModInfo(); CmdLnCtxInit(); CmdSysInit(); OPT_INIT( &data ); if( ! CompFlags.ignore_environment ) { CtxSetCurrContext( CTX_CMDLN_ENV ); env_var = CmdSysEnvVar(); CmdLnCtxPushEnv( env_var ); procOptions( &data, CppGetEnv( env_var ) ); CmdLnCtxPop(); } CtxSetCurrContext( CTX_CMDLN_PGM ); CmdLnCtxPush( CTX_CLTYPE_PGM ); while( *argv != NULL ) { procOptions( &data, *argv ); ++argv; } CmdLnCtxPop(); CmdLnCtxFini(); CtxSetCurrContext( CTX_CMDLN_VALID ); analyseAnyTargetOptions( &data ); CmdSysAnalyse( &data ); postOptions(); OPT_FINI( &data ); MiscMacroDefs(); DbgAssert( GblPackAmount == PackAmount ); DbgAssert( GblPackAmount != 0 ); }
void RtnGenerate( void ) /**********************/ { RTN_GEN *c; bool keep_going = true; SetCurrScope( GetFileScope() ); while( keep_going ) { keep_going = false; CtxSetCurrContext( CTX_FUNC_GEN ); keep_going = ClassDefineRefdDefaults(); ScopeEmitIndexMappings(); while( useSYMBOL != NULL ) { c = useSYMBOL; useSYMBOL = c->next; keep_going = true; (*execSYMBOL[c->index])( c->parm ); CarveFree( carveRTN_GEN, c ); } while( useTYPE != NULL ) { c = useTYPE; useTYPE = c->next; keep_going = true; (*execTYPE[c->index])( c->parm ); CarveFree( carveRTN_GEN, c ); } CtxSetCurrContext( CTX_SOURCE ); keep_going = TemplateProcessInstantiations() || keep_going; SetCurrScope( GetFileScope() ); } TemplateFreeDefns(); }