int
main (
  IN int             Argc, 
  IN char            **Argv
  )
{
  COMPILER_RUN_STATUS  Status;

  SetPrintLevel(WARNING_LOG_LEVEL);
  CVfrCompiler         Compiler(Argc, Argv);
  
  Compiler.PreProcess();
  Compiler.Compile();
  Compiler.AdjustBin();
  Compiler.GenBinary();
  Compiler.GenCFile();
  Compiler.GenRecordListFile ();

  Status = Compiler.RunStatus ();
  if ((Status == STATUS_DEAD) || (Status == STATUS_FAILED)) {
    return 2;
  }

  if (gCBuffer.Buffer != NULL) {
    delete gCBuffer.Buffer;
  }
  
  if (gRBuffer.Buffer != NULL) {
    delete gRBuffer.Buffer;
  }

  return GetUtilityStatus ();
}
Пример #2
0
void PrintManager::LoadPrintLevels() {
  STATICHASH(NumPrintLevels);
  STATICHASH(PrintManager);

  int NumPrintLevels = ConfigManager::GetInt(sNumPrintLevels, 0, sPrintManager);
  for (int i = 0; i < NumPrintLevels; ++i) {
    const char* Category = ConfigManager::GetSequenceString(
        "PrintLevelCategory%d", i, nullptr, sPrintManager);
    int Level =
        ConfigManager::GetSequenceInt("PrintLevel%d", i, 0, sPrintManager);
    SetPrintLevel(Category, Level);
  }
}