diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-08-27 11:25:45 -0400 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-08-27 11:25:45 -0400 |
commit | 4cbb756c732ddea66d395923cc07c0d763024f97 (patch) | |
tree | 5c4affa9a7c58f7d4b8ea9a97fc326e115fb6645 /src/engine/include.c | |
parent | fd7e478e475fccf9616998ccb62e91534e935ae5 (diff) |
format: indent to 4 spaces
Diffstat (limited to 'src/engine/include.c')
-rw-r--r-- | src/engine/include.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/engine/include.c b/src/engine/include.c index 5cb650e..6114f07 100644 --- a/src/engine/include.c +++ b/src/engine/include.c @@ -38,31 +38,32 @@ extern msg_t *msg; void handle_include(char **buffer, key_match_t *match, directive_t *directive) { - char *operand = directive->operands; - char *partial_path; - asprintf(&partial_path, "%s/%s/%s", msg->base_directory, PARTIALS, operand); + char *operand = directive->operands; + char *partial_path; + asprintf( + &partial_path, "%s/%s/%s", msg->base_directory, PARTIALS, operand); - FILE *f = fopen(partial_path, "r"); - if (f == NULL) { - printf("Could not open: %s\n", partial_path); - return; - } - free(partial_path); + FILE *f = fopen(partial_path, "r"); + if (f == NULL) { + printf("Could not open: %s\n", partial_path); + return; + } + free(partial_path); - unsigned int size = fsize(f); - char *partial_content = fcontent(f, size); - fclose(f); + unsigned int size = fsize(f); + char *partial_content = fcontent(f, size); + fclose(f); - char *temp_buffer = strdup(*buffer); + char *temp_buffer = strdup(*buffer); - free(*buffer); - asprintf(buffer, - "%.*s%s%s\n", - match->offset, - temp_buffer, - partial_content, - temp_buffer + match->offset + match->length); + free(*buffer); + asprintf(buffer, + "%.*s%s%s\n", + match->offset, + temp_buffer, + partial_content, + temp_buffer + match->offset + match->length); - free(partial_content); - free(temp_buffer); + free(partial_content); + free(temp_buffer); } |