bug-groff
[Top][All Lists]
Advanced

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

[bug #58162] unicode.tmac re-enables compatibility mode


From: G. Branden Robinson
Subject: [bug #58162] unicode.tmac re-enables compatibility mode
Date: Sat, 11 Apr 2020 23:57:31 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #1, bug #58162 (project groff):

Savannah cruelly truncated my bug submission.  Fortunately, I was able to go
back in my browser history and get it.

What gives, Savannah?

---

John Gardner noticed the following regression test failure (for a different
software project) on groff git HEAD relative to groff 1.22.4 (which does not
have this bug).


*Command:*
printf '.ds FOO BAR\n\\*[FOO]' | groff -C -Tutf8 | head -n1

*Expected output:*
FOO]

*Actual output:*
BAR


He also identified the cause:


>From a glance, it looks like the `.C` register is being set twice: once by the
calling tty.tmac, and again by unicode.tmac.


So the saved register value was being clobbered.

The real problem here, contrary to my initial thoughts on the mailing list
thread, is not the save/restore approach but a namespace problem.  A common
pattern in macro files and in the man pages in the tree is to just save the .C
register in a register named _C.  This fails as soon as nesting happens.

A while back I ground through all the man pages to make them save to
uniquely-named registers, but out of timidity I did not the stuff in the tmac
directory, where it actually would have done more good.  When I added
save/restore to this file in 2019, I cautiously copied examples from the same
directory.  But they were bad examples in this respect!

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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