dag

Djmoch's Auto Generator
git clone git://git.danielmoch.com/dag.git
Log | Files | Refs | README | LICENSE

commit 295660af94b1caa0729fe16a554f464faa674a4b
parent 3892ad821590bdd1790b1451ef32c0409c572ac6
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun, 18 Sep 2022 06:26:17 -0400

parse.y: Improve debug formatting

Diffstat:
Mparse.y | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/parse.y b/parse.y @@ -3,6 +3,7 @@ #include <err.h> #include <errno.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "dagfile.h" #include "string.h" @@ -259,24 +260,25 @@ push_filter(char *string) void debug_dagfile(struct dagfile *df) { - printf("target %s\n", df->target->path); + printf("dagfile config:\n"); + printf("\ttarget %s\n", df->target->path); struct source *s = df->target->sources; while (s != NULL) { - printf("source %s\n", s->path); + printf("\tsource %s\n", s->path); struct extension *e = s->extensions; while (e != NULL) { - printf("extension %s\n", e->value); + printf("\textension %s\n", e->value); struct suffix *s = e->suffixes; while (s != NULL) { - printf("suffix %s\n", s->value); + printf("\tsuffix %s\n", s->value); struct requirement *r = s->requirements; while (r != NULL) { - printf("require %s\n", r->path); + printf("\trequire %s\n", r->path); r = r->next; } struct filter *f = s->filters; while (f != NULL) { - printf("filter %s\n", f->cmd); + printf("\tfilter %s\n", f->cmd); f = f->next; } s = s->next;