From: Jaroslav Kysela Date: Wed, 19 Mar 2025 11:20:25 +0000 (+0100) Subject: ucm: format @@SyntaxVersion to 4 digits X-Git-Tag: v1.2.14~21 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=e9e3c01ff751b4828a916cb1e74515b320759a0c;p=alsa-lib.git ucm: format @@SyntaxVersion to 4 digits It is better for regex matching. Signed-off-by: Jaroslav Kysela --- 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