From 398aa647a4540b17e61299403c66c1f7f39b99e9 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sun, 14 Jun 2015 12:14:01 +0200 Subject: [PATCH] C types --- src/types_c.ysl2 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/types_c.ysl2 diff --git a/src/types_c.ysl2 b/src/types_c.ysl2 new file mode 100644 index 0000000..f3d375f --- /dev/null +++ b/src/types_c.ysl2 @@ -0,0 +1,21 @@ +include ./textutils.ysl2 + +function "toC" { + param "type"; + + choose { + when "$type='stringlist'" > stringlist_t + when "$type='string'" > char * + when "$type='identity'" > pEp_identity + when "$type='identitylist'" > identity_list_t + when "$type='timestamp'" > timestamp + when "$type='EncFormat'" > PEP_enc_format + when "$type='bloblist'" > bloblist_t + when "$type='stringpairlist'" > stringpairlist + + otherwise value "$type"; + } +} + +define operator "√([$@]?[a-zA-Z0-9_]+)" as call "toC" with "type", "%1"; +