gbranden pushed a commit to branch master
in repository groff.

commit 5b7f4d0fe10fa0c97d5cca0e6e5397fa041ad2c0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Sep 8 03:51:34 2024 -0500

    [troff]: Slightly refactor.
    
    * src/roff/troff/node.cpp (class troff_output_file): Declare new `flush`
      member function.
    
      (troff_output_file::flush): New member function calls `flush_tbuf()`
      and calls `real_output_file`'s own `flush` member function.
---
 ChangeLog               | 8 ++++++++
 src/roff/troff/node.cpp | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c40e6b889..81b60fa56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-09-08  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.cpp (class troff_output_file): Declare new
+       `flush` member function.
+       (troff_output_file::flush): New member function calls
+       `flush_tbuf()` and calls `real_output_file`'s own `flush` member
+       function.
+
 2024-09-07  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/reg.cpp (dump_register): Report assigned format
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 2436e543d..1d92f3287 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -818,6 +818,7 @@ class troff_output_file : public real_output_file {
 public:
   troff_output_file();
   ~troff_output_file();
+  void flush();
   void trailer(vunits page_length);
   void put_char(charinfo *, tfont *, color *, color *);
   void put_char_width(charinfo *, tfont *, color *, color *, hunits, hunits);
@@ -1629,6 +1630,12 @@ troff_output_file::troff_output_file()
   put("x init\n");
 }
 
+void troff_output_file::flush()
+{
+  flush_tbuf();
+  real_output_file::flush();
+}
+
 /* output_file */
 
 output_file *the_output = 0;

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to