aboutsummaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-08-09 11:58:50 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-08-09 11:58:50 +0530
commitfcc034ca49d94e4a94bcf8c113fc402393fb1e4c (patch)
tree5d177ff6e041c10384ac0d25c124c41269c7ece6 /src/engine
parent7b2bec0bd4e43df09fa251c3bd0863c89e913f73 (diff)
engine: eachdo: add docstring for fetch_files()
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/eachdo.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/engine/eachdo.c b/src/engine/eachdo.c
index 23abd2f..36dd335 100644
--- a/src/engine/eachdo.c
+++ b/src/engine/eachdo.c
@@ -33,7 +33,8 @@ extern msg_t *msg;
* directives. It appends to the buffer the corresponding value of the key for
* each PUT in the directives.
*
- * ARGS:
+ * NOTE: The keys and values must be wrapped.
+ *
* content: A pointer to the buffer that is appended to
* directives: A list of the EACHDO directives (only _RAW and PUT)
* keys, values: A hash of PUT keys and their corresponding values
@@ -73,6 +74,15 @@ write_eachdo_iteration(char **content,
}
}
+/*
+ * Handles EACHDOs on files. Fetches each file from a given directory
+ * (operands->key) and parses each of its configs before handing off the
+ * config->keys and config->values to write_eachdo_iteration.
+ *
+ * operands: Operands to the EACHDO call
+ * directives: List of all directives (from lexing the EACHDO's content block)
+ * content: A pointer to the buffer that is appended to
+ */
static void
fetch_files(eachdo_operands_t *operands, list_t *directives, char **content)
{