(putc_func_t*)(&fake_put_character), code)): PUTUTF8(code) ) ) {
(putc_func_t*)(fake_put_character), code)): PUTUTF8(code) ) ) {
PRIVATE void handle_entity ARGS2(	HTStream *,	context,	char,		term){    UCode_t code;    long uck = -1;    CONST char *p;    CONST char *s = context->string->data;    /*    **	Handle all entities normally. - FM    */    FoundEntity = FALSE;    if ((code = HTMLGetEntityUCValue(s)) != 0) {	/*	**  We got a Unicode value for the entity name.	**  Check for special Unicodes. - FM	*/	if (put_special_unicodes(context, code)) {#ifdef USE_PSRC	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&');		PUTS(entity_string);		if (term)		    PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    }#endif	    FoundEntity = TRUE;	    return;	}	/*	**  Seek a translation from the chartrans tables.	*/	if ((uck = UCTransUniChar(code, context->outUCLYhndl)) >= 32 &&/* =============== work in ASCII below here ===============  S/390 -- gil -- 0672 */	    uck < 256 &&	    (uck < 127 ||	     uck >= LYlowest_eightbit[context->outUCLYhndl])) {#ifdef USE_PSRC	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&'); PUTS(entity_string); if (term) PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    } else#endif	    PUTC(FROMASCII((char)uck));	    FoundEntity = TRUE;	    return;	} else if ((uck == -4 ||		    (context->T.repl_translated_C0 &&		     uck > 0 && uck < 32)) &&		   /*		   **  Not found; look for replacement string.		   */		   (uck = UCTransUniCharStr(replace_buf, 60, code,					    context->outUCLYhndl, 0) >= 0)) {#ifdef USE_PSRC	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&');		PUTS(entity_string);		if (term)		    PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    } else#endif	    for (p = replace_buf; *p; p++)		PUTC(*p);	    FoundEntity = TRUE;	    return;	}	/*	**  If we're displaying UTF-8, try that now. - FM	*/#ifndef USE_PSRC	if (context->T.output_utf8 && PUTUTF8(code)) {	    FoundEntity = TRUE;	    return;	}#else	if (context->T.output_utf8 && (psrc_view ?	      (UCPutUtf8_charstring((HTStream *)context->target,	      (putc_func_t*)(&fake_put_character), code)): PUTUTF8(code) ) ) {	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&'); PUTS(entity_string); if (term) PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    }	    FoundEntity = TRUE;	    return;	}#endif	/*	**  If it's safe ASCII, use it. - FM	*/	if (code >= 32 && code < 127) {#ifdef USE_PSRC	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&');		PUTS(entity_string);		if (term)		    PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    } else#endif	    PUTC(FROMASCII((char)code));	    FoundEntity = TRUE;	    return;	}/* =============== work in ASCII above here ===============  S/390 -- gil -- 0682 */	/*	**  Ignore zwnj (8204) and zwj (8205), if we get to here.	**  Note that zwnj may have been handled as <WBR>	**  by the calling function. - FM	*/	if (!strcmp(s, "zwnj") ||	    !strcmp(s, "zwj")) {	    CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s);#ifdef USE_PSRC	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&');		PUTS(entity_string);		if (term)		    PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    }#endif	    FoundEntity = TRUE;	    return;	}	/*	**  Ignore lrm (8206), and rln (8207), if we get to here. - FM	*/	if (!strcmp(s, "lrm") ||	    !strcmp(s, "rlm")) {	    CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s);#ifdef USE_PSRC	    if (psrc_view) {		HTMLSRC_apply_markup(context,HTL_entity,START);		PUTC('&');		PUTS(entity_string);		if (term)		    PUTC(term);		HTMLSRC_apply_markup(context,HTL_entity,STOP);	    }#endif	    FoundEntity = TRUE;	    return;	}    }    /*    **	If entity string not found, display as text.    */#ifdef USE_PSRC    if (psrc_view)	PSRCSTART(badseq);#endif    CTRACE(tfp, "SGML: Unknown entity '%s' %ld %ld\n", s, (long)code, uck); /* S/390 -- gil -- 0695 */    PUTC('&');    for (p = s; *p; p++) {	PUTC(*p);    }    if (term != '\0')	PUTC(term);#ifdef USE_PSRC    if (psrc_view)	PSRCSTOP(badseq);#endif}