From 78e1c693eea18a28428f0f05837d41fba52e6309 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Wed, 1 Sep 2021 21:46:42 +0200 Subject: [PATCH] use abbr() function --- src/gen_c.ysl2 | 4 ++-- src/transport_status_code.yml2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gen_c.ysl2 b/src/gen_c.ysl2 index 1cd2d7a..0fd2e6e 100644 --- a/src/gen_c.ysl2 +++ b/src/gen_c.ysl2 @@ -28,9 +28,9 @@ tstylesheet { indent 0; choose { when "@output='hex'" - > PEP_«../@abbr»_«@name» = 0x«yml:dec2hex(.,$hexdigits)» + > PEP_«yml:abbr(../@name)»_«@name» = 0x«yml:dec2hex(.,$hexdigits)» otherwise - > PEP_«../@abbr»_«@name» = «.» + > PEP_«yml:abbr(../@name)»_«@name» = «.» } if "position()!=last()" > , if "@doc" > // «@doc» diff --git a/src/transport_status_code.yml2 b/src/transport_status_code.yml2 index 3ff88fd..762cf72 100644 --- a/src/transport_status_code.yml2 +++ b/src/transport_status_code.yml2 @@ -8,7 +8,7 @@ decl hex is item (output=hex); // the first octet is the transport id; for general values it is 0x00 // the first bit of the second octet is set if this is an error state -enum transport_status_code abbr=tsc { +enum transport_status_code { hex ready 0x00000000; doc > non error states