diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-11 11:00:24 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-11 11:00:24 +0530 |
commit | bed4dae042b2e2836338212905df9ee028a37260 (patch) | |
tree | 2bc7744dd5aa25f0225f4a3a1675c681b2126ea8 /src | |
parent | c8d48db2011e61409bb6b56910b70d6bce3a72f6 (diff) |
engine: ingest must return a list of content headers
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.c | 6 | ||||
-rw-r--r-- | src/main.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/engine.c b/src/engine.c index f5187b5..ff84990 100644 --- a/src/engine.c +++ b/src/engine.c @@ -68,14 +68,14 @@ handle_contentfor(char **buffer, free(operand); } -void +list_t * ingest(char **buffer) { key_match_t *match; list_t *content_headers = list_create(sizeof(contentfor_operand_t)); if (content_headers == NULL) { printf("Could not create content_headers\n"); - return; + return NULL; } while (true) { @@ -128,5 +128,5 @@ ingest(char **buffer) free(op->key); } - list_delete(content_headers); + return content_headers; } @@ -77,6 +77,8 @@ handle_file(const char *path) if (strlen(buffer) != 0) ingest(&buffer); fprintf(out, "%s%s%s", base_template->pre, buffer, base_template->post); + list_t *content_headers = ingest(&buffer); + list_delete(content_headers); } free(buffer); |