From: Lukas Krickl Date: Sat, 9 Dec 2023 20:33:00 +0000 (+0100) Subject: WIP: path resolver X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=de4e5e3d76bcce74b2efc1a471a97b106dd35cca;p=ulas%2F.git WIP: path resolver --- diff --git a/src/ulas.c b/src/ulas.c index cf03bc3..f07f012 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -66,7 +66,8 @@ FILE *ulas_incpathfopen(const char *path, const char *mode) { char pathbuf[ULAS_PATHMAX]; memset(pathbuf, 0, ULAS_PATHMAX); int baselen = strlen(path); - + + // check all include paths for (int i = 0; i < ulas.include_paths_len; i++) { pathbuf[0] = '\0'; char *ip = ulas.include_paths[i]; @@ -87,9 +88,7 @@ FILE *ulas_incpathfopen(const char *path, const char *mode) { } } - // TODO: loop inc-paths - // lastly check . - + // check the original path last FILE *f = fopen(path, mode); if (f == NULL) { ULASERR("%s: %s\n", path, strerror(errno));