Lines Matching +full:per +full:- +full:string
26 #include <string.h>
58 if (su->scale < 0.0)
61 switch (su->unit) {
63 return su->scale * 65536.0 / 24.0;
64 case SCALE_IN: /* 10 characters per inch */
65 return su->scale * 10.0;
66 case SCALE_CM: /* 2.54 cm per inch */
67 return su->scale * 10.0 / 2.54;
68 case SCALE_PC: /* 6 pica per inch */
70 return su->scale * 10.0 / 6.0;
73 return su->scale;
74 case SCALE_PT: /* 12 points per pica */
75 return su->scale * 10.0 / 6.0 / 12.0;
76 case SCALE_BU: /* 24 basic units per character */
77 return su->scale / 24.0;
79 return su->scale / 100.0;
89 if (h->tbl.cols == NULL) {
90 h->tbl.len = html_tbl_len;
91 h->tbl.slen = html_tbl_strlen;
92 h->tbl.sulen = html_tbl_sulen;
93 tblcalc(&h->tbl, sp, 0, 0);
95 assert(NULL == h->tblt);
96 h->tblt = print_otag(h, TAG_TABLE, "c?ss", "tbl",
98 sp->opts->opts & TBL_OPT_ALLBOX ? "1" : NULL,
99 "border-style",
100 sp->opts->opts & TBL_OPT_DBOX ? "double" :
101 sp->opts->opts & TBL_OPT_BOX ? "solid" : NULL,
102 "border-top-style",
103 sp->pos == TBL_SPAN_DHORIZ ? "double" :
104 sp->pos == TBL_SPAN_HORIZ ? "solid" : NULL);
111 assert(h->tblt);
112 print_tagq(h, h->tblt);
113 h->tblt = NULL;
132 if (h->tblt == NULL)
140 if (sp->pos != TBL_SPAN_DATA)
145 h->flags |= HTML_NONOSPACE;
146 h->flags |= HTML_NOSPACE;
150 switch (sp->layout->vert) {
165 if ((psp = sp->next) != NULL) {
166 switch (psp->pos) {
179 "border-left-style", lborder,
180 "border-bottom-style", bborder);
182 for (dp = sp->first; dp != NULL; dp = dp->next) {
191 cp = dp->layout;
192 if (cp->pos == TBL_CELL_SPAN || cp->pos == TBL_CELL_DOWN ||
193 (dp->string != NULL && strcmp(dp->string, "\\^") == 0))
198 if (dp->hspans > 0) {
200 "%d", dp->hspans + 1);
204 if (dp->vspans > 0) {
206 "%d", dp->vspans + 1);
211 switch (cp->pos) {
223 if (cp->flags & TBL_CELL_TALIGN)
225 else if (cp->flags & TBL_CELL_BALIGN)
230 for (i = dp->hspans; i > 0; i--)
231 cp = cp->next;
232 switch (cp->vert) {
248 "vertical-align", valign,
249 "text-align", halign,
250 "border-right-style", rborder);
251 if (dp->layout->pos == TBL_CELL_HORIZ ||
252 dp->layout->pos == TBL_CELL_DHORIZ ||
253 dp->pos == TBL_DATA_HORIZ ||
254 dp->pos == TBL_DATA_NHORIZ ||
255 dp->pos == TBL_DATA_DHORIZ ||
256 dp->pos == TBL_DATA_NDHORIZ)
258 else if (dp->string != NULL) {
259 save_font = h->metac;
260 html_setfont(h, dp->layout->font);
261 if (dp->layout->pos == TBL_CELL_LONG)
263 print_text(h, dp->string);
264 if (dp->layout->pos == TBL_CELL_NUMBER) {
265 col = h->tbl.cols + dp->layout->col;
266 if (col->decimal < col->nwidth) {
267 if ((ccp = strrchr(dp->string,
268 sp->opts->decimal)) == NULL) {
271 ccp = strchr(dp->string, '\0');
274 sz = col->nwidth - col->decimal;
275 while (--sz > 0) {
291 h->flags &= ~HTML_NONOSPACE;
294 if (sp->next == NULL) {
295 assert(h->tbl.cols);
296 free(h->tbl.cols);
297 h->tbl.cols = NULL;