moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.http_port", &s );
pref->CopyCharPref( "network.proxy.http_port", &s );
static void mozilla_get_pref( PtWidget_t *widget, char *option, char *value ) {	PtMozillaWidget_t *moz = ( PtMozillaWidget_t * ) widget;	/* HTML Options */	if( !strcmp( option, "A:link color" ) || !strcmp( option, "A:active color" ) ) {		nsXPIDLCString colorStr;		moz->MyBrowser->mPrefs->CopyCharPref( "browser.anchor_color", getter_Copies(colorStr) );		strcpy( value, colorStr );		}	else if( !strcmp( option, "A:visited color" ) ) {		nsXPIDLCString colorStr;		moz->MyBrowser->mPrefs->CopyCharPref( "browser.visited_color", getter_Copies(colorStr) );		strcpy( value, colorStr );		}	else if( !strcmp( option, "BODY color" ) ) {		nsXPIDLCString colorStr;		moz->MyBrowser->mPrefs->CopyCharPref( "browser.display.foreground_color", getter_Copies(colorStr) );		strcpy( value, colorStr );		}	else if( !strcmp( option, "BODY background" ) ) {		nsXPIDLCString colorStr;		moz->MyBrowser->mPrefs->CopyCharPref( "browser.display.background_color", getter_Copies(colorStr) );		strcpy( value, colorStr );		}	else if( !strcmp( option, "bIgnoreDocumentAttributes" ) ) {		PRBool val;		moz->MyBrowser->mPrefs->GetBoolPref( "browser.display.use_document_colors", &val );		sprintf( value, "%s", val == PR_TRUE ? "FALSE" : "TRUE" );		}	else if( !strcmp( option, "bUnderlineLinks" ) ) {		PRBool val;		moz->MyBrowser->mPrefs->GetBoolPref( "browser.underline_anchors", &val );		sprintf( value, "%s", val == PR_TRUE ? "TRUE" : "FALSE" );		}	else if( !strcmp( option, "iUserTextSize" ) ) {		int n;//		moz->MyBrowser->mPrefs->GetIntPref( "font.size.fixed.x-western", &n );		moz->MyBrowser->mPrefs->GetIntPref( "font.size.variable.x-western", &n );		/* map our n= 0...4 value into a mozilla font value */		/* see xpfe/components/prefwindow/resources/content/pref-fonts.xul, they are also hard-coded there */		switch( n ) {			case VOYAGER_TEXTSIZE0: n = 0; break;			case VOYAGER_TEXTSIZE1: n = 1; break;			case VOYAGER_TEXTSIZE2: n = 2; break;			case VOYAGER_TEXTSIZE3: n = 3; break;			case VOYAGER_TEXTSIZE4: n = 4; break;			}		sprintf( value, "%d", n );		}	else if( !strcmp( option, "BODY font-family" ) || !strcmp( option, "PRE font-family" ) || !strcmp( option, "H* font-family" ) ) {		/* set the current font */		char *font_default = NULL, *font = NULL;		char preference[256];		moz->MyBrowser->mPrefs->CopyCharPref( "font.default", &font_default );		if( !font_default ) font_default = "serif";		sprintf( preference, "font.name.%s.x-western", font_default );		moz->MyBrowser->mPrefs->CopyCharPref( preference, &font );		strcpy( value, font );		}/* SOCKS options */  else if( !strcmp( option, "socks_server" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.hosts.socks_server", &s );		if( s ) strcpy( value, s );		}  else if( !strcmp( option, "socks_port" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.hosts.socks_serverport", &s );		if( s ) strcpy( value, s );		}/* HTTP options */  else if( !strcmp( option, "http_proxy_host" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.http", &s );		if( s ) strcpy( value, s );		}  else if( !strcmp( option, "http_proxy_port" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.http_port", &s );		if( s ) strcpy( value, s );		}  else if( !strcmp( option, "proxy_overrides" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.no_proxies_on", &s );		if( s ) strcpy( value, s );		}/* FTP options */  else if( !strcmp( option, "ftp_proxy_host" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.ftp", &s );		if( s ) strcpy( value, s );		}  else if( !strcmp( option, "ftp_proxy_port" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.ftp_port", &s );		if( s ) strcpy( value, s );		}/* Gopher options */  else if( !strcmp( option, "gopher_proxy_host" ) ) {		char *s = NULL;		moz->MyBrowser->mPrefs->CopyCharPref( "network.proxy.gopher", &s );		if( s ) strcpy( value, s );		}  else if( !strcmp( option, "gopher_proxy_port" ) ) {    moz->MyBrowser->mPrefs->SetCharPref( "gopher_proxy_port", value );		}/* TCP/IP options */  else if( !strcmp( option, "socket_timeout" ) ) {		int n;		moz->MyBrowser->mPrefs->GetIntPref( "network.http.connect.timeout", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "max_connections" ) ) {		int n;		moz->MyBrowser->mPrefs->GetIntPref( "network.http.max-connections", &n );		sprintf( value, "%d", n );		}/* Disk-cache options */  else if( !strcmp( option, "main_cache_kb_size" ) ) {		int n;		moz->MyBrowser->mPrefs->GetIntPref( "browser.cache.disk.capacity", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "enable_disk_cache" ) ) {		PRBool val;		moz->MyBrowser->mPrefs->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;		moz->MyBrowser->mPrefs->GetIntPref( "browser.cache.check_doc_frequency", &n );		if( n == 0 ) voyager_value = 1;		else if( n == 1 ) voyager_value = 2;		else if( n == 2 ) voyager_value = 0;		sprintf( value, "%d", voyager_value );    }/* Miscellaneous options */  else if( !strcmp( option, "History_Expire" ) ) {		int n;		moz->MyBrowser->mPrefs->GetIntPref( "browser.history_expire_days", &n );		sprintf( value, "%d", n );		}  else if( !strcmp( option, "Page_History_Length" ) ) {		int n;		moz->MyBrowser->mPrefs->GetIntPref( "browser.sessionhistory.max_entries", &n );		sprintf( value, "%d", n );		}	else *value = 0;	}