LC_IDENTIFICATION-optional-fields
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 20 Sep 2019 19:39:03 +0000 (20:39 +0100)
committerAurelien Jarno <aurel32@debian.org>
Fri, 20 Sep 2019 19:39:03 +0000 (20:39 +0100)
In LC_IDENTIFICATION, audience, application and abbreviation keywords
are optional, thus do not report an error if they are not defined.

# DP: Dpatch author: Denis Barbier
# DP: Patch author: Denis Barbier
# DP: Upstream status: not submitted
# DP: Date: 2006-01-08

Gbp-Pq: Topic locale
Gbp-Pq: Name LC_IDENTIFICATION-optional-fields.diff

locale/programs/ld-identification.c

index 7ff11274adff47e1d9d53703f8925173eeefc439..7a60385005cea128662fc3099aabe0759f41b64c 100644 (file)
@@ -145,6 +145,9 @@ No definition for %s category found"), "LC_IDENTIFICATION");
                        #cat);                                                \
       identification->cat = "";                                                      \
     }
+#define TEST_ELEM_OPT(cat)                                                   \
+  if (identification->cat == NULL)                                           \
+    identification->cat = "";                                                \
 
   TEST_ELEM (title);
   TEST_ELEM (source);
@@ -155,9 +158,9 @@ No definition for %s category found"), "LC_IDENTIFICATION");
   TEST_ELEM (fax);
   TEST_ELEM (language);
   TEST_ELEM (territory);
-  TEST_ELEM (audience);
-  TEST_ELEM (application);
-  TEST_ELEM (abbreviation);
+  TEST_ELEM_OPT (audience);
+  TEST_ELEM_OPT (application);
+  TEST_ELEM_OPT (abbreviation);
   TEST_ELEM (revision);
   TEST_ELEM (date);