From 5e8aa3864a73d10ed97c2751d7b952bd6cd56721 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 9 Dec 2023 15:31:50 +0100 Subject: [PATCH] WIP: inc path resolution --- include/ulas.h | 1 - src/ulas.c | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) 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; } -- 2.30.2