1135 |
*flags = t->flags; |
*flags = t->flags; |
1136 |
} |
} |
1137 |
|
|
1138 |
|
/* Returns true if the table will fit in the given page WIDTH, |
1139 |
|
false otherwise. */ |
1140 |
|
static bool |
1141 |
|
tabi_fits_width (int width) |
1142 |
|
{ |
1143 |
|
int i; |
1144 |
|
|
1145 |
|
for (i = t->l; i < t->nc - t->r; i++) |
1146 |
|
if (t->wl + t->wr + t->w[i] > width) |
1147 |
|
return false; |
1148 |
|
|
1149 |
|
return true; |
1150 |
|
} |
1151 |
|
|
1152 |
|
/* Returns true if the table will fit in the given page LENGTH, |
1153 |
|
false otherwise. */ |
1154 |
|
static bool |
1155 |
|
tabi_fits_length (int length) |
1156 |
|
{ |
1157 |
|
int i; |
1158 |
|
|
1159 |
|
for (i = t->t; i < t->nr - t->b; i++) |
1160 |
|
if (t->ht + t->hb + t->h[i] > length) |
1161 |
|
return false; |
1162 |
|
|
1163 |
|
return true; |
1164 |
|
} |
1165 |
|
|
1166 |
|
/* Sets the number of header rows/columns on the left, right, top, |
1167 |
|
and bottom sides to HL, HR, HT, and HB, respectively. */ |
1168 |
|
static void |
1169 |
|
tabi_set_headers (int hl, int hr, int ht, int hb) |
1170 |
|
{ |
1171 |
|
t->l = hl; |
1172 |
|
t->r = hr; |
1173 |
|
t->t = ht; |
1174 |
|
t->b = hb; |
1175 |
|
} |
1176 |
|
|
1177 |
/* Render title for current table, with major index X and minor index |
/* Render title for current table, with major index X and minor index |
1178 |
Y. Y may be zero, or X and Y may be zero, but X should be nonzero |
Y. Y may be zero, or X and Y may be zero, but X should be nonzero |
1179 |
if Y is nonzero. */ |
if Y is nonzero. */ |
1274 |
NULL, |
NULL, |
1275 |
tabi_cumulate, |
tabi_cumulate, |
1276 |
tabi_flags, |
tabi_flags, |
1277 |
|
tabi_fits_width, |
1278 |
|
tabi_fits_length, |
1279 |
|
|
1280 |
NULL, |
NULL, |
1281 |
NULL, |
NULL, |
1282 |
|
tabi_set_headers, |
1283 |
|
|
1284 |
tabi_title, |
tabi_title, |
1285 |
tabi_render, |
tabi_render, |