chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / debian / patches / locale / LC_IDENTIFICATION-optional-fields.diff
1 In LC_IDENTIFICATION, audience, application and abbreviation keywords
2 are optional, thus do not report an error if they are not defined.
3
4 # DP: Dpatch author: Denis Barbier
5 # DP: Patch author: Denis Barbier
6 # DP: Upstream status: not submitted
7 # DP: Date: 2006-01-08
8
9 ---
10  locale/programs/ld-identification.c |    9 ++++++---
11  1 file changed, 6 insertions(+), 3 deletions(-)
12
13 --- a/locale/programs/ld-identification.c
14 +++ b/locale/programs/ld-identification.c
15 @@ -147,6 +147,9 @@
16                                 "LC_IDENTIFICATION", #cat));                  \
17        identification->cat = "";                                                      \
18      }
19 +#define TEST_ELEM_OPT(cat) \
20 +  if (identification->cat == NULL)                                           \
21 +    identification->cat = "";                                                \
22  
23    TEST_ELEM (title);
24    TEST_ELEM (source);
25 @@ -157,9 +160,9 @@
26    TEST_ELEM (fax);
27    TEST_ELEM (language);
28    TEST_ELEM (territory);
29 -  TEST_ELEM (audience);
30 -  TEST_ELEM (application);
31 -  TEST_ELEM (abbreviation);
32 +  TEST_ELEM_OPT (audience);
33 +  TEST_ELEM_OPT (application);
34 +  TEST_ELEM_OPT (abbreviation);
35    TEST_ELEM (revision);
36    TEST_ELEM (date);
37