From 7f8937db55ef5fb8b3a592fed04c654e9930fc34 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 5 Sep 2023 22:23:14 -0700 Subject: [PATCH] Stub for lab graph. --- src/driver.c | 4 ++++ src/scan.h | 1 + src/scan.re.c | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/src/driver.c b/src/driver.c index c7f81e5..f2beef0 100644 --- a/src/driver.c +++ b/src/driver.c @@ -64,6 +64,10 @@ int main(void) { if(!freopen(intent, "w", stdout)) goto catch; scan_score_graph(&scn); + intent = "labs.gnu"; + if(!freopen(intent, "w", stdout)) goto catch; + scan_labs_graph(&scn); + intent = "glider.gnu"; if(!freopen(intent, "w", stdout)) goto catch; scan_glider_graph(&scn); diff --git a/src/scan.h b/src/scan.h index 262a3d1..15bfcdd 100644 --- a/src/scan.h +++ b/src/scan.h @@ -159,6 +159,7 @@ void scan_(struct scan *); struct scan scan(struct journal *); const struct kvpair *scan_source_lookup(struct scan *, const union line64); void scan_score_graph(struct scan *); +void scan_labs_graph(struct scan *); void scan_glider_graph(struct scan *); void scan_flight_graph(struct scan *); void scan_kjv_graph(struct scan *); diff --git a/src/scan.re.c b/src/scan.re.c index bc613af..d68ce2a 100644 --- a/src/scan.re.c +++ b/src/scan.re.c @@ -1212,6 +1212,16 @@ void scan_score_graph(struct scan *const scan) { fprintf(stderr, "\n"); } +void scan_labs_graph(struct scan *const scan) { + struct linekvpair_tree_iterator it + = linekvpair_tree_iterator(&scan->labs); + assert(scan); + + fprintf(stderr, "*** Labs graph %s.\n", + linekvpair_tree_to_string(&scan->labs)); + fprintf(stderr, "\n"); +} + #include void scan_glider_graph(struct scan *const scan) {