char **prefArray = (char**) arg;
pref_saveArgs *argData = NS_STATIC_CAST(pref_saveArgs *, arg);
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;    // strings are in quotes!    if (pref->flags & PREF_STRING) {        prefValue = '\"';        str_escape(sourcePref->stringVal, prefValue);        prefValue += '\"';    }    else if (pref->flags & PREF_INT)        prefValue.AppendInt(sourcePref->intVal);    else if (pref->flags & PREF_BOOL)        prefValue = (sourcePref->boolVal) ? "true" : "false";    nsCAutoString prefName;    str_escape(pref->key, prefName);    prefArray[i] = ToNewCString(NS_LITERAL_CSTRING("user_pref(\"") +                                prefName +                                NS_LITERAL_CSTRING("\", ") +                                prefValue +                                NS_LITERAL_CSTRING(");"));    return PL_DHASH_NEXT;}