CTRACE(tfp, "    and Set-Cookie2: '%s'\n", (SetCookie2 ? SetCookie2 : ""));
CTRACE((tfp, "    and Set-Cookie2: '%s'\n", (SetCookie2 ? SetCookie2 : "")));
PUBLIC void LYSetCookie ARGS3(	CONST char *,	SetCookie,	CONST char *,	SetCookie2,	CONST char *,	address){    BOOL BadHeaders = FALSE;    char *hostname = NULL, *path = NULL, *ptr;    int port = 80;    /*     *	Get the hostname, port and path of the address, and report     *	the Set-Cookie and/or Set-Cookie2 header(s) if trace mode is     *	on, but set the cookie(s) only if LYSetCookies is TRUE. - FM     */    if (((hostname = HTParse(address, "", PARSE_HOST)) != NULL) &&	(ptr = strchr(hostname, ':')) != NULL)	{	/*	 *  Replace default port number.	 */	*ptr = '\0';	ptr++;	port = atoi(ptr);    } else if (!strncasecomp(address, "https:", 6)) {	port = 443;    }    if (((path = HTParse(address, "",			 PARSE_PATH|PARSE_PUNCTUATION)) != NULL) &&	(ptr = strrchr(path, '/')) != NULL) {	if (ptr == path) {	    *(ptr+1) = '\0';	/* Leave a single '/' alone */	} else {	    *ptr = '\0';	}    }    if (!(SetCookie && *SetCookie) &&	!(SetCookie2 && *SetCookie2)) {	/*	 *  Yuk, something must have gone wrong in	 *  HTMIME.c or HTTP.c because both SetCookie	 *  and SetCookie2 are NULL or zero-length. - FM	 */	BadHeaders = TRUE;    }    CTRACE(tfp, "LYSetCookie called with host '%s', path '%s',\n",		(hostname ? hostname : ""),		(path ? path : ""));    if (SetCookie) {	CTRACE(tfp, "    and Set-Cookie: '%s'\n",			 (SetCookie ? SetCookie : ""));    }    if (SetCookie2) {	CTRACE(tfp, "    and Set-Cookie2: '%s'\n",			 (SetCookie2 ? SetCookie2 : ""));    }    if (LYSetCookies == FALSE || BadHeaders == TRUE) {	CTRACE(tfp, "    Ignoring this Set-Cookie/Set-Cookie2 request.\n");    }    /*     *	We're done if LYSetCookies is off or we have bad headers. - FM     */    if (LYSetCookies == FALSE || BadHeaders == TRUE) {	FREE(hostname);	FREE(path);	return;    }    /*     *	Process the header(s).     */    LYProcessSetCookies(SetCookie, SetCookie2, address, hostname, path, port);    FREE(hostname);    FREE(path);    return;}