* Add a footer to the table. * * Footers are added as elements of a singly-linked list, and the content is * strdup'd, so there is no need to keep the original footer string around. * * Footers are never translated by the function. If you want the footer * translated you must do so yourself, before calling printTableAddFooter. The * reason this works differently to headers and cells is th
| 3186 | * translated as a whole. |
| 3187 | */ |
| 3188 | void |
| 3189 | printTableAddFooter(printTableContent *const content, const char *footer) |
| 3190 | { |
| 3191 | printTableFooter *f; |
| 3192 | |
| 3193 | f = pg_malloc0(sizeof(*f)); |
| 3194 | f->data = pg_strdup(footer); |
| 3195 | |
| 3196 | if (content->footers == NULL) |
| 3197 | content->footers = f; |
| 3198 | else |
| 3199 | content->footer->next = f; |
| 3200 | |
| 3201 | content->footer = f; |
| 3202 | } |
| 3203 | |
| 3204 | /* |
| 3205 | * Change the content of the last-added footer. |
no test coverage detected