1 |
vapier 10/08/23 09:16:52 |
2 |
|
3 |
Added: man-db-2.5.7-uncompressed-non-en.patch |
4 |
Log: |
5 |
Add fix from upstream for issues with non-english uncompressed man pages #327347 by Florian. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/man-db/files/man-db-2.5.7-uncompressed-non-en.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: man-db-2.5.7-uncompressed-non-en.patch |
15 |
=================================================================== |
16 |
https://bugs.gentoo.org/327347 |
17 |
|
18 |
fix from upstream for display of uncompressed non-English manpages |
19 |
|
20 |
--- man-db-2.5.7/lib/pipeline.c |
21 |
+++ man-db-2.5.7/lib/pipeline.c |
22 |
@@ -329,6 +329,25 @@ |
23 |
return cmd; |
24 |
} |
25 |
|
26 |
+static void passthrough (void *data ATTRIBUTE_UNUSED) |
27 |
+{ |
28 |
+ for (;;) { |
29 |
+ char buffer[4096]; |
30 |
+ int r = read (STDIN_FILENO, buffer, 4096); |
31 |
+ if (r <= 0) |
32 |
+ break; |
33 |
+ if (fwrite (buffer, 1, (size_t) r, stdout) < (size_t) r) |
34 |
+ break; |
35 |
+ } |
36 |
+ |
37 |
+ return; |
38 |
+} |
39 |
+ |
40 |
+command *command_new_passthrough (void) |
41 |
+{ |
42 |
+ return command_new_function ("cat", &passthrough, NULL, NULL); |
43 |
+} |
44 |
+ |
45 |
command *command_dup (command *cmd) |
46 |
{ |
47 |
command *newcmd = XMALLOC (command); |
48 |
@@ -831,20 +850,6 @@ |
49 |
return p; |
50 |
} |
51 |
|
52 |
-static void passthrough (void *data ATTRIBUTE_UNUSED) |
53 |
-{ |
54 |
- for (;;) { |
55 |
- char buffer[4096]; |
56 |
- int r = read (STDIN_FILENO, buffer, 4096); |
57 |
- if (r <= 0) |
58 |
- break; |
59 |
- if (fwrite (buffer, 1, (size_t) r, stdout) < (size_t) r) |
60 |
- break; |
61 |
- } |
62 |
- |
63 |
- return; |
64 |
-} |
65 |
- |
66 |
void pipeline_connect (pipeline *source, pipeline *sink, ...) |
67 |
{ |
68 |
va_list argv; |
69 |
@@ -876,11 +881,8 @@ |
70 |
* because it has nowhere to send output. Until this is |
71 |
* fixed, this kludge is necessary. |
72 |
*/ |
73 |
- if (arg->ncommands == 0) { |
74 |
- command *cmd = command_new_function |
75 |
- ("cat", &passthrough, NULL, NULL); |
76 |
- pipeline_command (arg, cmd); |
77 |
- } |
78 |
+ if (arg->ncommands == 0) |
79 |
+ pipeline_command (arg, command_new_passthrough ()); |
80 |
} |
81 |
va_end (argv); |
82 |
} |
83 |
--- man-db-2.5.7/lib/pipeline.h |
84 |
+++ man-db-2.5.7/lib/pipeline.h |
85 |
@@ -172,6 +172,9 @@ |
86 |
*/ |
87 |
command *command_new_sequence (const char *name, ...) ATTRIBUTE_SENTINEL; |
88 |
|
89 |
+/* Return a new command that just passes data from its input to its output. */ |
90 |
+command *command_new_passthrough (void); |
91 |
+ |
92 |
/* Return a duplicate of a command. */ |
93 |
command *command_dup (command *cmd); |
94 |
|
95 |
--- man-db-2.5.7/NEWS |
96 |
+++ man-db-2.5.7/NEWS |
97 |
@@ -1,3 +1,15 @@ |
98 |
+man-db 2.5.8 |
99 |
+============ |
100 |
+ |
101 |
+Major changes since man-db 2.5.7: |
102 |
+ |
103 |
+ Fixes: |
104 |
+ ------ |
105 |
+ |
106 |
+ o Fix assertion failure on 'man -l' with an uncompressed page and |
107 |
+ any of --no-hyphenation, --no-justification, or a non-English |
108 |
+ page. |
109 |
+ |
110 |
man-db 2.5.7 (16 February 2010) |
111 |
=============================== |
112 |
|
113 |
--- man-db-2.5.7/src/man.c |
114 |
+++ man-db-2.5.7/src/man.c |
115 |
@@ -2390,9 +2390,16 @@ |
116 |
#endif /* TROFF_IS_GROFF */ |
117 |
|
118 |
if (seq->u.sequence.ncommands) { |
119 |
- assert (decomp->ncommands == 1); |
120 |
- command_sequence_command (seq, decomp->commands[0]); |
121 |
- decomp->commands[0] = seq; |
122 |
+ assert (decomp->ncommands <= 1); |
123 |
+ if (decomp->ncommands) { |
124 |
+ command_sequence_command |
125 |
+ (seq, decomp->commands[0]); |
126 |
+ decomp->commands[0] = seq; |
127 |
+ } else { |
128 |
+ command_sequence_command |
129 |
+ (seq, command_new_passthrough ()); |
130 |
+ pipeline_command (decomp, seq); |
131 |
+ } |
132 |
} else |
133 |
command_free (seq); |
134 |
} |