[bug #68511] [troff] `hcode` doesn't work on ordinary characters since commit 994fcce775, 2026-05-24

"G. Branden Robinson" <[email protected]> Sat, 11 Jul 2026 20:35:52 -0400 (EDT)
Newsgroups gmane.comp.printing.groff.bugs
Message-ID <[email protected]>
Update of bug #68511 (group groff):

                  Status:               Need Info => In Progress
             Assigned to:                    barx => gbranden

    _______________________________________________________

Follow-up Comment #11:

My question in comment #9 can be tackled in a separate ticket.

I have a regression test and a fix.


commit 9b4682570eb2d02193aed163bcff4011069e3967 (HEAD)
Author: G. Branden Robinson <[email protected]>
Date:   Sat Jul 11 19:26:56 2026 -0500

    [troff]: Fix Savannah #68511.
    
    ...recovering from a botched refactor.
    
    * src/roff/troff/input.cpp (read_any_character): New function reads any
      groff character--ordinary, special, or indexed, from the input stream,
      skipping any spaces.  While a fairly simple task, it can be done
      incorrectly nevertheless.  Multiple request handlers can use this.
      Start...
    
      (set_hyphenation_codes): ...here.  Rearrange "do/while" loop to
      "while" loop.  Advance the input stream after reading the destination
      character in a pair.  Failing to do so was the defect.  Simplify an
      error diagnostic message.  Simplify a conditional code path.
    
    Fixes <https://savannah.gnu.org/bugs/?68511>.  Problem introduced by me
    in commit 994fcce775, 24 May.  Thanks to Dave Kemper for the report.

commit 758d6ce469d09376a1f6dd49fab384e1e86fa801
Author: G. Branden Robinson <[email protected]>
Date:   Sat Jul 11 19:24:50 2026 -0500

    [groff]: Add unit test for `hcode` request.
    
    * src/roff/groff/tests/hcode-request-works.sh: Do it.
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Test fails at this commit.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCalLhaAAKCRCqLAuaBUf3
TpC2AP0cIYNvtW3es9N1sPrSdrAub6uAl0jXKsUzL4R3S6BW1QD8Cxse6Ep4I8w6
/mPXdoT8DL0GNDpbj1slKnSvo2cbiww=
=g1Dm
-----END PGP SIGNATURE-----