gbranden pushed a commit to branch master
in repository groff.
commit 46ac13702611ebe128485e049c4d5e4744d41ee3
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jul 13 02:31:38 2024 -0500
[soelim]: Stop rewriting file name "-" as "stdin".
* src/preproc/soelim/soelim.cpp (do_file): Stop "normalizing" an input
file name of "-" to "stdin". The other preprocessors don't do that.
---
ChangeLog | 6 ++++++
src/preproc/soelim/soelim.cpp | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 9e52a2d83..12b3bb0a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-13 G. Branden Robinson <[email protected]>
+
+ * src/preproc/soelim/soelim.cpp (do_file): Stop "normalizing"
+ an input file name of "-" to "stdin". The other preprocessors
+ don't do that.
+
2024-07-13 G. Branden Robinson <[email protected]>
* src/roff/nroff/nroff.sh: Tweak shell pattern for clarity.
diff --git a/src/preproc/soelim/soelim.cpp b/src/preproc/soelim/soelim.cpp
index 685a883e4..415d19f40 100644
--- a/src/preproc/soelim/soelim.cpp
+++ b/src/preproc/soelim/soelim.cpp
@@ -162,7 +162,9 @@ int do_file(const char *filename)
FILE *fp = include_search_path.open_file_cautious(filename,
&file_name_in_path);
int err = errno;
- string whole_filename(file_name_in_path ? file_name_in_path : filename);
+ string whole_filename(filename);
+ if (strcmp(filename, "-") && file_name_in_path != 0 /* nullptr */)
+ whole_filename = file_name_in_path;
whole_filename += '\0';
free(file_name_in_path);
if (fp == 0) {
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit