+#include "config.h"
#include "ccanlint.h"
#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
f->fullname = talloc_asprintf(f, "%s/%s", dir, f->name);
f->contents = NULL;
f->cov_compiled = NULL;
+ f->simplified = NULL;
return f;
}
static bool is_empty(const char *line)
{
- return strspn(line, " \t") == strlen(line);
+ return strspn(line, " \r\t") == strlen(line);
}
static bool continues(const char *line)
return false;
if (!defined)
cond->type = PP_COND_IF;
+
+ /* FIXME: We just chain them, ignoring operators. */
+ if (get_token(line, "||") || get_token(line, "&&")) {
+ struct pp_conditions *sub = talloc(cond, struct pp_conditions);
+
+ sub->parent = cond->parent;
+ sub->type = PP_COND_IFDEF;
+ if (parse_hash_if(sub, line))
+ cond->parent = sub;
+ }
+
return true;
}