From 5e7f66b34826697537bcdcb60c81f56da956a32b Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 8 Sep 2024 15:45:57 +0200 Subject: Add ram formatting --- src/blocks/text.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/blocks/text.c') diff --git a/src/blocks/text.c b/src/blocks/text.c index 0e5fc31..f2c1651 100644 --- a/src/blocks/text.c +++ b/src/blocks/text.c @@ -1,5 +1,17 @@ #include "scheme.h" +#include "../any_log.h" + +static bool block_text_validate(block_t *block, const block_scheme_t *scheme) +{ + if (block->text.text == NULL) { + log_error("Block '%s' requires key '%s'", block->label, "text"); + return false; + } + + return true; +} + const block_scheme_t block_text_scheme = { .name = "text", .block = { @@ -7,5 +19,5 @@ const block_scheme_t block_text_scheme = { }, .size = 0, .entries = NULL, - .verify = NULL, + .validate = block_text_validate, }; -- cgit v1.2.3