addstr(title);
LYaddstr(title);
PRIVATE void display_title ARGS1(	HText *,	text){    char *title = NULL;    char percent[20];    char *cp = NULL;    unsigned char *tmp = NULL;    int i = 0, j = 0;    /*     *  Make sure we have a text structure. - FM     */    if (!text)	return;    lynx_start_title_color ();#ifdef USE_COLOR_STYLE/* turn the TITLE style on */    if (last_colorattr_ptr > 0) {	LynxChangeStyle(s_title, STACK_ON, 0);    } else {	LynxChangeStyle(s_title, ABS_ON, 0);    }#endif /* USE_COLOR_STYLE */    /*     *  Load the title field. - FM     */    StrAllocCopy(title,		 (HTAnchor_title(text->node_anchor) ?		  HTAnchor_title(text->node_anchor) : ""));    /*     *  There shouldn't be any \n in the title field,     *  but if there is, lets kill it now.  Also trim     *  any trailing spaces. - FM     */    if ((cp = strchr(title,'\n')) != NULL)	*cp = '\0';    i = (*title ? (strlen(title) - 1) : 0);    while ((i >= 0) && title[i] == ' ')	title[i--] = '\0';    /*     *  Generate the page indicator (percent) string.     */    if ((text->Lines + 1) > (display_lines)) {	/*	 *  In a small attempt to correct the number of pages counted....	 *    GAB 07-14-94	 *	 *  In a bigger attempt (hope it holds up 8-)....	 *    FM 02-08-95	 */	int total_pages =		(((text->Lines + 1) + (display_lines - 1))/(display_lines));	int start_of_last_page =		((text->Lines + 1) < display_lines) ? 0 :		((text->Lines + 1) - display_lines);	sprintf(percent, " (p%d of %d)",		((text->top_of_screen >= start_of_last_page) ?						 total_pages :		    ((text->top_of_screen + display_lines)/(display_lines))),		total_pages);    } else {	percent[0] = '\0';	/* Null string */    }    /*     *  Generate and display the title string, with page indicator     *  if appropriate, preceded by the toolbar token if appropriate,     *  and truncated if necessary. - FM & KW     */    if (HTCJK != NOCJK) {	if (*title &&	    (tmp = (unsigned char *)calloc(1, (strlen(title) + 1)))) {	    if (kanji_code == EUC) {		TO_EUC((unsigned char *)title, tmp);	    } else if (kanji_code == SJIS) {		TO_SJIS((unsigned char *)title, tmp);	    } else {		for (i = 0, j = 0; title[i]; i++) {		    if (title[i] != CH_ESC) {  /* S/390 -- gil -- 1487 */			tmp[j++] = title[i];		    }		}		tmp[j] = '\0';	    }	    StrAllocCopy(title, (CONST char *)tmp);	    FREE(tmp);	}    }    move(0, 0);    clrtoeol();    if (text->top_of_screen > 0 && HText_hasToolbar(text)) {	addch('#');    }    i = (LYcols - 1) - strlen(percent) - strlen(title);    if (i > 0) {	move(0, i);    } else {	/*	 *  Note that this truncation is not taking into	 *  account the possibility that multibyte	 *  characters might be present. - FM	 */	title[((LYcols - 2) - strlen(percent))] = '\0';	move(0, 1);    }    addstr(title);    if (percent[0] != '\0')	addstr(percent);    addch('\n');    FREE(title);#ifdef USE_COLOR_STYLE/* turn the TITLE style off */    LynxChangeStyle(s_title, STACK_OFF, 0);#endif /* USE_COLOR_STYLE */    lynx_stop_title_color ();    return;}