thtmlroff: ignore \X... text; allow delims besides quote - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d3e79f5b611ac9f0b9eedbb4cdeaa167ec84b2ba
 (DIR) parent 11257e5a43ac47666dd2ffb4b15fcff8ceb045a9
 (HTM) Author: Russ Cox <rsc@swtch.com>
       Date:   Tue, 11 Nov 2008 10:59:48 -0800
       
       htmlroff: ignore \X... text; allow delims besides quote
       
       Diffstat:
         M src/cmd/htmlroff/t10.c              |      12 +++++++++---
       
       1 file changed, 9 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/htmlroff/t10.c b/src/cmd/htmlroff/t10.c
       t@@ -69,10 +69,16 @@ e_bang(void)
        int
        e_X(void)
        {
       -        int c;
       +        int c, c1;
                
       -        while((c = getrune()) >= 0 && c != '\'' && c != '\n')
       -                outrune(c);
       +        c1 = getrune();
       +        if(c1 < 0 || c1 == '\n') {
       +                c = c1;
       +                c1 = 0;
       +        } else {
       +                while((c = getrune()) >= 0 && c != c1 && c != '\n')
       +                        ;
       +        }
                if(c == '\n'){
                        warn("newline in %CX'...'", backslash);
                        outrune(c);