printf("Mozilla XULRunner %s %s\n", MOZILLA_VERSION, BUILD_ID);
printf("Mozilla XULRunner %s %d\n", MOZILLA_VERSION, BUILD_ID);
int main(int argc, char* argv[]){  if (argc == 1 || IsArg(argv[1], "h")                || IsArg(argv[1], "help")                || IsArg(argv[1], "?"))  {    printf("Usage: " XULRUNNER_PROGNAME " [OPTIONS] [APP-FILE [APP-OPTIONS...]]\n");    if (argc > 1)    {      // display additional information (XXX make localizable)      printf("\n"             "OPTIONS\n"             "      --app        specify APP-FILE (optional)\n"             "  -h, --help       show this message\n"             "  -v, --version    show version\n"             "\n"             "APP-FILE\n"             "  Application initialization file.\n"             "\n"             "APP-OPTIONS\n"             "  Application specific options.\n");    }    return 0;  }  if (argc == 2 && (IsArg(argv[1], "v") || IsArg(argv[1], "version")))  {    printf("Mozilla XULRunner %s %s\n", MOZILLA_VERSION, BUILD_ID);    return 0;  }  geckoVersion = ParseVersion(GRE_BUILD_ID);  PRBool hasAppOption;  const char *appDataFile;  if (IsArg(argv[1], "app"))  {    if (argc == 2)    {      fprintf(stderr, "Error: APP-FILE must be specified!\n");      return 1;    }    hasAppOption = PR_TRUE;    appDataFile = argv[2];  }  else  {    hasAppOption = PR_FALSE;    appDataFile = argv[1];  }  const nsXREAppData *appData = LoadAppData(appDataFile);  if (!appData)  {    fprintf(stderr, "Error: Invalid or missing application data!\n");    return 1;  }  char **argv2 = NULL;  if (!hasAppOption)  {    // fixup argv to start with -app.    argv2 = (char **) malloc(sizeof(char*) * (argc + 2));    argv2[0] = argv[0];    argv2[1] = "-app";    for (int i=1; i<argc; ++i)      argv2[i+1] = argv[i];    argv2[argc+1] = NULL;    argv = argv2;    argc++;  }  int rv = XRE_main(argc, argv, appData);  if (argv2)    free(argv2);  return rv;}