[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ChangeLog src/devices/grotty/grotty.man s...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ChangeLog src/devices/grotty/grotty.man s... |
Date: |
Sun, 23 May 2010 05:09:02 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 10/05/23 05:09:02
Modified files:
. : ChangeLog
src/devices/grotty: grotty.man tty.cpp
Log message:
Use DESC's `unicode' keyword for grotty.
Consequently, no longer check directly for the `utf8' device name
which prevented the creation of arbitrarily called output device
directories like `devunicode'.
Problem reported by Christopher Yeleighton <address@hidden>
in Savannah bug #29895.
* src/devices/grotty/tty.cpp (tty_printer): Remove `is_utf8' member.
Replace all ocurrences with `font::is_unicode'.
(tty_printer::tty_printer): Remove argument.
* src/devices/grotty/grotty.man: Document `unicode' keyword.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1232&r2=1.1233
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/grotty/grotty.man?cvsroot=groff&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/grotty/tty.cpp?cvsroot=groff&r1=1.21&r2=1.22
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1232
retrieving revision 1.1233
diff -u -b -r1.1232 -r1.1233
--- ChangeLog 19 May 2010 06:22:37 -0000 1.1232
+++ ChangeLog 23 May 2010 05:09:00 -0000 1.1233
@@ -1,3 +1,20 @@
+2010-05-22 Werner LEMBERG <address@hidden>
+
+ Use DESC's `unicode' keyword for grotty.
+
+ Consequently, no longer check directly for the `utf8' device name
+ which prevented the creation of arbitrarily called output device
+ directories like `devunicode'.
+
+ Problem reported by Christopher Yeleighton <address@hidden>
+ in Savannah bug #29895.
+
+ * src/devices/grotty/tty.cpp (tty_printer): Remove `is_utf8' member.
+ Replace all ocurrences with `font::is_unicode'.
+ (tty_printer::tty_printer): Remove argument.
+
+ * src/devices/grotty/grotty.man: Document `unicode' keyword.
+
2010-05-19 Werner LEMBERG <address@hidden>
Update symbol tables for devps font generation.
Index: src/devices/grotty/grotty.man
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grotty/grotty.man,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- src/devices/grotty/grotty.man 5 Jan 2009 20:10:58 -0000 1.23
+++ src/devices/grotty/grotty.man 23 May 2010 05:09:02 -0000 1.24
@@ -1,5 +1,5 @@
.ig
-Copyright (C) 1989-2000, 2001, 2002, 2003, 2005, 2006, 2009
+Copyright (C) 1989-2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010
Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
@@ -200,6 +200,19 @@
escape sequence in
.BR troff .
.
+.LP
+If the
+.B DESC
+file contains the keyword
+.BR unicode ,
+.B grotty
+emits Unicode characters in UTF-8 encoding.
+Otherwise, it emits characters in a single-byte encoding depending
+on the data in the font description files.
+See the
+.BR groff_font (@MAN5EXT@)
+man page for more details.
+.
.
.SH OPTIONS
.
Index: src/devices/grotty/tty.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grotty/tty.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/devices/grotty/tty.cpp 5 Jan 2009 20:10:58 -0000 1.21
+++ src/devices/grotty/tty.cpp 23 May 2010 05:09:02 -0000 1.22
@@ -1,5 +1,6 @@
// -*- C++ -*-
-/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+ 2010
Free Software Foundation, Inc.
Written by James Clark (address@hidden)
@@ -196,7 +197,6 @@
}
class tty_printer : public printer {
- int is_utf8;
tty_glyph **lines;
int nlines;
int cached_v;
@@ -219,7 +219,7 @@
void draw_line(int *, int, const environment *);
void draw_polygon(int *, int, const environment *);
public:
- tty_printer(const char *);
+ tty_printer();
~tty_printer();
void set_char(glyph *, font *, const environment *, int, const char *);
void draw(int, int *, int, const environment *);
@@ -273,10 +273,9 @@
return unknown_color;
}
-tty_printer::tty_printer(const char *dev) : cached_v(0)
+tty_printer::tty_printer() : cached_v(0)
{
- is_utf8 = !strcmp(dev, "utf8");
- if (is_utf8) {
+ if (font::is_unicode) {
hline_char = 0x2500;
vline_char = 0x2502;
}
@@ -603,7 +602,7 @@
void tty_printer::put_char(output_character wc)
{
- if (is_utf8 && wc >= 0x80) {
+ if (font::is_unicode && wc >= 0x80) {
char buf[6 + 1];
int count;
char *p = buf;
@@ -719,7 +718,7 @@
if (nextp && p->hpos == nextp->hpos) {
if (p->draw_mode() == HDRAW_MODE &&
nextp->draw_mode() == VDRAW_MODE) {
- if (is_utf8)
+ if (font::is_unicode)
nextp->code =
crossings[((p->mode & (START_LINE|END_LINE)) >> 4)
+ ((nextp->mode & (START_LINE|END_LINE)) >> 6)];
@@ -844,7 +843,7 @@
printer *make_printer()
{
- return new tty_printer(device);
+ return new tty_printer();
}
static void update_options()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ChangeLog src/devices/grotty/grotty.man s...,
Werner LEMBERG <=