pref->CopyCharPref( "font.default", &font_default );
pref->CopyCharPref( "font.default.x-western", &font_default );
static void mozilla_get_pref( PtWidget_t *widget, char *option, char *value ) {	PtMozillaWidget_t *moz = ( PtMozillaWidget_t * ) widget;	nsIPref *pref = moz->EmbedRef->GetPrefs();	/* HTML Options */	if( !strcmp( option, "A:link color" ) || !strcmp( option, "A:active color" ) ) {		nsXPIDLCString colorStr;		if( pref->CopyCharPref( "browser.anchor_color", getter_Copies(colorStr) ) == NS_OK )			strcpy( value, colorStr );		}	else if( !strcmp( option, "A:visited color" ) ) {		nsXPIDLCString colorStr;		if( pref->CopyCharPref( "browser.visited_color", getter_Copies(colorStr) ) == NS_OK )			strcpy( value, colorStr );		}	else if( !strcmp( option, "BODY color" ) ) {		nsXPIDLCString colorStr;		if( pref->CopyCharPref( "browser.display.foreground_color", getter_Copies(colorStr) ) == NS_OK )			strcpy( value, colorStr );		}	else if( !strcmp( option, "BODY background" ) ) {		nsXPIDLCString colorStr;		if( pref->CopyCharPref( "browser.display.background_color", getter_Copies(colorStr) ) == NS_OK )			strcpy( value, colorStr );		}	else if( !strcmp( option, "bIgnoreDocumentAttributes" ) ) {		PRBool val;		pref->GetBoolPref( "browser.display.use_document_colors", &val );		sprintf( value, "%s", val == PR_TRUE ? "FALSE" : "TRUE" );		}	else if( !strcmp( option, "disable_new_windows" ) ) {		sprintf( value, "%s", (moz->disable_new_windows == 1) ? "TRUE" : "FALSE" );		}	else if( !strcmp( option, "disable_exception_dlg" ) ) {		sprintf( value, "%s", (moz->disable_exception_dlg == 1) ? "TRUE" : "FALSE" );		}	else if( !strcmp( option, "bUnderlineLinks" ) ) {		PRBool val;		pref->GetBoolPref( "browser.underline_anchors", &val );		sprintf( value, "%s", val == PR_TRUE ? "TRUE" : "FALSE" );		}	else if( !strcmp( option, "iUserTextSize" ) ) {		sprintf( value, "%d", moz->text_zoom );		}	else if( !strcmp( option, "BODY font-family" ) || !strcmp( option, "H* font-family" ) ) {		/* set the current font */		char *font_default = NULL, *font;		char preference[256];		pref->CopyCharPref( "font.default", &font_default );		if( !font_default ) font_default = "serif";		sprintf( preference, "font.name.%s.x-western", font_default );		if( pref->CopyCharPref( preference, &font ) == NS_OK )			strcpy( value, font );		}	else if( !strcmp( option, "PRE font-family" ) ) {		/* set the current font */		char *font;		if( pref->CopyCharPref( "font.name.monospace.x-western", &font ) == NS_OK )			strcpy( value, font );		}/* HTTP options */  else if( !strcmp( option, "http_proxy_host" ) ) {		char *s;		if( pref->CopyCharPref( "network.proxy.http", &s ) == NS_OK )			strcpy( value, s );		}  else if( !strcmp( option, "http_proxy_port" ) ) {		int n;		pref->GetIntPref( "network.proxy.http_port", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "proxy_overrides" ) ) {		char *s;		if( pref->CopyCharPref( "network.proxy.no_proxies_on", &s ) == NS_OK )			strcpy( value, s );		}  else if( !strcmp( option, "https_proxy_host" ) ) {		char *s;		if( pref->CopyCharPref( "network.proxy.ssl", &s ) == NS_OK )			strcpy( value, s );    }  else if( !strcmp( option, "https_proxy_port" ) ) {		int n;		pref->GetIntPref( "network.proxy.ssl_port", &n );		sprintf( value, "%d", n );    }/* FTP options */  else if( !strcmp( option, "ftp_proxy_host" ) ) {		char *s;		if( pref->CopyCharPref( "network.proxy.ftp", &s ) == NS_OK )			strcpy( value, s );		}  else if( !strcmp( option, "ftp_proxy_port" ) ) {		int n;		pref->GetIntPref( "network.proxy.ftp_port", &n );		sprintf( value, "%d", n );		}/* Gopher options */  else if( !strcmp( option, "gopher_proxy_host" ) ) {		char *s;		if( pref->CopyCharPref( "network.proxy.gopher", &s ) == NS_OK )			strcpy( value, s );		}  else if( !strcmp( option, "gopher_proxy_port" ) ) {		int n;		pref->GetIntPref( "gopher_proxy_port", &n );		sprintf( value, "%d", n );		}/* TCP/IP options */  else if( !strcmp( option, "socket_timeout" ) ) {		int n;		pref->GetIntPref( "network.http.connect.timeout", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "max_connections" ) ) {		int n;		pref->GetIntPref( "network.http.max-connections", &n );		sprintf( value, "%d", n );		}/* Disk-cache options */  else if( !strcmp( option, "main_cache_kb_size" ) ) {		int n;		pref->GetIntPref( "browser.cache.disk.capacity", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "enable_disk_cache" ) ) {		PRBool val;		pref->GetBoolPref( "browser.cache.disk.enable", &val );		sprintf( value, "%s", val == PR_TRUE ? "TRUE" : "FALSE" );		}  else if( !strcmp( option, "dcache_verify_policy" ) ) {		int n, voyager_value = 0;		pref->GetIntPref( "browser.cache.check_doc_frequency", &n );// 0 = once-per-session, 1 = each-time, 2 = never, 3 = when-appropriate/automatically		if( n == 0 ) voyager_value = 1; /* voyager: 1 = once per session */		else if( n == 1 ) voyager_value = 2; /* voyager: 2 = always */		else if( n == 2 ) voyager_value = 0; /* voyager: 0 = never */		else voyager_value = 1; /* mapp the when-appropriate/automatically to the once per session */		sprintf( value, "%d", voyager_value );    }/* Miscellaneous options */  else if( !strcmp( option, "History_Expire" ) ) {		int n;		pref->GetIntPref( "browser.history_expire_days", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "Page_History_Length" ) ) {		int n;		pref->GetIntPref( "browser.sessionhistory.max_entries", &n );		sprintf( value, "%d", n );		}	else if( !strcmp( option, "clear_main_cache_on_exit" ) ) {		strcpy( value, "FALSE" ); /* even if not used, match this with the default value */		}	else if( !strcmp( option, "quantize_jpegs" ) ) {		strcpy( value, "FALSE" ); /* even if not used, match this with the default value */		}	else if( !strcmp( option, "ServerId" ) ) {		strcpy( value, "mozserver" );		}	else *value = 0;	}