gbranden pushed a commit to branch master
in repository groff.
commit 275b7d297789cf74f4647c212b5191cf9ce9d996
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 22 00:39:21 2026 -0600
src/devices/grotty/tty.cpp: Update indentation.
...omitted from previous commit. Refill comment.
---
src/devices/grotty/tty.cpp | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index 55c80c7c3..a7e337261 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -420,29 +420,29 @@ void tty_printer::add_char(output_character c, int w,
if ((v % font::vert) != 0)
fatal("vertical position not a multiple of vertical motion"
" quantum");
- if (vpos > nlines) {
- tty_glyph **old_lines = lines;
- // If we exceed the previous page length, double the size so that
- // we don't thrash the allocator. See Savannah #68145.
- int new_nlines = nlines;
- while (vpos > new_nlines)
- new_nlines *= 2;
- if (new_nlines < 0)
- fatal("vertical motion to line %1 is too large", vpos);
- lines = 0 /* nullptr */;
- try {
- lines = new tty_glyph *[new_nlines];
- }
- catch (const std::bad_alloc &e) {
- fatal("cannot allocate %1 bytes to render %2 lines"
- " of terminal output", (new_nlines * sizeof(tty_glyph)),
- new_nlines);
- }
- memset(lines, 0, new_nlines * sizeof(tty_glyph *));
- memcpy(lines, old_lines, nlines * sizeof(tty_glyph *));
- delete[] old_lines;
- nlines = new_nlines;
+ if (vpos > nlines) {
+ tty_glyph **old_lines = lines;
+ // If we exceed the previous page length, double the size so that we
+ // don't thrash the allocator. See Savannah #68145.
+ int new_nlines = nlines;
+ while (vpos > new_nlines)
+ new_nlines *= 2;
+ if (new_nlines < 0)
+ fatal("vertical motion to line %1 is too large", vpos);
+ lines = 0 /* nullptr */;
+ try {
+ lines = new tty_glyph *[new_nlines];
+ }
+ catch (const std::bad_alloc &e) {
+ fatal("cannot allocate %1 bytes to render %2 lines"
+ " of terminal output", (new_nlines * sizeof(tty_glyph)),
+ new_nlines);
}
+ memset(lines, 0, new_nlines * sizeof(tty_glyph *));
+ memcpy(lines, old_lines, nlines * sizeof(tty_glyph *));
+ delete[] old_lines;
+ nlines = new_nlines;
+ }
tty_glyph *g = 0 /* nullptr */;
try {
g = new tty_glyph;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit