summaryrefslogtreecommitdiff
path: root/src/mcpp-include-path.h
diff options
context:
space:
mode:
authorkx <kx@radix-linux.su>2026-10-01 12:02:28 +0300
committerkx <kx@radix-linux.su>2026-10-01 12:02:28 +0300
commitba1b04d64bdfaf377915b22f77520216ebe47674 (patch)
tree044343035c28b2b04ca9725f26e9b7c39342d19c /src/mcpp-include-path.h
parent124b140798456778e2a96851cc7268aa9a726698 (diff)
downloadmcpu-cpp-1.0.2.tar.xz
Version 1.0.21.0.2
Diffstat (limited to 'src/mcpp-include-path.h')
-rw-r--r--src/mcpp-include-path.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/mcpp-include-path.h b/src/mcpp-include-path.h
new file mode 100644
index 0000000..98001f8
--- /dev/null
+++ b/src/mcpp-include-path.h
@@ -0,0 +1,61 @@
+#ifndef __MCPU_CPP_INCLUDE_PATH_H__
+#define __MCPU_CPP_INCLUDE_PATH_H__ 1
+
+#include <defs.h>
+#include <mcpp-config-file.h>
+#include <mcpp-language.h>
+
+enum mcpu_include_class
+{
+ MCPU_INCLUDE_USER_EXPLICIT = 0,
+ MCPU_INCLUDE_SYSTEM_EXPLICIT,
+ MCPU_INCLUDE_USER_CONFIG_LANGUAGE,
+ MCPU_INCLUDE_USER_CONFIG,
+ MCPU_INCLUDE_SYSTEM_CONFIG_LANGUAGE,
+ MCPU_INCLUDE_SYSTEM_CONFIG,
+ MCPU_INCLUDE_AFTER_EXPLICIT,
+ MCPU_INCLUDE_AFTER_CONFIG
+};
+
+typedef struct mcpu_include_dir mcpu_include_dir;
+struct mcpu_include_dir
+{
+ char *path;
+ enum mcpu_include_class class_type;
+ enum mcpu_language language;
+ int language_specific;
+ mcpu_include_dir *next;
+};
+
+typedef struct mcpu_include_paths mcpu_include_paths;
+struct mcpu_include_paths
+{
+ mcpu_include_dir *first;
+ mcpu_include_dir *last;
+ int no_standard_includes;
+};
+
+void mcpu_include_paths_init( mcpu_include_paths *paths );
+void mcpu_include_paths_free( mcpu_include_paths *paths );
+int mcpu_include_paths_add( mcpu_include_paths *paths, const char *path,
+ enum mcpu_include_class class_type );
+int mcpu_include_paths_add_language( mcpu_include_paths *paths,
+ const char *path,
+ enum mcpu_include_class class_type,
+ enum mcpu_language language );
+int mcpu_include_paths_add_list( mcpu_include_paths *paths,
+ const char *list,
+ enum mcpu_include_class class_type );
+int mcpu_include_paths_from_config( mcpu_include_paths *paths,
+ const mcpu_config *config );
+int mcpu_include_paths_dump( const mcpu_include_paths *paths, FILE *stream );
+char *mcpu_include_find( const mcpu_include_paths *paths,
+ const char *source_filename,
+ const char *include_filename,
+ int quoted,
+ enum mcpu_language language,
+ int include_next,
+ const mcpu_include_dir *after_dir,
+ const mcpu_include_dir **found_dir );
+
+#endif /* __MCPU_CPP_INCLUDE_PATH_H__ */