summaryrefslogtreecommitdiffstats
path: root/src/printer_yang.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:23:18 +0000
commit16527d165de55f2727f55b752b30d44a7e61e927 (patch)
tree0840ee6e0e109a9e85f0d80ff36f92587c6a5538 /src/printer_yang.c
parentReleasing progress-linux version 2.1.30-2.1~progress7.99u1. (diff)
downloadlibyang2-16527d165de55f2727f55b752b30d44a7e61e927.tar.xz
libyang2-16527d165de55f2727f55b752b30d44a7e61e927.zip
Merging upstream version 2.1.148.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/printer_yang.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/printer_yang.c b/src/printer_yang.c
index ea643ac..8e0af18 100644
--- a/src/printer_yang.c
+++ b/src/printer_yang.c
@@ -628,9 +628,7 @@ yprc_must(struct lys_ypr_ctx *pctx, const struct lysc_must *must, ly_bool *flag)
ly_bool inner_flag = 0;
ypr_open(pctx->out, flag);
- ly_print_(pctx->out, "%*smust \"", INDENT);
- ypr_encode(pctx->out, must->cond->expr, -1);
- ly_print_(pctx->out, "\"");
+ ypr_text(pctx, "must", must->cond->expr, 1, 0);
LEVEL++;
yprc_extension_instances(pctx, LY_STMT_MUST, 0, must->exts, &inner_flag);
@@ -773,9 +771,7 @@ yprp_when(struct lys_ypr_ctx *pctx, const struct lysp_when *when, ly_bool *flag)
}
ypr_open(pctx->out, flag);
- ly_print_(pctx->out, "%*swhen \"", INDENT);
- ypr_encode(pctx->out, when->cond, -1);
- ly_print_(pctx->out, "\"");
+ ypr_text(pctx, "when", when->cond, 1, 0);
LEVEL++;
yprp_extension_instances(pctx, LY_STMT_WHEN, 0, when->exts, &inner_flag);
@@ -795,9 +791,7 @@ yprc_when(struct lys_ypr_ctx *pctx, const struct lysc_when *when, ly_bool *flag)
}
ypr_open(pctx->out, flag);
- ly_print_(pctx->out, "%*swhen \"", INDENT);
- ypr_encode(pctx->out, when->cond->expr, -1);
- ly_print_(pctx->out, "\"");
+ ypr_text(pctx, "when", when->cond->expr, 1, 0);
LEVEL++;
yprc_extension_instances(pctx, LY_STMT_WHEN, 0, when->exts, &inner_flag);