bool dumpEntities = false;
main(int argc, char *argv[]){  sprintf(appName, "MathML Viewer v%s", VERSION);  bool dumpEntities = false;  while (TRUE) {    int option_index = 0;    static struct option long_options[] =    {      { "version", 	 no_argument, NULL, OPTION_VERSION },      { "help",    	 no_argument, NULL, OPTION_HELP },      { "verbose",       optional_argument, NULL, OPTION_VERBOSE },      { "dump-entities", no_argument, NULL, OPTION_DUMP_ENTITIES },      { NULL,            no_argument, NULL, 0 }    };    int c = getopt_long(argc, argv, "vh", long_options, &option_index);    if (c == -1) break;    switch (c) {    case OPTION_VERSION:    case 'v':      printVersion();      break;    case OPTION_HELP:    case 'h':      printHelp();      break;    case OPTION_DUMP_ENTITIES:      dumpEntities = true;      break;    case OPTION_VERBOSE:      if (optarg == NULL) MathEngine::logger.SetLogLevel(0);      else MathEngine::logger.SetLogLevel(*optarg - '0');      break;    case '?':      break;    default:#ifdef HAVE_IOSTREAM      cout << "*** getopt returned " << c << " value" << endl;#else      printf("*** getopt returned %o value\n", c);#endif      break;    }  }  if (optind < argc) {    GUI_init(&argc, &argv, appName, 500, 500);    if (GUI_load_document(argv[optind]) < 0)#ifdef HAVE_IOSTREAM      cout << "viewer: fatal error: cannot load document `" << argv[optind] << '\'' << endl;#else            printf("viewer: fatal error: cannot load document `%s'\n", argv[optind]);#endif    else {      if (dumpEntities) assert(NOT_IMPLEMENTED); //MathEngine::entitiesTable.Dump();      GUI_run();      GUI_uninit();      GUI_unload_document();    }  } else printHelp();  exit(0);}