StrAllocCat(tmp, URL_s->address);
escaped = NET_EscapeDoubleQuote(URL_s->address); StrAllocCat(tmp, escaped); PR_Free(escaped);
net_OutputURLDocInfo(MWContext *ctxt, char *which, char **data, int32 *length){	char *output=0;	URL_Struct *URL_s = NET_CreateURLStruct(which, NET_DONT_RELOAD);	struct tm *tm_struct_p;	char buf[64];	char *tmp=0;	char *sec_msg, *il_msg;	NET_FindURLInCache(URL_s, ctxt);#define CELL_TOP                                                        \	StrAllocCat(output,                                     \				"<TR><TD VALIGN=BASELINE ALIGN=RIGHT><B>");     #define CELL_TITLE(title)                                       \	StrAllocCat(output, title);#define CELL_MIDDLE                                                     \	StrAllocCat(output,                                     \				"</B></TD>"                                     \				"<TD>");#define CELL_BODY(body)                                         \	StrAllocCat(output, body);#define CELL_END                                                        \	StrAllocCat(output,                                     \				"</TD></TR>");#define ADD_CELL(c_title, c_body)                       \	CELL_TOP;                                                               \	CELL_TITLE(c_title);                                    \	CELL_MIDDLE;                                                    \	CELL_BODY(c_body);                                              \	CELL_END;	StrAllocCopy(output, "<TABLE>");	StrAllocCopy(tmp, "<A HREF=\"");	StrAllocCat(tmp, URL_s->address);	StrAllocCat(tmp, "\">");	StrAllocCat(tmp, URL_s->address);	StrAllocCat(tmp, "</a>");	if(URL_s->is_netsite)	  {		ADD_CELL(XP_GetString(XP_NETSITE_), tmp);	  }	else	  {		ADD_CELL(XP_GetString(XP_LOCATION_), tmp);	  }	PR_Free(tmp);	ADD_CELL(XP_GetString(XP_FILE_MIME_TYPE_), 			 URL_s->content_type ? URL_s->content_type : XP_GetString(XP_CURRENTLY_UNKNOWN)); #ifdef NU_CACHE	ADD_CELL(XP_GetString(XP_SOURCE_), URL_s->cache_file							? XP_GetString(XP_CURRENTLY_IN_DISK_CACHE)							  : URL_s->cache_object ? 								XP_GetString(XP_CURRENTLY_IN_MEM_CACHE) 								: XP_GetString(XP_CURRENTLY_NO_CACHE));#else	ADD_CELL(XP_GetString(XP_SOURCE_), URL_s->cache_file							? XP_GetString(XP_CURRENTLY_IN_DISK_CACHE)							  : URL_s->memory_copy ? 								XP_GetString(XP_CURRENTLY_IN_MEM_CACHE) 								: XP_GetString(XP_CURRENTLY_NO_CACHE));#endif /* NU_CACHE */	ADD_CELL(XP_GetString(XP_LOCAL_CACHE_FILE_), URL_s->cache_file 								 ? URL_s->cache_file									:  XP_GetString(XP_NONE));	tm_struct_p = localtime(&URL_s->last_modified);	if(tm_struct_p)	  {#ifdef XP_UNIX		strftime(buf, 64, XP_GetString(XP_LOCAL_TIME_FMT),									   tm_struct_p);#else       char tmpbuf[64];       XP_StrfTime(ctxt,tmpbuf,64,XP_LONG_DATE_TIME_FORMAT,		   tm_struct_p);       /* NOTE: XP_LOCAL_TIME_FMT is different depend on platform */       PR_snprintf(buf, 64, XP_GetString(XP_LOCAL_TIME_FMT), tmpbuf);#endif      }	else	  {		buf[0] = 0;	  }	ADD_CELL(XP_GetString(XP_LAST_MODIFIED), URL_s->last_modified ? buf :  XP_GetString(XP_MSG_UNKNOWN));	tm_struct_p = gmtime(&URL_s->last_modified);	if(tm_struct_p)	  {#ifdef XP_UNIX		strftime(buf, 64, XP_GetString(XP_GMT_TIME_FMT),									   tm_struct_p);#else       char tmpbuf[64];       XP_StrfTime(ctxt,tmpbuf,64,XP_LONG_DATE_TIME_FORMAT,				   tm_struct_p);       /* NOTE: XP_GMT_TIME_FMT is different depend on platform */       PR_snprintf(buf, 64, XP_GetString(XP_GMT_TIME_FMT), tmpbuf);#endif	  }	else	  {		buf[0] = 0;	  }	ADD_CELL(XP_GetString(XP_LAST_MODIFIED), URL_s->last_modified ? buf :  XP_GetString(XP_MSG_UNKNOWN));#ifdef DEBUG	PR_snprintf(buf, 64, "%lu seconds since 1-1-70 GMT", URL_s->last_modified);	ADD_CELL("Last Modified:", URL_s->last_modified ? buf :  "Unknown");#endif	sprintf(buf, "%lu", URL_s->content_length);	ADD_CELL(XP_GetString(XP_CONTENT_LENGTH_), URL_s->content_length 								 ? buf									:  XP_GetString(XP_MSG_UNKNOWN));	ADD_CELL(XP_GetString(XP_EXPIRES_), URL_s->expires > 0								 ? INTL_ctime(ctxt, &URL_s->expires)									:  XP_GetString(XP_NO_DATE_GIVEN));	if (URL_s->x_mac_type && *URL_s->x_mac_type)	  {		ADD_CELL(XP_GetString(XP_MAC_TYPE_), URL_s->x_mac_type);	  }	if (URL_s->x_mac_creator && *URL_s->x_mac_creator)	  {		ADD_CELL(XP_GetString(XP_MAC_CREATOR_), URL_s->x_mac_creator);	  }	if (URL_s->charset)	  {		ADD_CELL(XP_GetString(XP_CHARSET_), URL_s->charset);	  }	else 	  {		ADD_CELL(XP_GetString(XP_CHARSET_), XP_GetString(XP_MSG_UNKNOWN));	  }	HG76363	StrAllocCat(output, "</TABLE>");	if(URL_s->content_type 		&& !PL_strncasecmp(URL_s->content_type, "image", 5))	  {	/* Have a seat. Lie down.  Tell me about yourself. */#ifdef MODULAR_NETLIB	il_msg = NULL;#else	il_msg = IL_HTMLImageInfo(URL_s->address);#endif	if (il_msg) {	  StrAllocCat(output, "<HR>\n");	  StrAllocCat(output, il_msg);	  PR_Free(il_msg);	}	  }			*data = output;	*length = PL_strlen(output);	NET_FreeURLStruct(URL_s);	return;}