LC_IDENTIFICATION-optional-fields
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Wed, 19 Apr 2023 21:17:51 +0000 (22:17 +0100)
committerAurelien Jarno <aurel32@debian.org>
Wed, 19 Apr 2023 21:17:51 +0000 (22:17 +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 c620e9bc6d7f9d4e3979401e849469854d6a45b7..42c48623029295b1fbb231ce674dcd91dd0b04f0 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);