diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-26 18:25:04 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-26 18:25:53 +0530 |
commit | 9376c06ded47c4b77b94cb4d1e628537d9d69fce (patch) | |
tree | 25297ed59e75133ff6ee410716606a103f88644b /include | |
parent | a3b18ea4019f44185a495afd4be66350f217c144 (diff) |
config,main,list: get resources from config.cfg instead of a compiled config.h
Diffstat (limited to 'include')
-rw-r--r-- | include/copy.h | 3 | ||||
-rw-r--r-- | include/engine.h | 2 | ||||
-rw-r--r-- | include/list.h | 7 | ||||
-rw-r--r-- | include/template.h | 2 |
4 files changed, 14 insertions, 0 deletions
diff --git a/include/copy.h b/include/copy.h index b334b12..80fc5fb 100644 --- a/include/copy.h +++ b/include/copy.h @@ -4,6 +4,9 @@ #include <ftw.h> #include <sys/stat.h> +#define OUTPUT "dist" +#define DIRECTORY "compromyse.xyz" + typedef struct FTW FTW; int copy_recursively(const char *fpath, diff --git a/include/engine.h b/include/engine.h index d65c771..7719528 100644 --- a/include/engine.h +++ b/include/engine.h @@ -4,6 +4,8 @@ #include <lexer.h> #include <list.h> +#define PARTIALS "partials" + list_t *ingest(char **buffer); void handle_include(char **buffer, key_match_t *match, directive_t *directive); void handle_contentfor(char **buffer, diff --git a/include/list.h b/include/list.h index 4447884..b6342d1 100644 --- a/include/list.h +++ b/include/list.h @@ -14,9 +14,16 @@ typedef struct { uint8_t *elements; } list_t; +typedef struct { + void *ptr; +} ptr_wrapper_t; + list_t *list_create(size_t element_size); void list_add(list_t *list, void *element); void *list_get(list_t *list, size_t i); void list_delete(list_t *list); +void *list_find_corresponding_value_from_ptr_wrapper(list_t *keys, + list_t *values, + char *key); #endif diff --git a/include/template.h b/include/template.h index dbeb897..f0fdac6 100644 --- a/include/template.h +++ b/include/template.h @@ -5,6 +5,8 @@ #include <stdbool.h> #include <stdio.h> +#define BASE_TEMPLATE "base.html" + typedef struct { list_t *components; } template_t; |