summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwl <wl>2011-01-20 07:13:57 +0000
committerwl <wl>2011-01-20 07:13:57 +0000
commit88cb540f524f0df1dea0c34c7740c11eab29856c (patch)
tree219546c7cfa9a259c4d63f53375b40ef69ef4caa
parenta1b0b463c3bde03f88919bef86e66bd284ead757 (diff)
downloadgroff-88cb540f524f0df1dea0c34c7740c11eab29856c.tar.gz
Fix handling of wide characters in no-SGR mode.
* src/devices/grotty/tty.cpp (tty_printer::make_underline): Only emit a single backspace in no-SGR mode. less (at least) backspaces over a character at a time. (tty_printer::make_bold): Likewise.
-rw-r--r--ChangeLog24
-rw-r--r--src/devices/grotty/tty.cpp15
2 files changed, 28 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 30d3ce09..8db4b5ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-20 Colin Watson <cjwatson@debian.org>
+
+ Fix handling of wide characters in no-SGR mode.
+
+ * src/devices/grotty/tty.cpp (tty_printer::make_underline): Only
+ emit a single backspace in no-SGR mode. less (at least) backspaces
+ over a character at a time.
+ (tty_printer::make_bold): Likewise.
+
2011-01-19 Werner LEMBERG <wl@gnu.org>
* src/preproc/pic/pic.man: Add pic manual to `SEE ALSO' section.
@@ -22,7 +31,8 @@
Version 1.21 released
=====================
- * NEWS, REVISION, VERSION, doc/groff.texinfo, doc/webpage.ms: Updated.
+ * NEWS, REVISION, VERSION, doc/groff.texinfo, doc/webpage.ms:
+ Updated.
* aclocal.m4, configure: Regenerated.
2010-12-31 Werner LEMBERG <wl@gnu.org>
@@ -791,3 +801,15 @@ Version 1.21 released
* src/devices/grops/ps.cpp (ps_printer::special): Check color state
before doing a PS special and flush buffer.
Update called functions.
+
+Copyright 2009-2011
+ Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+version-control: never
+coding: latin-1
+End:
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index 87654107..e25f934d 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,
- 2010
+/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009-2011
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -311,11 +311,8 @@ void tty_printer::make_underline(int w)
if (!w)
warning("can't underline zero-width character");
else {
- int n = w / font::hor;
- for (int i = 0; i < n; i++)
- putchar('_');
- for (int j = 0; j < n; j++)
- putchar('\b');
+ putchar('_');
+ putchar('\b');
}
}
else {
@@ -337,10 +334,8 @@ 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);
- for (int i = 0; i < n; i++)
- putchar('\b');
+ putchar('\b');
}
}
else {