]> git.sur5r.net Git - cc65/blobdiff - src/cc65/incpath.c
Fixed problem with last change. Wide string constants were not handled
[cc65] / src / cc65 / incpath.c
index b9e8d517ab07b79000672d627a642e3886a63fbb..937a0d9bf64d80ef0eeda5bf6b4e6090d14d6be3 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2003 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2000-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -65,18 +65,30 @@ char* FindInclude (const char* Name, unsigned Where)
 
 
 
+void ForgetAllIncludePaths (void)
+/* Remove all include search paths. */
+{
+    ForgetAllSearchPaths (INC_SYS | INC_USER);
+}
+
+
+
 void InitIncludePaths (void)
 /* Initialize the include path search list */
 {
     /* Add some standard paths to the include search path */
     AddSearchPath ("", INC_USER);              /* Current directory */
-    AddSearchPath ("include", INC_SYS);
+
+    /* Add some compiled in search paths if defined at compile time */
 #ifdef CC65_INC
     AddSearchPath (CC65_INC, INC_SYS);
-#else
-    AddSearchPath ("/usr/lib/cc65/include", INC_SYS);
 #endif
+
+    /* Add specific paths from the environment */
     AddSearchPathFromEnv ("CC65_INC", INC_SYS | INC_USER);
+
+    /* Add paths relative to a main directory defined in an env var */
+    AddSubSearchPathFromEnv ("CC65_HOME", "include", INC_SYS);
 }