2019-09-11 10:15:31 +02:00
|
|
|
Index: texinfo-6.6/install-info/Makefile.in
|
2015-02-16 15:02:04 +01:00
|
|
|
===================================================================
|
2019-09-11 10:15:31 +02:00
|
|
|
---
|
|
|
|
texinfo-6.6/install-info/Makefile.in | 2 -
|
2019-10-07 13:37:58 +02:00
|
|
|
texinfo-6.6/install-info/install-info.c | 54 ++++++++++++++++++++++++--------
|
|
|
|
2 files changed, 42 insertions(+), 14 deletions(-)
|
2019-09-11 10:15:31 +02:00
|
|
|
|
|
|
|
--- texinfo-6.6/install-info/Makefile.in
|
2019-10-07 13:37:58 +02:00
|
|
|
+++ texinfo-6.6/install-info/Makefile.in 2019-09-27 08:03:19.381937177 +0000
|
2019-09-11 10:15:31 +02:00
|
|
|
@@ -218,7 +218,7 @@ am__installdirs = "$(DESTDIR)$(bindir)"
|
2015-02-16 15:02:04 +01:00
|
|
|
PROGRAMS = $(bin_PROGRAMS)
|
|
|
|
am_ginstall_info_OBJECTS = install-info.$(OBJEXT)
|
|
|
|
ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS)
|
|
|
|
-ginstall_info_LDADD = $(LDADD)
|
|
|
|
+ginstall_info_LDADD = $(LDADD) -lzio
|
|
|
|
am__DEPENDENCIES_1 =
|
|
|
|
ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \
|
2019-09-11 10:15:31 +02:00
|
|
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
|
|
|
--- texinfo-6.6/install-info/install-info.c
|
2019-10-07 13:37:58 +02:00
|
|
|
+++ texinfo-6.6/install-info/install-info.c 2019-09-27 08:52:36.071070583 +0000
|
2019-09-11 10:15:31 +02:00
|
|
|
@@ -19,6 +19,7 @@
|
2015-02-16 15:02:04 +01:00
|
|
|
#include <getopt.h>
|
|
|
|
#include <regex.h>
|
|
|
|
#include <argz.h>
|
|
|
|
+#include <zio.h>
|
|
|
|
|
|
|
|
#define TAB_WIDTH 8
|
|
|
|
|
2019-10-07 13:37:58 +02:00
|
|
|
@@ -858,20 +859,33 @@ determine_file_type:
|
|
|
|
return 0;
|
2015-02-16 15:02:04 +01:00
|
|
|
|
2019-10-07 13:37:58 +02:00
|
|
|
if (*compression_program)
|
|
|
|
- { /* It's compressed, so open a pipe. */
|
|
|
|
- char *command = concat (*compression_program, " -d", "");
|
|
|
|
-
|
2015-02-16 15:02:04 +01:00
|
|
|
+ {
|
2019-10-07 13:37:58 +02:00
|
|
|
if (fclose (f) < 0)
|
|
|
|
return 0;
|
|
|
|
- f = freopen (*opened_filename, FOPEN_RBIN, stdin);
|
|
|
|
- if (!f)
|
|
|
|
- return 0;
|
|
|
|
- f = popen (command, "r");
|
|
|
|
+ if (**compression_program == 'g' || **compression_program == 'z')
|
|
|
|
+ f = fzopen (*opened_filename, "rg");
|
|
|
|
+ if (**compression_program == 'b')
|
|
|
|
+ f = fzopen (*opened_filename, "rb");
|
|
|
|
+ if (**compression_program == 'Z')
|
|
|
|
+ f = fzopen (*opened_filename, "rZ");
|
|
|
|
+ if (**compression_program == 'l')
|
|
|
|
+ f = fzopen (*opened_filename, "rl");
|
|
|
|
+ if (**compression_program == 'x')
|
|
|
|
+ f = fzopen (*opened_filename, "rx");
|
|
|
|
if (!f)
|
|
|
|
- {
|
|
|
|
- /* Used for error message in calling code. */
|
|
|
|
- *opened_filename = command;
|
|
|
|
- return 0;
|
|
|
|
+ { /* It's compressed, so open a pipe. */
|
|
|
|
+ char *command = concat (*compression_program, " -d", "");
|
|
|
|
+
|
|
|
|
+ f = freopen (*opened_filename, FOPEN_RBIN, stdin);
|
|
|
|
+ if (!f)
|
|
|
|
+ return 0;
|
|
|
|
+ f = popen (command, "r");
|
|
|
|
+ if (!f)
|
|
|
|
+ {
|
|
|
|
+ /* Used for error message in calling code. */
|
|
|
|
+ *opened_filename = command;
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
}
|
2015-02-16 15:02:04 +01:00
|
|
|
}
|
2019-10-07 13:37:58 +02:00
|
|
|
else
|
|
|
|
@@ -958,8 +972,22 @@ output_dirfile (char *dirfile, int dir_n
|
2015-08-21 07:34:14 +02:00
|
|
|
|
|
|
|
if (compression_program)
|
|
|
|
{
|
|
|
|
- char *command = concat (compression_program, ">", dirfile);
|
|
|
|
- output = popen (command, "w");
|
|
|
|
+ output = NULL;
|
|
|
|
+ if (*compression_program == 'g' || *compression_program == 'z')
|
|
|
|
+ output = fzopen (dirfile, "wg");
|
|
|
|
+ if (*compression_program == 'b')
|
|
|
|
+ output = fzopen (dirfile, "wb");
|
|
|
|
+ if (*compression_program == 'Z')
|
|
|
|
+ output = fzopen (dirfile, "wZ");
|
|
|
|
+ if (*compression_program == 'l')
|
|
|
|
+ output = fzopen (dirfile, "wl");
|
|
|
|
+ if (*compression_program == 'x')
|
|
|
|
+ output = fzopen (dirfile, "wx");
|
|
|
|
+ if (!output)
|
|
|
|
+ {
|
|
|
|
+ char *command = concat (compression_program, ">", dirfile);
|
|
|
|
+ output = popen (command, "w");
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
else
|
|
|
|
output = fopen (dirfile, "w");
|