From e9e3c01ff751b4828a916cb1e74515b320759a0c Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 19 Mar 2025 12:20:25 +0100 Subject: [PATCH] ucm: format @@SyntaxVersion to 4 digits It is better for regex matching. Signed-off-by: Jaroslav Kysela --- src/ucm/main.c | 2 +- src/ucm/ucm_confdoc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ucm/main.c b/src/ucm/main.c index f1849aa2..5a86b9cd 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -1504,7 +1504,7 @@ skip: snd_config_delete(cfg); uc_mgr_set_variable(uc_mgr, "@@LibraryVersion", SND_LIB_VERSION_STR); - snprintf(vname, sizeof(vname), "%d", SYNTAX_VERSION_MAX); + snprintf(vname, sizeof(vname), "%04d", SYNTAX_VERSION_MAX); uc_mgr_set_variable(uc_mgr, "@@SyntaxVersion", vname); return end + 3; diff --git a/src/ucm/ucm_confdoc.h b/src/ucm/ucm_confdoc.h index bbfbd92f..025148f9 100644 --- a/src/ucm/ucm_confdoc.h +++ b/src/ucm/ucm_confdoc.h @@ -407,7 +407,7 @@ ${eval:\} | Evaluate expression like *($var+2)/3* [**Syntax 5**] ${find-card:\} | Find a card - see _Find card substitution_ section ${find-device:\} | Find a device - see _Find device substitution_ section @@LibraryVersion | e.g. "1.2.14" [**Syntax 8**] -@@SyntaxVersion | e.g. "8" [**Syntax 8**] +@@SyntaxVersion | e.g. "0008" (decimal base - no hex) [**Syntax 8**] General note: If two dollars '$$' instead one dolar '$' are used for the substitution identification, the error is ignored (e.g. file does not -- 2.47.1