[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 6/7] localedef: in LC_IDENTIFICATION, some keywords are optional



From: Denis Barbier <bouzim@gmail.com>
Date: Mon, 25 Apr 2005 08:42:34 +0200

In LC_IDENTIFICATION, audience, application and abbreviation keywords
are optional, thus do not report an error if they are not defined.

Originally from belocs-locales-bin 2.3.4-7, 2005-04-25.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 locale/programs/ld-identification.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/locale/programs/ld-identification.c b/locale/programs/ld-identification.c
index ae6a606..29c25c6 100644
--- a/locale/programs/ld-identification.c
+++ b/locale/programs/ld-identification.c
@@ -147,6 +147,9 @@ No definition for %s category found"), "LC_IDENTIFICATION"));
 			       	"LC_IDENTIFICATION", #cat));		      \
       identification->cat = "";						      \
     }
+#define TEST_ELEM_OPT(cat) \
+  if (identification->cat == NULL)					      \
+    identification->cat = "";						      \
 
   TEST_ELEM (title);
   TEST_ELEM (source);
@@ -157,9 +160,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);
 
-- 
1.7.5.1


Reply to: