else if (pref->flags & PREF_INT) prefValue.AppendInt(sourcePref->intVal);
if (tmp_str) { prefEntry = PR_smprintf("user_pref(\"%s\", \"%s\");", pref->key, tmp_str); PR_Free(tmp_str); } } else if (pref->flags & PREF_INT) { prefEntry = PR_smprintf("user_pref(\"%s\", %ld);", pref->key, (long) pref->userPref.intVal); } else if (pref->flags & PREF_BOOL) { prefEntry = PR_smprintf("user_pref(\"%s\", %s);", pref->key, (pref->userPref.boolVal) ? "true" : "false"); }
pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, PRUint32 i, void *arg){    char **prefArray = (char**) arg;    PrefHashEntry *pref = NS_STATIC_CAST(PrefHashEntry *, heh);    PR_ASSERT(pref);    if (!pref)        return PL_DHASH_NEXT;    nsCAutoString prefValue;    // where we're getting our pref from    PrefValue* sourcePref;    if (PREF_HAS_USER_VALUE(pref) &&         pref_ValueChanged(pref->defaultPref,                           pref->userPref,                           (PrefType) PREF_TYPE(pref)))        sourcePref = &pref->userPref;    else if (PREF_IS_LOCKED(pref))        sourcePref = &pref->defaultPref;    else        // do not save default prefs that haven't changed        return PL_DHASH_NEXT;        if (pref->flags & PREF_STRING)        str_escape(sourcePref->stringVal, prefValue);    else if (pref->flags & PREF_INT)        prefValue.AppendInt(sourcePref->intVal);    else if (pref->flags & PREF_BOOL)        prefValue = (sourcePref->boolVal) ? "true" : "false";    prefArray[i] = ToNewCString(NS_LITERAL_CSTRING("user_pref(\"") +                                nsDependentCString(pref->key) +                                NS_LITERAL_CSTRING("\", \"") +                                prefValue +                                NS_LITERAL_CSTRING("\");"));    return PL_DHASH_NEXT;}