[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/10: [troff]: Fix code style nit.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/10: [troff]: Fix code style nit. |
Date: |
Wed, 5 Jun 2024 03:52:30 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 7fdf0a9811b13f0bb0c4e9c70e95afbad3d14cc1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jun 5 02:41:19 2024 -0500
[troff]: Fix code style nit.
* src/roff/troff/node.cpp (glyph_node::dump_node, node::dump_node):
Favor `fputs()` over `fprintf()` when the output string doesn't
require formatting.
---
ChangeLog | 6 ++++++
src/roff/troff/node.cpp | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9b22d3f95..7c26b9030 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/node.cpp (glyph_node::dump_node):
+ (node::dump_node): Favor `fputs()` over `fprintf()` when the
+ output string doesn't require formatting.
+
2024-05-16 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/node.cpp (dbreak_node::dump_node): Drop
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 6b3ab1f14..b00f8377e 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -2197,7 +2197,7 @@ void glyph_node::dump_node()
if (state)
state->display_state();
fprintf(stderr, "diversion level: %d", div_nest_level);
- fprintf(stderr, "}");
+ fputs("}", stderr);
fflush(stderr);
}
@@ -2557,11 +2557,11 @@ void node::dump_node()
{
fprintf(stderr, "{type: %s, ", type());
if (push_state)
- fprintf(stderr, "<push_state>, ");
+ fputs("<push_state>, ", stderr);
if (state)
- fprintf(stderr, "<state>, ");
+ fputs("<state>, ", stderr);
fprintf(stderr, "diversion level: %d", div_nest_level);
- fprintf(stderr, "}");
+ fputs("}", stderr);
fflush(stderr);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/10: [troff]: Fix code style nit.,
G. Branden Robinson <=