Now store pathnames as strings which prevents nr_MacAliasFromPath() from ever being called (it was being passed a Unix path when it really wanted a Mac path anyway). Also, autoregistration now looks inside the "components" directory (which is in the same folder as the program.) Also, bumped up registry version # due to change. Also, at startup, when building up list of arguments, check argv[0] against NULL as it might be (on the Mac).

git-svn-id: svn://10.0.0.236/trunk@22761 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rjc%netscape.com
1999-03-04 03:01:33 +00:00
parent 3b3c01c8bc
commit b668b7ec9b
4 changed files with 24 additions and 18 deletions

View File

@@ -77,10 +77,13 @@ nsCmdLineService::Initialize(int argc, char ** argv)
nsresult rv = nsnull;
//Insert the program name
mArgList.AppendElement((void *)PL_strdup("-progname"));
mArgValueList.AppendElement((void *)PL_strdup(argv[0]));
mArgCount++;
i++;
if (argv[0])
{
mArgList.AppendElement((void *)PL_strdup("-progname"));
mArgValueList.AppendElement((void *)PL_strdup(argv[0]));
mArgCount++;
i++;
}
for(i=1; i<argc; i++) {
@@ -162,7 +165,7 @@ nsCmdLineService::Initialize(int argc, char ** argv)
{
printf("Argument: %s, ****** Value: %s\n", mArgList.ElementAt(i), mArgValueList.ElementAt(i));
}
return rv;
}