[Cpri-develop] cpri/src drv_html.c,1.9,1.10
Brought to you by:
chrisan,
rasmusmyklebust
|
From: Rasmus M. <ras...@us...> - 2009-09-26 21:59:16
|
Update of /cvsroot/cpri/cpri/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv904/src Modified Files: drv_html.c Log Message: Fixed bug #2867683 Index: drv_html.c =================================================================== RCS file: /cvsroot/cpri/cpri/src/drv_html.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** drv_html.c 26 Sep 2009 09:47:54 -0000 1.9 --- drv_html.c 26 Sep 2009 21:59:06 -0000 1.10 *************** *** 53,57 **** static void Tab(t_driver *dd, int bold, int ul, int italic, char *celltext, ! char *line, int align, int size, char **faces, int face) { char *p; --- 53,57 ---- static void Tab(t_driver *dd, int bold, int ul, int italic, char *celltext, ! char *line, int align, int size, char **faces, int face,char *suptext) { char *p; *************** *** 81,85 **** if (italic) p += sprintf(p, "<i>"); ! p += sprintf(p, celltext); if (*celltext == 0 && dd->gridon) p += sprintf(p, " "); --- 81,85 ---- if (italic) p += sprintf(p, "<i>"); ! p += sprintf(p, "%s%s",celltext,suptext); if (*celltext == 0 && dd->gridon) p += sprintf(p, " "); *************** *** 105,108 **** --- 105,109 ---- p += sprintf(p, "</td>\n"); *celltext = 0; + *suptext=0; } *************** *** 146,150 **** "Gothic,'Courier New',Courier", }; ! char link[MAXLINKLEN+1], celltext[1000]; char *colors[]={"#0000ff","#ccccff","#ccffcc","#ffcccc","#ccffff","#ffccff","#ffffcc"}; const char *const*ptxt; --- 147,151 ---- "Gothic,'Courier New',Courier", }; ! char link[MAXLINKLEN+1], celltext[1000], suptext[1000]; char *colors[]={"#0000ff","#ccccff","#ccffcc","#ffcccc","#ccffff","#ffccff","#ffffcc"}; const char *const*ptxt; *************** *** 172,177 **** case EPC_SUP_LALIGN: case EPC_SUP: - case EPC_SUP_RALIGN: - case EPC_SUP_RALIGN_CELL: _CpriGetStringParam(q, s); if (underline) --- 173,176 ---- *************** *** 182,185 **** --- 181,197 ---- if (underline) strcat(celltext, "<u>"); + strcat(suptext," "); + break; + case EPC_SUP_RALIGN: + case EPC_SUP_RALIGN_CELL: + _CpriGetStringParam(q, s); + if (underline) + strcat(suptext, "</u>"); + strcat(suptext, "<sup><span style=\"font-size:smaller\">"); + strcat(suptext, s); + strcat(suptext, "</span></sup>"); + if (underline) + strcat(suptext, "<u>"); + strcat(celltext," "); break; case EPC_FONT_TYPEFACE: /* typefaces */ *************** *** 209,215 **** strcpy(line, " <tr>\n"); *celltext = 0; } else { Tab(dd, bold, underline, italic, celltext, line, align, ! size, htmlfaces, face); } dd->w = tf->tabs[tf->curtab].scaled - tf->tabs[tf->prevtab].scaled; --- 221,228 ---- strcpy(line, " <tr>\n"); *celltext = 0; + *suptext=0; } else { Tab(dd, bold, underline, italic, celltext, line, align, ! size, htmlfaces, face,suptext); } dd->w = tf->tabs[tf->curtab].scaled - tf->tabs[tf->prevtab].scaled; *************** *** 218,222 **** case EPC_NEW_LINE: Tab(dd, bold, underline, italic, celltext, line, align, ! size, htmlfaces, face); fprintf(dst, line); fprintf(dst, " </tr>\n"); --- 231,235 ---- case EPC_NEW_LINE: Tab(dd, bold, underline, italic, celltext, line, align, ! size, htmlfaces, face,suptext); fprintf(dst, line); fprintf(dst, " </tr>\n"); |