Ejemplo n.º 1
0
void cellSimplePrint(struct column *col, struct subjInfo *si,
        struct sqlConnection *conn)
/* This just prints one field from table. */
{
char *s = col->cellVal(col, si, conn);
boolean isSubjID = sameString(col->name,"subjId");
hPrintf("<TD>");
if (s == NULL)
    {
    hPrintf("N/A");
    }
else
    {
    if (isSubjID)
	hPrintf("<A HREF=\"gsidSubj?%s&hgs_subj=%s&submit=Go%c21\">",cartSidUrlString(cart),s, '%');
    if (sameString(s,""))
	{
	freeMem(s);
	s = cloneString("&nbsp;");
	}

    if (! (sameString(col->name,"dnaSeqs") || sameString(col->name,"aaSeqs")) )
    	hPrintNonBreak(s);
    else
        /* special processing for DNA and protein sequences */
    	hPrintf("%s", s);

    if (isSubjID)
	hPrintf("</A>");
    freeMem(s);
    }
hPrintf("</TD>\n");
}
Ejemplo n.º 2
0
Archivo: hPrint.c Proyecto: bowhan/kent
void hPrintEncodedNonBreak(char *s)
/* Print with htmlEncode and non-break */
{
char *encoded = htmlEncode(s);
hPrintNonBreak(encoded);
freeMem(encoded);
}