projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64626c8
)
WIP: path resolver
author
Lukas Krickl
<lukas@krickl.dev>
Sat, 9 Dec 2023 20:33:00 +0000
(21:33 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sat, 9 Dec 2023 20:33:00 +0000
(21:33 +0100)
src/ulas.c
patch
|
blob
|
history
diff --git
a/src/ulas.c
b/src/ulas.c
index cf03bc3803c155b36ef295da6ea8b9c0b5634b89..f07f0124f3537c28e91682b26ed0b9dc3bdb7f81 100644
(file)
--- 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));