From: Lukas Krickl Date: Sat, 9 Dec 2023 14:31:50 +0000 (+0100) Subject: WIP: inc path resolution X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=5e8aa3864a73d10ed97c2751d7b952bd6cd56721;p=ulas%2F.git WIP: inc path resolution --- diff --git a/include/ulas.h b/include/ulas.h index 48ea0ea..2b6d11f 100644 --- a/include/ulas.h +++ b/include/ulas.h @@ -411,7 +411,6 @@ extern struct ulas_config ulascfg; struct ulas_config ulas_cfg_from_env(void); void ulas_init(struct ulas_config cfg); void ulas_free(void); -void ulas_pushincpath(const char *path); FILE* ulas_incpathfopen(const char *path, const char *mode); int ulas_main(struct ulas_config cfg); diff --git a/src/ulas.c b/src/ulas.c index 47c3227..ccb82c0 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -60,17 +60,13 @@ void ulas_free(void) { ulas_exprbuffree(&ulas.exprs); ulas_symbuffree(&ulas.syms); ulas_preprocfree(&ulas.pp); - - if (ulas.include_paths) { - for (int i = 0; i < ulas.include_paths_len; i++) { - free(ulas.include_paths[i]); - } - free(ulas.include_paths); - } } -void ulas_pushincpath(const char *path) {} + FILE* ulas_incpathfopen(const char *path, const char *mode) { + // TODO: loop inc-paths + // lastly check . + return NULL; }