X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcpp.c;h=908c21f25d1384818fa0290cff88d989c869acb6;hp=5ab649247d17a4a2f468d7411a825e2c9333541c;hb=682b684daaa140de059da4a060098b8a6c0a439e;hpb=c9384515a81cb64d345b299908b2852f51bb8e6e diff --git a/src/cpp.c b/src/cpp.c index 5ab6492..908c21f 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -469,7 +469,7 @@ bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned bool parsed = false; int f_len = strlen(file->text); - if (!(flags & PSI_CPP_INCLUDE_NEXT) || *file->text == '/') { + if (file->type == PSI_T_QUOTED_STRING && (!(flags & PSI_CPP_INCLUDE_NEXT) || *file->text == '/')) { /* first try as is, full or relative path */ char temp[PATH_MAX], *path = temp; @@ -499,7 +499,7 @@ bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned } } - if (!(flags & PSI_CPP_INCLUDE_NEXT) || !cpp->search) { + if (!(flags & PSI_CPP_INCLUDE_NEXT)) { cpp->search = PSI_G(search_path); }