File: LC_IDENTIFICATION-optional-fields.diff

package info (click to toggle)
glibc 2.36-9%2Bdeb12u13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 300,148 kB
  • sloc: ansic: 1,055,755; asm: 324,942; makefile: 15,198; python: 12,603; sh: 10,884; cpp: 5,685; awk: 1,883; perl: 518; yacc: 292; pascal: 182; sed: 39
file content (37 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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

---
 locale/programs/ld-identification.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/locale/programs/ld-identification.c
+++ b/locale/programs/ld-identification.c
@@ -145,6 +145,9 @@
 			#cat);						      \
       identification->cat = "";						      \
     }
+#define TEST_ELEM_OPT(cat)						      \
+  if (identification->cat == NULL)					      \
+    identification->cat = "";						      \
 
   TEST_ELEM (title);
   TEST_ELEM (source);
@@ -155,9 +158,9 @@
   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);