summaryrefslogtreecommitdiff
path: root/src/devices/grotty/tty.cpp
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-02-20 17:27:43 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-02-20 17:30:17 +0000
commit766d6b1afab82d786741434fcc80431c3db7690e (patch)
tree28795c1bf6038fb4bab07e3ac1e4270c4a78c150 /src/devices/grotty/tty.cpp
parent4281275ada31523b07d0c19f70cff2871774603c (diff)
downloadgroff-766d6b1afab82d786741434fcc80431c3db7690e.tar.gz
Revert back to groff-1_21
Diffstat (limited to 'src/devices/grotty/tty.cpp')
-rw-r--r--src/devices/grotty/tty.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index e25f934d..87654107 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -1,6 +1,6 @@
// -*- C++ -*-
-/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009-2011
+/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+ 2010
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -311,8 +311,11 @@ void tty_printer::make_underline(int w)
if (!w)
warning("can't underline zero-width character");
else {
- putchar('_');
- putchar('\b');
+ int n = w / font::hor;
+ for (int i = 0; i < n; i++)
+ putchar('_');
+ for (int j = 0; j < n; j++)
+ putchar('\b');
}
}
else {
@@ -334,8 +337,10 @@ void tty_printer::make_bold(output_character c, int w)
if (!w)
warning("can't print zero-width character in bold");
else {
+ int n = w / font::hor;
put_char(c);
- putchar('\b');
+ for (int i = 0; i < n; i++)
+ putchar('\b');
}
}
else {