[bug #68358] [troff] make `pwh` request report existence and location of diversion trap

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.bugs
Message-ID <[email protected]>
Update of bug #68358 (group groff):

                  Status:             In Progress => Fixed
             Open/Closed:                    Open => Closed

    _______________________________________________________

Follow-up Comment #2:


commit d68c68c2602b106736236124d9985ff3cf775ca0
Author: G. Branden Robinson <[email protected]>
Date:   Tue May 19 19:11:18 2026 -0500

    [troff]: `pwh` request reports diversion traps.
    
    * src/roff/troff/div.h (class diversion): Declare new pure virtual
      member function `print_diversion_trap()` returning `void`.
    
      (class macro_diversion)
      (class top_level_diversion): Declare member function
      `print_diversion_trap()`.
    
    * src/roff/troff/div.cpp (macro_diversion::print_diversion_trap): New
      member function reports properties of a diversion trap if one exists.
    
      (top_level_diversion::print_diversion_trap): New member function
      throws assert(3)ion if called.  Internal logic should ensure that such
      a call is impossible.
    
      (print_traps_request): Call the `print_traps()` member function of
      `topdiv` (as before) only if it is the current diversion.  Otherwise,
      the current diversion is a macro diversion, so call its
      `print_diversion_trap()` member function.
    
    * doc/groff.texi.in (Diversion Traps, Debugging):
    * man/groff.7.man (Request short reference):
    * man/groff_diff.7.man (New requests): Document it.
    
    * src/roff/groff/tests/pwh-request-works.sh: Unit-test request.
    
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Fixes <https://savannah.gnu.org/bugs/?68358>.




    _______________________________________________________

Reply to this item at:

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

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

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCahPiJwAKCRCqLAuaBUf3
TgxGAP0SHOTbeLsxUU8LkpB/agGrzPac+zby5uU4NI2i3QOhHwD/eySoVU9Iu5tU
uvVuWYZi0Onj4hOb0okymTjVvExPJQA=
=yvJh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.