]> git.sur5r.net Git - cc65/commitdiff
Use AddSearchPathFromEnv
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 29 May 2003 09:19:12 +0000 (09:19 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 29 May 2003 09:19:12 +0000 (09:19 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2177 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/incpath.c

index abac35c3aefe562ae13c48b4f8cecc3676983379..b9e8d517ab07b79000672d627a642e3886a63fbb 100644 (file)
@@ -33,8 +33,6 @@
 
 
 
-#include <stdlib.h>
-
 /* common */
 #include "searchpath.h"
 
@@ -70,20 +68,15 @@ char* FindInclude (const char* Name, unsigned Where)
 void InitIncludePaths (void)
 /* Initialize the include path search list */
 {
-    const char* Path;
-
     /* Add some standard paths to the include search path */
-    AddIncludePath ("", INC_USER);             /* Current directory */
-    AddIncludePath ("include", INC_SYS);
+    AddSearchPath ("", INC_USER);              /* Current directory */
+    AddSearchPath ("include", INC_SYS);
 #ifdef CC65_INC
-    AddIncludePath (CC65_INC, INC_SYS);
+    AddSearchPath (CC65_INC, INC_SYS);
 #else
-    AddIncludePath ("/usr/lib/cc65/include", INC_SYS);
+    AddSearchPath ("/usr/lib/cc65/include", INC_SYS);
 #endif
-    Path = getenv ("CC65_INC");
-    if (Path) {
-       AddIncludePath (Path, INC_SYS | INC_USER);
-    }
+    AddSearchPathFromEnv ("CC65_INC", INC_SYS | INC_USER);
 }