diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-08-09 13:49:02 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-08-09 13:49:02 +0530 |
commit | 38a643690917927a263f19893d48962b38a7fdd4 (patch) | |
tree | 3c56e80c5a28f68da04311cc716a7571de062942 | |
parent | 84b0095c4ccca0a244d0c3d8b9d1a79ec605f2b1 (diff) |
engine: add docstring to engine_ingest() and engine_delete()
-rw-r--r-- | include/engine.h | 1 | ||||
-rw-r--r-- | src/engine/engine.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/engine.h b/include/engine.h index 21a683c..771efd4 100644 --- a/include/engine.h +++ b/include/engine.h @@ -36,6 +36,7 @@ typedef struct { engine_t *engine_ingest(char **buffer); void engine_delete(engine_t *engine); + void handle_include(char **buffer, key_match_t *match, directive_t *directive); void handle_contentfor(char **buffer, key_match_t *match, diff --git a/src/engine/engine.c b/src/engine/engine.c index b1dccf4..ecfbc22 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -33,6 +33,15 @@ extern msg_t *msg; +/* + * First reads the config, if present. Then streams each directive and parses + * it, modifying the buffer. At the end, all applicable directives in the + * buffer are parsed and evaluated. + * + * ENDEACHDO, BODY, CONTENT, _RAW, etc. are not applicable, + * for varying reasons. For example, ENDEACHDO isn't really meant to be parsed. + * It's only there to define the end of the EACHDO content block. + */ engine_t * engine_ingest(char **buffer) { @@ -113,6 +122,9 @@ engine_ingest(char **buffer) return engine; } +/* + * Frees the provided engine_t's children before freeing the structure itself. + */ void engine_delete(engine_t *engine) { |