* Change the content of the last-added footer. * * The current contents of the last-added footer are freed, and replaced by the * content given in *footer. If there was no previous footer, add a new one. * * The content is strdup'd, so there is no need to keep the original string * around. */
| 3211 | * around. |
| 3212 | */ |
| 3213 | void |
| 3214 | printTableSetFooter(printTableContent *const content, const char *footer) |
| 3215 | { |
| 3216 | if (content->footers != NULL) |
| 3217 | { |
| 3218 | free(content->footer->data); |
| 3219 | content->footer->data = pg_strdup(footer); |
| 3220 | } |
| 3221 | else |
| 3222 | printTableAddFooter(content, footer); |
| 3223 | } |
| 3224 | |
| 3225 | /* |
| 3226 | * Free all memory allocated to this struct. |
no test coverage detected