NET_DisplayCookieInfoAsHTML(cur_entry->window_id);
PRIVATE int net_output_about_url(ActiveEntry * cur_entry){    NET_StreamClass * stream;	char * data=0;	char * content_type=0;	int32 length;	char * which = cur_entry->URL_s->address;	char * colon = strchr (which, ':');	void * fe_data = NULL;	Bool   uses_fe_data=FALSE;	if (colon)	  which = colon + 1;    if (NET_URL_Type(which)) {      if (!net_about_enabled("current"))        return MK_MALFORMED_URL_ERROR;    } else {      if (!net_about_enabled(which))        return MK_MALFORMED_URL_ERROR;    }    	if(0)	  {		/* placeholder to make ifdef's easier */	  }#ifdef MOZILLA_CLIENT	else if(NET_URL_Type(which))	  {	    /* this url is asking for document info about this		 * URL.		 * Call a NET function to generate the HTML block		 */		net_OutputURLDocInfo(cur_entry->window_id, which, &data, &length);		StrAllocCopy(content_type, TEXT_HTML);	  }		else if(!PL_strncasecmp(which, "pics", 4))	  {		data = net_gen_pics_document(cur_entry);   		if (data) {			length = PL_strlen(data);			content_type = PL_strdup(TEXT_HTML);            uses_fe_data = FALSE;        } 	  }#if defined(CookieManagement)	else if(!PL_strcasecmp(which, "cookies"))	{		NET_DisplayCookieInfoAsHTML(cur_entry->window_id);		return(-1);	}#endif#if defined(SingleSignon)        else if(!PL_strcasecmp(which, "signons"))	{		SI_DisplaySignonInfoAsHTML(cur_entry->window_id);		return(-1);	}#endif	else if(!PL_strncasecmp(which, "cache", 5))	  {		NET_DisplayCacheInfoAsHTML(cur_entry);		return(-1);	  }	else if(!PL_strcasecmp(which, "memory-cache"))	  {		NET_DisplayMemCacheInfoAsHTML(cur_entry);		return(-1);	  }	else if(!PL_strcasecmp(which, "logout"))	  {		NET_RemoveAllAuthorizations();		return(-1);	  }#ifdef DEBUG    else if(!PL_strcasecmp(which, "streams"))      {        NET_DisplayStreamInfoAsHTML(cur_entry);        return(-1);      }#endif /* DEBUG */	else if(!PL_strcasecmp(which, "document"))	  {		char buf[64];		History_entry *his;		MWContext *context;		/* output a Grid here with the first grid		 * cell containing an about: url with the		 * context pointer as the argument.		 * 		 * also put the context pointer in as the post data		 * if it's not there already so that history will		 * do the right thing.		 *		 * also output blank string for all FO's not view source		 * and save		 */		/* if there is post data then a context ID is hiding		 * in there.  Get it and verify it		 */		if(cur_entry->URL_s->post_data)		  {#if defined(__sun) && !defined(SVR4) /* sun 4.1.3 */			sscanf(cur_entry->URL_s->post_data, "%lu", &context);#else			sscanf(cur_entry->URL_s->post_data, "%p", &context);#endif			if(!XP_IsContextInList(context))				context = cur_entry->window_id;		  }		else		  {			context = cur_entry->window_id;		  }					/* get the current history entry and		 * extract the URL from it.  That has		 * the top level document URL 		 */		his = SHIST_GetCurrent (&context->hist);		StrAllocCat(data, "<TITLE>");		StrAllocCat(data, XP_GetString(XP_DOCUMENT_INFO));		StrAllocCat(data,       "</TITLE>"							"<frameset rows=\"40%,60%\">"							"<frame src=about:");		StrAllocCopy(cur_entry->URL_s->window_target, "%DocInfoWindow");		/* add a Chrome Struct so that we can control the window */		cur_entry->URL_s->window_chrome = PR_NEW(Chrome);		if(cur_entry->URL_s->window_chrome)		  {			memset(cur_entry->URL_s->window_chrome, 0, sizeof(Chrome));			cur_entry->URL_s->window_chrome->type = MWContextDialog;			cur_entry->URL_s->window_chrome->show_scrollbar = TRUE;			cur_entry->URL_s->window_chrome->allow_resize = TRUE;			cur_entry->URL_s->window_chrome->allow_close = TRUE;		  }        /* You can't edit "about:document"! */        if ( FO_CACHE_AND_EDIT == cur_entry->format_out ) {            cur_entry->format_out = FO_CACHE_AND_PRESENT;        }		/* don't let people really view the source of this... */		if(FO_PRESENT != CLEAR_CACHE_BIT(cur_entry->format_out))        		  {			StrAllocCat(data, "blank");		  }		else		  {			StrAllocCat(data, "FeCoNtExT=");		    if(!cur_entry->URL_s->post_data)		      {			    PR_snprintf(buf, 64, "%p", context);			    StrAllocCat(data, buf);			    StrAllocCopy(cur_entry->URL_s->post_data, buf);		      }		    else		      {			    StrAllocCat(data, cur_entry->URL_s->post_data);		      }		  }		StrAllocCat(data, "><frame name=Internal_URL_Info src=about:");				if(his && his->address)			StrAllocCat(data, his->address);		else			StrAllocCat(data, "blank");		StrAllocCat(data, "></frameset>");		length = PL_strlen(data);		StrAllocCopy(content_type, TEXT_HTML);	  }	else if(!PL_strncasecmp(which, "Global", 6))	  {		cur_entry->status = NET_DisplayGlobalHistoryInfoAsHTML(													cur_entry->window_id,									cur_entry->URL_s,									cur_entry->format_out);		return(-1);	  }	else if(!PL_strncmp(which, "FeCoNtExT=", 10))	  {		MWContext *old_ctxt;		#if defined(__sun) && !defined(SVR4) /* sun 4.1.3 */		sscanf(which+10, "%lu", &old_ctxt);#else		sscanf(which+10, "%p", &old_ctxt);#endif		/* verify that we have the right context 		 *		 */		if(!XP_IsContextInList(old_ctxt))		  {			StrAllocCopy(data, XP_GetString(XP_THE_WINDOW_IS_NOW_INACTIVE));		  }		else    		  {			return(net_PrintContextInfo(cur_entry, old_ctxt));		  }                 	    length = PL_strlen(data);	    StrAllocCopy(content_type, TEXT_HTML);      }#endif /* MOZILLA_CLIENT */	else if(!PL_strncasecmp(which, "authors", 7))	  {		static const char *d =		  ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html\" "		   "CHARSET=\"iso-8859-1\"><TITLE>Mozilla &Uuml;ber Alles</TITLE>"		   "<BODY BGCOLOR=\"#C0C0C0\" TEXT=\"#000000\">"		   "<TABLE width=\"100%\" height=\"100%\"><TR><TD ALIGN=CENTER>"		   "<FONT SIZE=5><FONT COLOR=\"#0000EE\">about:authors</FONT> "		   "removed.</FONT></TD></TR></TABLE>");	    data = PL_strdup(d);		length = (d ? PL_strlen(d) : 0);	    content_type = PL_strdup(TEXT_HTML);	    uses_fe_data = FALSE;	  }	/* Admin Kit/xp prefs diagnostic support */	else if (!PL_strncasecmp(which, "config", 6))	{		data = PREF_AboutConfig();		if (data) {			length = PL_strlen(data);			content_type = PL_strdup(TEXT_HTML);		}	}    else if (PL_strncasecmp(which, "blank", 5) == 0) {		static const char *d =		  ("<HTML>"           "<HEAD>"           "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html\">"           "<TITLE>blank</TITLE>"           "</HEAD>"		   "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">"		   "</BODY>"           "</HTML>");	    data = PL_strdup(d);		length = (d ? PL_strlen(d) : 0);	    content_type = PL_strdup(TEXT_HTML);	    uses_fe_data = FALSE;    }    else      {        if (net_DoRegisteredAbout(which, cur_entry)) {            return -1;        }	    fe_data = FE_AboutData(which, &data, &length, &content_type);	    uses_fe_data=TRUE;      }	if (!data || !content_type)	  {		cur_entry->status = MK_MALFORMED_URL_ERROR;	  }	else	  {		int status;		StrAllocCopy(cur_entry->URL_s->content_type, content_type);		cur_entry->format_out = CLEAR_CACHE_BIT(cur_entry->format_out);		stream = NET_StreamBuilder(cur_entry->format_out,								   cur_entry->URL_s, cur_entry->window_id);		if(!stream)		  {			cur_entry->status = MK_UNABLE_TO_CONVERT;			return(MK_UNABLE_TO_CONVERT);		  }		status = (*stream->put_block)(stream, data, length);		if (status >= 0) {			/* Append optional Admin Kit-specified about page text */			char* custom_text = NULL;			if (PL_strcmp(which, "") == 0 &&				PREF_CopyConfigString("about_text", &custom_text) == PREF_NOERROR) {				(*stream->put_block)(stream, custom_text, PL_strlen(custom_text));			}					(*stream->complete) (stream);						PR_FREEIF(custom_text);		}		else		  (*stream->abort) (stream, status);		cur_entry->status = status;		PR_Free(stream);	  }	if(uses_fe_data)	  {#if defined(XP_MAC) || defined(XP_UNIX) || defined (XP_WIN)		FE_FreeAboutData (fe_data, which);#endif /* XP_MAC || XP_UNIX */	  }	else	  {		PR_Free(data);		PR_Free(content_type);	  }    return(-1);}