CTRACE(tfp, "HTFormat: Looking up presentation for %s to %s\n", HTAtom_name(rep_in), HTAtom_name(rep_out));
CTRACE((tfp, "HTFormat: Looking up presentation for %s to %s\n", HTAtom_name(rep_in), HTAtom_name(rep_out)));
PRIVATE HTPresentation * HTFindPresentation ARGS3(	HTFormat,		rep_in,	HTFormat,		rep_out,	HTPresentation*,	fill_in){    HTAtom * wildcard = HTAtom_for("*");    CTRACE(tfp, "HTFormat: Looking up presentation for %s to %s\n",		HTAtom_name(rep_in), HTAtom_name(rep_out));    /* don't do anymore do it in the Lynx code at startup LJM */    /* if (!HTPresentations) HTFormatInit(); */ /* set up the list */    {	int n = HTList_count(HTPresentations);	int i;	HTPresentation * pres, *match,			*strong_wildcard_match=0,			*weak_wildcard_match=0,			*last_default_match=0,			*strong_subtype_wildcard_match=0;	for (i = 0; i < n; i++) {	    pres = (HTPresentation *)HTList_objectAt(HTPresentations, i);	    if (pres->rep == rep_in) {		if (pres->rep_out == rep_out) {		    CTRACE(tfp, "FindPresentation: found exact match: %s\n",				HTAtom_name(pres->rep));		    return pres;		} else if (!fill_in) {		    continue;		} else if (pres->rep_out == wildcard) {		    if (!strong_wildcard_match)			strong_wildcard_match = pres;		    /* otherwise use the first one */		    CTRACE(tfp, "StreamStack: found strong wildcard match: %s\n",				HTAtom_name(pres->rep));		}	    } else if (!fill_in) {		continue;	    } else if (half_match(HTAtom_name(pres->rep),					      HTAtom_name(rep_in))) {		if (pres->rep_out == rep_out) {		    if (!strong_subtype_wildcard_match)			strong_subtype_wildcard_match = pres;		    /* otherwise use the first one */		    CTRACE(tfp, "StreamStack: found strong subtype wildcard match: %s\n",				HTAtom_name(pres->rep));		}	    }	    if (pres->rep == WWW_SOURCE) {		if (pres->rep_out == rep_out) {		    if (!weak_wildcard_match)			weak_wildcard_match = pres;		    /* otherwise use the first one */		    CTRACE(tfp, "StreamStack: found weak wildcard match: %s\n",				HTAtom_name(pres->rep_out));		}		if (pres->rep_out == wildcard) {		    if (!last_default_match)			 last_default_match = pres;		    /* otherwise use the first one */		}	    }	}	match = strong_subtype_wildcard_match ? strong_subtype_wildcard_match :		strong_wildcard_match ? strong_wildcard_match :		weak_wildcard_match ? weak_wildcard_match :		last_default_match;	if (match) {	    *fill_in = *match;		/* Specific instance */	    fill_in->rep = rep_in;		/* yuk */	    fill_in->rep_out = rep_out; /* yuk */	    return fill_in;	}    }    return NULL;}