From: cuz Date: Thu, 29 May 2003 09:19:12 +0000 (+0000) Subject: Use AddSearchPathFromEnv X-Git-Tag: V2.12.0~1541 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a0d9edf5bab7cfb6693fce60aae2ee087e56fe5e;p=cc65 Use AddSearchPathFromEnv git-svn-id: svn://svn.cc65.org/cc65/trunk@2177 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/incpath.c b/src/cc65/incpath.c index abac35c3a..b9e8d517a 100644 --- a/src/cc65/incpath.c +++ b/src/cc65/incpath.c @@ -33,8 +33,6 @@ -#include - /* 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); }