aboutsummaryrefslogtreecommitdiffstats
path: root/src/vega.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-26 10:49:02 +0100
committereunhhu <[email protected]>2026-09-26 10:49:02 +0100
commitb55395802f4c7b929c45013efb572aab786a8b43 (patch)
treead57b9d3521521c6ce9ca04d6a7f151b05c824b2 /src/vega.h
parent2d7024ba01875a8fc7a2c99e78c62911bcc7fe3f (diff)
downloadvega-b55395802f4c7b929c45013efb572aab786a8b43.tar.gz
vega-b55395802f4c7b929c45013efb572aab786a8b43.zip
Add vega check for conventions a spec misses
Surfaces read a view that misses a convention as something else without a word: a number label makes a list a table, a text tone disappears, a list never shows its other columns, X_focus without a table becomes a field, a second text input has nowhere to type. vega check MODULE names each such place (the view or input and what the surface does instead) and exits 1; the rules sit next to the code that reads the screen. The checks build a spec that misses eight conventions and expect exactly its nine findings, and none in the examples.
Diffstat (limited to 'src/vega.h')
-rw-r--r--src/vega.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vega.h b/src/vega.h
index 40aecaa..062639b 100644
--- a/src/vega.h
+++ b/src/vega.h
@@ -34,6 +34,11 @@ typedef struct {
} VegaScreen;
void vega_screen(VegaScreen *, const PureModule *);
+/* What a module seems to mean but does not meet: a list label that is not
+ * text, a _focus view without its table, a column a list never shows, a
+ * second text input. Each finding names the view or input it is about;
+ * returns how many there were. */
+unsigned vega_check(const PureModule *, void (*report)(void *, const char *name, const char *message), void *context);
/* A view (row ignored) or a column at a row as text; numbers in Pure's
* shortest form. false when it has no value (for example a missing item). */