Append a section to the render buffer. */
| 5754 | |
| 5755 | /* Append a section to the render buffer. */ |
| 5756 | static int adr_render_section(char *buf, int buf_sz, int pos, const char *key, const char *value) { |
| 5757 | if (pos > 0) { |
| 5758 | pos += snprintf(buf + pos, buf_sz - pos, "\n\n"); |
| 5759 | } |
| 5760 | pos += snprintf(buf + pos, buf_sz - pos, "## %s\n%s", key, value); |
| 5761 | return pos; |
| 5762 | } |
| 5763 | |
| 5764 | char *cbm_adr_render(const cbm_adr_sections_t *sections) { |
| 5765 | if (!sections || sections->count == 0) { |