+
+ /* If parent didn't know, NO == NO, but YES == MAYBE. */
+ if (parent == MAYBE_COMPILED && ret == COMPILED)
+ ret = MAYBE_COMPILED;
+ return ret;
+}
+
+static void add_symbol(struct list_head *head,
+ const char *symbol, const unsigned int *value)
+{
+ struct symbol *sym = talloc(head, struct symbol);
+ sym->name = symbol;
+ sym->value = value;
+ list_add(head, &sym->list);
+}
+
+enum line_compiled get_ccan_line_pp(struct pp_conditions *cond,
+ const char *symbol,
+ const unsigned int *value,
+ ...)
+{
+ enum line_compiled ret;
+ struct list_head *head;
+ va_list ap;
+
+ head = talloc(NULL, struct list_head);
+ list_head_init(head);
+
+ va_start(ap, value);
+ add_symbol(head, symbol, value);
+
+ while ((symbol = va_arg(ap, const char *)) != NULL) {
+ value = va_arg(ap, const unsigned int *);
+ add_symbol(head, symbol, value);
+ }
+ ret = get_pp(cond, head);
+ talloc_free(head);
+ return ret;
+}
+
+void score_file_error(struct score *score, struct ccan_file *f, unsigned line,
+ const char *error)
+{
+ struct file_error *fe = talloc(score, struct file_error);
+ fe->file = f;
+ fe->line = line;
+ fe->error = error;
+ list_add_tail(&score->per_file_errors, &fe->list);