[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: \X and grohtml
From: |
Gaius Mulley |
Subject: |
[Groff] Re: \X and grohtml |
Date: |
27 Mar 2006 08:14:04 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Werner LEMBERG <address@hidden> writes:
> > Yes I see no reason why \[foo] cannot be used - it was originally
> > there to pass glyph names inside "specials" to post-grohtml to allow
> > for URLs to include glyphs rather than just single ascii characters.
> > I can implement this if you wish..
>
> Please do so! Then I can easily add the .device request.
Hi Werner,
This appears to work with my eyeballed set of tests. I wonder if this
is what you had in mind?
regards,
Gaius
Index: src/devices/grohtml/post-html.cpp
===================================================================
RCS file: /sources/groff/groff/src/devices/grohtml/post-html.cpp,v
retrieving revision 1.35
diff -r1.35 post-html.cpp
1382c1382
< * \(char\). A sequence of \\ represents \.
---
> * \[char]. A sequence of \\ represents \.
1384c1384
< * "cost = \(Po\)3.00 file = \\foo\\bar"
---
> * "cost = \[Po]3.00 file = \\foo\\bar"
1402c1402
< if ((i+1<str.length()) && (str.substring(i, 2) == string("\\("))) {
---
> if ((i+1<str.length()) && (str.substring(i, 2) == string("\\["))) {
1404c1404
< i += 2; // move over \(
---
> i += 2; // move over \[
1406c1406
< while ((i+1<str.length()) && (str.substring(i, 2) != string("\\)"))) {
---
> while ((i<str.length()) && (str.substring(i, 1) != string("]"))) {
1410c1410
< if ((i+1<str.length()) && (str.substring(i, 2) == string("\\)")))
---
> if ((i<str.length()) && (str.substring(i, 1) == string("]")))
Index: src/roff/troff/input.cpp
===================================================================
RCS file: /sources/groff/groff/src/roff/troff/input.cpp,v
retrieving revision 1.33
diff -r1.33 input.cpp
5188c5188
< mac->append('(');
---
> mac->append('[');
5194,5195c5194
< mac->append('\\');
< mac->append(')');
---
> mac->append(']');