summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-11-08 14:33:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-11-11 08:26:36 +1000
commitabb115c78faeb09b6f74ae9811b986f155f7fad7 (patch)
tree364028557d88cbc4bcd61d12754baccbd3db0f18
parente8cb431144f8bceb0ad2443cb07b383dcbed9280 (diff)
downloadxorg-lib-libxkbcommon-abb115c78faeb09b6f74ae9811b986f155f7fad7.tar.gz
tools/list: enclose the the various field names in quotes
Because otherwise the 'no' layout is treated as disagreement with whatever is to be disagreed with. Fixed in YAML 1.2 but that's not universally supported. Fixes #268
-rw-r--r--tools/registry-list.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/registry-list.c b/tools/registry-list.c
index 6895e91..0c56171 100644
--- a/tools/registry-list.c
+++ b/tools/registry-list.c
@@ -159,12 +159,12 @@ main(int argc, char **argv)
const char *variant = rxkb_layout_get_variant(l);
const char *brief = rxkb_layout_get_brief(l);
- printf("- layout: %s\n"
- " variant: %s\n"
- " brief: %s\n"
+ printf("- layout: '%s'\n"
+ " variant: '%s'\n"
+ " brief: '%s'\n"
" description: %s\n",
rxkb_layout_get_name(l),
- variant ? variant : "''",
+ variant ? variant : "",
brief ? brief : "''",
rxkb_layout_get_description(l));
@@ -173,7 +173,7 @@ main(int argc, char **argv)
if (iso639) {
const char *sep = "";
while (iso639) {
- printf("%s%s", sep, rxkb_iso639_code_get_code(iso639));
+ printf("%s'%s'", sep, rxkb_iso639_code_get_code(iso639));
iso639 = rxkb_iso639_code_next(iso639);
sep = ", ";
}
@@ -184,7 +184,7 @@ main(int argc, char **argv)
if (iso3166) {
const char *sep = "";
while (iso3166) {
- printf("%s%s", sep, rxkb_iso3166_code_get_code(iso3166));
+ printf("%s'%s'", sep, rxkb_iso3166_code_get_code(iso3166));
iso3166 = rxkb_iso3166_code_next(iso3166);
sep = ", ";
}
@@ -199,7 +199,7 @@ main(int argc, char **argv)
while (g) {
struct rxkb_option *o;
- printf("- name: %s\n"
+ printf("- name: '%s'\n"
" description: %s\n"
" allows_multiple: %s\n"
" options:\n",