[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: \~ in \X for grohtml
From: |
Gaius Mulley |
Subject: |
[Groff] Re: \~ in \X for grohtml |
Date: |
Thu, 11 Apr 2002 17:07:31 +0100 |
Hi Werner,
here are some patches which fix:
> .URL www.xxx.org "This\C'hy'is a test"
>
> causes a fatal bug with -Thtml:
>
> post-grohtml: Failed assertion at line 106, file
> `src/libs/libgroff/nametoindex.cc'.
Also I've removed the redundant \O[0] and also set/initialized the
class variables, emitted_node, ignore_next_eol.
Gaius
--- groff-cvs/src/preproc/html/pre-html.cc Sun Feb 17 17:05:54 2002
+++ groff-html/src/preproc/html/pre-html.cc Thu Apr 11 12:27:27 2002
@@ -512,7 +512,7 @@
writeString("\\O[0]");
else
// reset min/max registers
- writeString("\\O[0]\\O[1]");
+ writeString("\\O[1]");
}
/*
--- groff-cvs/src/devices/grohtml/post-html.cc Fri Mar 29 16:41:34 2002
+++ groff-html/src/devices/grohtml/post-html.cc Thu Apr 11 13:54:01 2002
@@ -982,7 +982,6 @@
// start of escape
i += 2; // move over \(
int a = i;
- string troff_charname;
while ((i+1<str.length()) && (str.substring(i, 2) != string("\\)"))) {
i++;
}
@@ -992,7 +991,8 @@
else
n = -1;
if (n > 0) {
- html_glyph = get_html_translation(s->f, str.substring(a, n-a));
+ string troff_charname = str.substring(a, n-a);
+ html_glyph = get_html_translation(s->f, troff_charname);
if (html_glyph)
html_string += html_glyph;
else {
--- groff-cvs/tmac/www.tmac Fri Mar 1 01:15:37 2002
+++ groff-html/tmac/www.tmac Thu Apr 11 12:09:12 2002
@@ -494,7 +494,7 @@
. el \{\
. ie r ps4html \{\
. www-make-unique-name
-. nop \O[3]\O[5i\\*[www-unique-name].png]\O[0]\O[1]
+. nop \O[3]\O[5i\\*[www-unique-name].png]\O[1]
. nop \\m[\\*[www-dropcolor]]\\s[40]\\$1\\s0
. nop \O[2]\O[1]\O[4]
. \}
@@ -526,7 +526,7 @@
.\"
.de HTML-DO-IMAGE
. if r ps4html \
-. nop \O[3]\O[5\\$2\\$1.png]\O[0]\O[1]
+. nop \O[3]\O[5\\$2\\$1.png]\O[1]
. if \\n[www-html] \
. nop \O[3]\O[5\\$2\\$1.png]\O[0]
..
--- groff-cvs/src/roff/troff/env.cc Fri Mar 22 16:11:18 2002
+++ groff-html/src/roff/troff/env.cc Wed Apr 10 14:04:29 2002
@@ -725,6 +725,7 @@
widow_control(e->widow_control),
#endif /* WIDOW_CONTROL */
ignore_next_eol(0),
+ emitted_node(0),
cur_glyph_color(e->cur_glyph_color),
prev_glyph_color(e->prev_glyph_color),
cur_fill_color(e->cur_fill_color),
@@ -810,6 +811,8 @@
hyphenation_space = e->hyphenation_space;
hyphenation_margin = e->hyphenation_margin;
composite = 0;
+ ignore_next_eol = e->ignore_next_eol;
+ emitted_node = e->emitted_node;
cur_glyph_color= e->cur_glyph_color;
prev_glyph_color = e->prev_glyph_color;
cur_fill_color = e->cur_fill_color;