+static inline void include_path(const struct psi_token *file, char **path)
+{
+ if (file->text->val[0] == '/') {
+ *path = file->text->val;
+ } else {
+ char *dir;
+ size_t len;
+
+ strncpy(*path, file->file->val, PATH_MAX);
+
+ dir = dirname(*path);
+ len = strlen(dir);
+
+ assert(len + file->text->len + 1 < PATH_MAX);
+
+ memmove(*path, dir, len);
+ (*path)[len] = '/';
+ memcpy(&(*path)[len + 1], file->text->val, file->text->len + 1);
+ }
+}
+
+bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned flags)