gbranden pushed a commit to branch master
in repository groff.
commit a00de2bef4907926d9ec53148e798a29341eee4c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 12 05:58:04 2024 -0500
src/roff/troff/input.cpp: Slightly refactor.
* src/roff/troff/input.cpp: Move responsibility for skipping the rest of
the input line...
(open_file): ...from this internal helper function...
(open_request, opena_request): ...to these handler functions, for
better symmetry with other request handlers.
---
ChangeLog | 8 ++++++++
src/roff/troff/input.cpp | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 4123ab601..058574a63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-09-12 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp: Slightly refactor. Move
+ responsibility for skipping the rest of the input line...
+ (open_file): ...from this internal helper function...
+ (open_request, opena_request): ...to these handler functions,
+ for better symmetry with other request handlers.
+
2024-09-12 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (do_open): The `write` request, an
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 06caafedb..7b4f9e53f 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -7236,7 +7236,6 @@ static void open_file(bool appending)
strerror(errno));
}
}
- skip_line();
}
static void open_request() // .open
@@ -7252,6 +7251,7 @@ static void open_request() // .open
}
else
open_file(false /* appending */);
+ skip_line();
}
static void opena_request() // .opena
@@ -7267,6 +7267,7 @@ static void opena_request() // .opena
}
else
open_file(true /* appending */);
+ skip_line();
}
static void close_request() // .close
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit