+/* --- @report_location@ --- *
+ *
+ * Arguments: @struct human_output *h@ = output state
+ * @FILE *fp@ = stream to write the location on
+ * @const char *file@ = filename
+ * @unsigned lno@ = line number
+ *
+ * Returns: ---
+ *
+ * Use: Print the filename and line number to the output stream @fp@.
+ * Also, if appropriate, print interleaved highlighting control
+ * codes to our usual output stream. If @file@ is null then do
+ * nothing.
+ */
+
+static void report_location(struct human_output *h, FILE *fp,
+ const char *file, unsigned lno)
+{
+ unsigned f = 0;
+#define f_flush 1u
+
+ /* We emit highlighting if @fp@ is our usual output stream, or the
+ * duplicate-errors flag is clear indicating that (we assume) they're
+ * secretly going to the same place anyway. If they're different streams,
+ * though, we have to be careful to keep the highlighting and the actual
+ * text synchronized.
+ */
+
+ if (!file)
+ /* nothing to do */;
+ else if (fp != h->lyt.fp && (h->f&HOF_DUPERR))
+ fprintf(fp, "%s:%u: ", file, lno);
+ else {
+ if (fp != h->lyt.fp) f |= f_flush;
+
+#define FLUSH(fp) do if (f&f_flush) fflush(fp); while (0)
+
+ setattr(h, HA_LOC); FLUSH(h->lyt.fp);
+ fputs(file, fp); FLUSH(fp);
+ setattr(h, HA_LOCSEP); FLUSH(h->lyt.fp);
+ fputc(':', fp); FLUSH(fp);
+ setattr(h, HA_LOC); FLUSH(h->lyt.fp);
+ fprintf(fp, "%u", lno); FLUSH(fp);
+ setattr(h, HA_LOCSEP); FLUSH(h->lyt.fp);
+ fputc(':', fp); FLUSH(fp);
+ setattr(h, HA_PLAIN); FLUSH(h->lyt.fp);
+ fputc(' ', fp);
+
+#undef FLUSH
+ }
+
+#undef f_flush
+}
+
+/* --- @human_outcome@, @human_skip@, @human_fail@ --- *
+ *
+ * Arguments: @struct tvec_output *o@ = output sink, secretly a @struct
+ * human_output@
+ * @unsigned attr@ = attribute to apply to the outcome
+ * @const char *outcome@ = outcome string to report
+ * @const char *detail@, @va_list *ap@ = a detail message
+ * @const char *excuse@, @va_list *ap@ = reason for skipping the
+ * test
+ *
+ * Returns: ---
+ *
+ * Use: Report that a test has been skipped or failed.
+ *
+ * The human driver reports the situation on its output stream.
+ */
+
+static void human_outcome(struct tvec_output *o,
+ unsigned attr, const char *outcome,
+ const char *detail, va_list *ap)