bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #66040] [troff] no longer warns about unrecognized .hcode input


From: G. Branden Robinson
Subject: [bug #66040] [troff] no longer warns about unrecognized .hcode input
Date: Sun, 4 Aug 2024 17:06:57 -0400 (EDT)

Follow-up Comment #17, bug #66040 (group groff):

Pushed.


commit f4435e1ab290870ee7951132a66bb148b5d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Aug 1 16:45:35 2024 -0500

    [troff]: Validate `hcode` request arguments more.
    
    * src/roff/troff/input.cpp (set_hyphenation_code): Do more input
      validation of `hcode` request arguments.  Handle case where an
      argument is an escape sequence (but not a special character) ourselves
      instead of delegating it to `token::get_char()`.  Throw errors (and
      stop processing arguments) when (1) the destination character is a
      numeral; (2) the destination character is a (non-special-character)
      escape sequence; (3) the source character is a numeral; or (4) the
      source character is a (non-special-character) escape sequence.
    
    * doc/groff.texi.in (Manipulating Hyphenation) <hcode>:
    * man/groff_diff.7.man (New requests) <hcode>: Document that the request
      aborts processing its arguments upon encountering an invalid one.
    
    Continues <https://savannah.gnu.org/bugs/?66040>.  Thanks to Dave Kemper
    for further discussion.
    
    $ nl hcode.groff
         1  .hcode
         2  .hcode \:
         3  .hcode a
         4  .hcode 0 b
         5  .hcode c\:
         6  .hcode \['A] \['a]
         7  .hcode d 0
         8  .hcode eE
         9  .hcode f F
        10  .hcode g G\" This is my comment.
        11  .hcode \['i] i
        12  .hcode \['o] \['o]
        13  .hcode \['u] u
        14  .hcode \['U] \['u]
    $ ./build/test-groff -T utf8 -ww hcode.groff
    troff:hcode.groff:1: warning: hyphenation code configuration request
expects arguments
    troff:hcode.groff:2: error: expected ordinary or special character, got an
escaped ':'
    troff:hcode.groff:3: error: hyphenation codes must be specified in pairs
    troff:hcode.groff:4: error: cannot apply a hyphenation code to a numeral
    troff:hcode.groff:5: error: expected ordinary or special character, got an
escaped ':'
    troff:hcode.groff:6: error: second member of hyphenation code pair must be
an ordinary character
    troff:hcode.groff:7: error: cannot use the hyphenation code of a numeral
    troff:hcode.groff:12: error: second member of hyphenation code pair must
be an ordinary character
    troff:hcode.groff:14: error: second member of hyphenation code pair must
be an ordinary character




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66040>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]