- /* Try standalone. */
- talloc_free(ret);
- mangle = mangle_example(m, i, get_ccan_file_lines(i), keep);
- ret = compile(score, m, mangle, keep);
- if (!ret) {
- prev = get_ccan_file_lines(i);
- score->score++;
- continue;
- }
-
- if (!score->errors)
- score->errors = ret;
- else {
- score->errors = talloc_append_string(score->errors,
- ret);
- talloc_free(ret);
+ score->errors = talloc_asprintf_append(score->errors,
+ "%s: tried standalone example:\n"
+ "%s\n"
+ "Errors: %s\n\n",
+ i->name,
+ get_ccan_file_contents(i),
+ ret);
+ score->errors = talloc_asprintf_append(score->errors,
+ "%s: tried adding headers, wrappers:\n"
+ "%s\n"
+ "Errors: %s\n\n",
+ i->name,
+ get_ccan_file_contents(mangle1),
+ ret1);
+
+ if (mangle2) {
+ score->errors = talloc_asprintf_append(score->errors,
+ "%s\n"
+ "%s: tried combining with"
+ " previous example:\n"
+ "Errors: %s\n\n",
+ i->name,
+ get_ccan_file_contents(mangle2),
+ ret2);