printf("   EnablePM %u\n", data.enableProfileMigrator); printf("   EnableEM %u\n", data.enableExtensionManager);
printf("      Flags %08x\n", data.flags);
static const nsXREAppData* LoadAppData(const char* appDataFile){  static char vendor[256], name[256], version[32], buildID[32], copyright[512];  static nsXREAppData data = {    vendor, name, version, buildID, copyright, PR_FALSE, PR_FALSE, PR_FALSE  };    nsCOMPtr<nsILocalFile> lf;  NS_GetFileFromPath(appDataFile, getter_AddRefs(lf));  if (!lf)    return nsnull;  nsINIParser parser;   if (NS_FAILED(parser.Init(lf)))    return nsnull;  // Ensure that this file specifies a compatible XRE version.  char xreVersion[32];  nsresult rv = parser.GetString("XRE", "Version", xreVersion, sizeof(xreVersion));  if (NS_FAILED(rv) || xreVersion[0] != '0' || xreVersion[1] != '.') {    fprintf(stderr, "Error: XRE version requirement not met.\n");    return nsnull;  }  int i;  // Read string-valued fields  const struct {    const char* key;    char* buf;    size_t bufLen;    PRBool required;  } string_fields[] = {    { "Vendor",    vendor,    sizeof(vendor),    PR_FALSE },    { "Name",      name,      sizeof(name),      PR_TRUE  },    { "Version",   version,   sizeof(version),   PR_FALSE },    { "BuildID",   buildID,   sizeof(buildID),   PR_TRUE  },    { "Copyright", copyright, sizeof(copyright), PR_FALSE }  };  for (i=0; i<5; ++i) {    rv = parser.GetString("App", string_fields[i].key, string_fields[i].buf,                          string_fields[i].bufLen);    if (NS_FAILED(rv)) {      if (string_fields[i].required) {        fprintf(stderr, "Error: %x: No \"%s\" field.\n", rv,                string_fields[i].key);        return nsnull;      } else {        string_fields[i].buf[0] = '\0';      }    }  }  // Read boolean-valued fields  const struct {    const char* key;    PRBool* value;  } boolean_fields[] = {    { "EnableProfileMigrator",  &data.enableProfileMigrator },    { "EnableExtensionManager", &data.enableExtensionManager }  };  char buf[2];  for (i=0; i<2; ++i) {    rv = parser.GetString("XRE", boolean_fields[i].key, buf, sizeof(buf));    if (NS_SUCCEEDED(rv))      *(boolean_fields[i].value) =          buf[0] == '1' || buf[0] == 't' || buf[0] == 'T';  } #ifdef DEBUG  printf("---------------------------------------------------------\n");  printf("     Vendor %s\n", data.appVendor);  printf("       Name %s\n", data.appName);  printf("    Version %s\n", data.appVersion);  printf("    BuildID %s\n", data.appBuildID);  printf("  Copyright %s\n", data.copyright);  printf("   EnablePM %u\n", data.enableProfileMigrator);  printf("   EnableEM %u\n", data.enableExtensionManager);  printf("---------------------------------------------------------\n");#endif  return &data;}