Testing the fix for bugscape 2470 on the trunk per PDT.

Make the Unix installer support fallbacks when loading the string bundle.

b=2470
r=dbragg
a=erik


git-svn-id: svn://10.0.0.236/trunk@80902 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sgehani%netscape.com
2000-10-11 05:40:51 +00:00
parent b229d1eb8e
commit 40b8bc8c3d
7 changed files with 76 additions and 7 deletions

View File

@@ -123,13 +123,22 @@ int
nsXIContext::LoadResources()
{
int err = OK;
nsINIParser *parser = new nsINIParser(RES_FILE);
nsINIParser *parser = NULL;
char *resfile = NULL;
kvpair *currkv = NULL;
char currkey[MAX_KEY_SIZE];
int len, i;
resfile = nsINIParser::ResolveName(RES_FILE);
if (!resfile)
return E_INVALID_PTR;
parser = new nsINIParser(resfile);
if (!parser)
{
XI_IF_FREE(resfile);
return E_MEM;
}
char *strkeys[] =
{
@@ -203,6 +212,7 @@ BAIL:
{
fprintf(stderr, "FATAL ERROR: Failed to load resources!");
}
XI_IF_FREE(resfile);
XI_IF_DELETE(parser);
return err;
}