WIP: path resolver
authorLukas Krickl <lukas@krickl.dev>
Sat, 9 Dec 2023 20:33:00 +0000 (21:33 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sat, 9 Dec 2023 20:33:00 +0000 (21:33 +0100)
src/ulas.c

index cf03bc3803c155b36ef295da6ea8b9c0b5634b89..f07f0124f3537c28e91682b26ed0b9dc3bdb7f81 100644 (file)
@@ -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));