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
|
Description: Fix for makeinfo reading from - (stdin).
Origin: Gavin Smith <gavinsmith0123@gmail.com>
Forwarded: No. Comes from upstream.
Author: Gavin Smith <gavinsmith0123@gmail.com>
Last-Update: 20210706
---
tp/Texinfo/XS/parsetexi/input.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/tp/Texinfo/XS/parsetexi/input.c
+++ b/tp/Texinfo/XS/parsetexi/input.c
@@ -560,11 +560,16 @@ locate_include_file (char *filename)
int
input_push_file (char *filename)
{
- FILE *stream;
+ FILE *stream = 0;
- stream = fopen (filename, "r");
- if (!stream)
- return errno;
+ if (!strcmp (filename, "-"))
+ stream = stdin;
+ else
+ {
+ stream = fopen (filename, "r");
+ if (!stream)
+ return errno;
+ }
if (input_number == input_space)
{
|