\n"); // replace newline characters with paragraph tags while ( (pNewline = strchr(pDesc, '\n')) != NULL ) { // print text up to (and excluding) the newline EpgDumpHtml_WriteString(fp, pDesc, pNewline - pDesc); fprintf(fp, "\n
\n"); // skip to text following the newline pDesc = pNewline + 1; } // write the segement behind the last newline EpgDumpHtml_WriteString(fp, pDesc, -1); fprintf(fp, "\n
\n| \n" "%s - %s\n" // running time " | \n" "\n", pPiBlock->netwop_no, label_str, start_str, stop_str); EpgDumpHtml_WriteString(fp, PI_GET_TITLE(pPiBlock), -1); fprintf(fp, "\n" " | \n" "\n"); EpgDumpHtml_WriteString(fp, pCfNetname, -1); fprintf(fp, "\n" " | \n" "
| \n" "%s\n" // date " | \n" "||
| \n"); // append theme list PiDescription_AppendCompressedThemes(pPiBlock, comm, TCL_COMM_BUF_SIZE); EpgDumpHtml_WriteString(fp, comm, -1); // append features list strcpy(comm, " ("); PiDescription_AppendFeatureList(pPiBlock, comm + 2); if (comm[2] != 0) { strcat(comm, ")"); EpgDumpHtml_WriteString(fp, comm, -1); } fprintf(fp, "\n | \n||
\n");
if (colIdx == hyperlinkColIdx)
{ // if requested add hyperlink to the description on this column
uchar label_str[50];
strftime(label_str, sizeof(label_str), "%Y%m%d%H%M", localtime(&pPiBlock->start_time));
fprintf(fpDst, "\n", pPiBlock->netwop_no, label_str);
}
len = 0;
type = pColTab[colIdx].type;
pImageObj = pFmtObj = NULL;
if (type == PIBOX_COL_WEEKCOL)
type = PIBOX_COL_WEEKDAY; // XXX FIXME weekday colors not implemented for HTML yet
if ((type == PIBOX_COL_USER_DEF) || (type == PIBOX_COL_REMINDER))
{
len = PiOutput_MatchUserCol(pPiBlock, &type, pColTab[colIdx].pDefObj,
comm, TCL_COMM_BUF_SIZE, &pImageObj, &pFmtObj);
}
if ((type != PIBOX_COL_USER_DEF) && (type != PIBOX_COL_REMINDER) && (type != PIBOX_COL_WEEKCOL))
len = PiOutput_PrintColumnItem(pPiBlock, type, comm, TCL_COMM_BUF_SIZE);
if (pImageObj != NULL)
{ // user-defined column consists of an image
pImgSpec = Tcl_GetVar2Ex(interp, "pi_img", Tcl_GetString(pImageObj), TCL_GLOBAL_ONLY);
if (pImgSpec != NULL)
{
if ( (Tcl_ListObjGetElements(interp, pImgSpec, &imgObjc, &pImgObjv) == TCL_OK) &&
(imgObjc == 2) )
{
// note: there's intentionally no WIDTH and HEIGHT tags so that the user can use different images
fprintf(fpDst, " \n", Tcl_GetString(pImageObj));
}
}
}
hasBold = hasEm = hasStrike = hasColor = FALSE;
if (optTextFmt && (pFmtObj != NULL))
{
Tcl_ListObjGetElements(interp, pFmtObj, &fmtObjc, &pFmtObjv);
for (fmtIdx=0; fmtIdx < fmtObjc; fmtIdx++)
{
pFmtStr = Tcl_GetString(pFmtObjv[fmtIdx]);
if (strcmp(pFmtStr, "bold") == 0)
{
fprintf(fpDst, "");
hasBold = TRUE;
}
else if (strcmp(pFmtStr, "underline") == 0)
{
fprintf(fpDst, "");
hasEm = TRUE;
}
else if (strcmp(pFmtStr, "overstrike") == 0)
{
fprintf(fpDst, " | \n", ((colIdx == hyperlinkColIdx) ? "\n" : ""));
}
fprintf(fpDst, "