[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Fix texi2any reading from stdin
From: |
Gavin D. Smith |
Subject: |
branch master updated: Fix texi2any reading from stdin |
Date: |
Tue, 06 Jul 2021 10:07:36 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new c0666e5 Fix texi2any reading from stdin
c0666e5 is described below
commit c0666e580ade55e4806bafef03dc80d97d0c95d4
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Jul 6 15:06:53 2021 +0100
Fix texi2any reading from stdin
* tp/Texinfo/XS/parsetexi/input.c (input_push_file): If input file
name is "-", read from stdin instead. Broken reading from standard
input reported by Ken Brown and John Turney.
---
ChangeLog | 8 ++++++++
tp/Texinfo/XS/parsetexi/input.c | 13 +++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 70f0d93..1bdd5ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2021-07-06 Gavin Smith <gavinsmith0123@gmail.com>
+ Fix texi2any reading from stdin
+
+ * tp/Texinfo/XS/parsetexi/input.c (input_push_file): If input file
+ name is "-", read from stdin instead. Broken reading from standard
+ input reported by Ken Brown and John Turney.
+
+2021-07-06 Gavin Smith <gavinsmith0123@gmail.com>
+
Avoid repeated "locale -a" calls.
* tp/Texinfo/Report.pm (gdt): Only try to call "locale -a" once
diff --git a/tp/Texinfo/XS/parsetexi/input.c b/tp/Texinfo/XS/parsetexi/input.c
index f97edbf..307c907 100644
--- 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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Fix texi2any reading from stdin,
Gavin D. Smith <=