fix for #16259, r=alecf. use the right line endings on the mac. now, instead of putting the LINEBREAK in every string, and then
writing every string to the stream, we do the line ending when we write to the stream. git-svn-id: svn://10.0.0.236/trunk@51046 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3981b8f2c8
commit
01d0e55136
@ -1071,7 +1071,7 @@ PR_IMPLEMENT(PrefResult) PREF_SavePrefFileSpecWith(
|
||||
{
|
||||
if (*walker)
|
||||
{
|
||||
stream << *walker;
|
||||
stream << *walker << nsEndl;
|
||||
PR_Free(*walker);
|
||||
}
|
||||
}
|
||||
|
||||
@ -940,19 +940,19 @@ pref_savePref(PLHashEntry *he, int i, void *arg)
|
||||
char *tmp_str = str_escape(pref->userPref.stringVal);
|
||||
if (tmp_str)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");",
|
||||
(char*) he->key, tmp_str);
|
||||
PR_Free(tmp_str);
|
||||
}
|
||||
}
|
||||
else if (pref->flags & PREF_INT)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" ,
|
||||
(char*) he->key, (long) pref->userPref.intVal);
|
||||
}
|
||||
else if (pref->flags & PREF_BOOL)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" LINEBREAK, (char*) he->key,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" , (char*) he->key,
|
||||
(pref->userPref.boolVal) ? "true" : "false");
|
||||
}
|
||||
|
||||
@ -966,19 +966,19 @@ pref_savePref(PLHashEntry *he, int i, void *arg)
|
||||
{
|
||||
char *tmp_str = str_escape(pref->defaultPref.stringVal);
|
||||
if (tmp_str) {
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");" ,
|
||||
(char*) he->key, tmp_str);
|
||||
PR_Free(tmp_str);
|
||||
}
|
||||
}
|
||||
else if (pref->flags & PREF_INT)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" ,
|
||||
(char*) he->key, (long) pref->defaultPref.intVal);
|
||||
}
|
||||
else if (pref->flags & PREF_BOOL)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" LINEBREAK, (char*) he->key,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" , (char*) he->key,
|
||||
(pref->defaultPref.boolVal) ? "true" : "false");
|
||||
}
|
||||
prefArray[i] = PL_strdup(buf);
|
||||
|
||||
@ -940,19 +940,19 @@ pref_savePref(PLHashEntry *he, int i, void *arg)
|
||||
char *tmp_str = str_escape(pref->userPref.stringVal);
|
||||
if (tmp_str)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");",
|
||||
(char*) he->key, tmp_str);
|
||||
PR_Free(tmp_str);
|
||||
}
|
||||
}
|
||||
else if (pref->flags & PREF_INT)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" ,
|
||||
(char*) he->key, (long) pref->userPref.intVal);
|
||||
}
|
||||
else if (pref->flags & PREF_BOOL)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" LINEBREAK, (char*) he->key,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" , (char*) he->key,
|
||||
(pref->userPref.boolVal) ? "true" : "false");
|
||||
}
|
||||
|
||||
@ -966,19 +966,19 @@ pref_savePref(PLHashEntry *he, int i, void *arg)
|
||||
{
|
||||
char *tmp_str = str_escape(pref->defaultPref.stringVal);
|
||||
if (tmp_str) {
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", \"%s\");" ,
|
||||
(char*) he->key, tmp_str);
|
||||
PR_Free(tmp_str);
|
||||
}
|
||||
}
|
||||
else if (pref->flags & PREF_INT)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" LINEBREAK,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %ld);" ,
|
||||
(char*) he->key, (long) pref->defaultPref.intVal);
|
||||
}
|
||||
else if (pref->flags & PREF_BOOL)
|
||||
{
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" LINEBREAK, (char*) he->key,
|
||||
PR_snprintf(buf, 2048, "user_pref(\"%s\", %s);" , (char*) he->key,
|
||||
(pref->defaultPref.boolVal) ? "true" : "false");
|
||||
}
|
||||
prefArray[i] = PL_strdup(buf);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user