Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: "G. Branden Robinson" Newsgroups: gnu.groff.bug Subject: [bug #58162] unicode.tmac re-enables compatibility mode Date: Sat, 11 Apr 2020 23:59:54 -0400 (EDT) Lines: 52 Approved: bug-groff@gnu.org Message-ID: References: <20200412-035507.sv108747.38919@savannah.gnu.org> <20200412-035731.sv108747.26283@savannah.gnu.org> <20200412-035954.sv108747.29715@savannah.gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1586663998 20012 209.51.188.17 (12 Apr 2020 03:59:58 GMT) X-Complaints-To: action@cs.stanford.edu To: "G. Branden Robinson" , bug-groff@gnu.org Envelope-to: bug-groff@gnu.org X-PHP-Originating-Script: 1001:sendmail.php X-Savane-Server: savannah.gnu.org:443 [209.51.188.72] X-Savane-Project: groff X-Savane-Tracker: bugs X-Savane-Item-ID: 58162 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 X-Apparently-From: 1.144.105.92 (Savane authenticated user gbranden) In-Reply-To: <20200412-035731.sv108747.26283@savannah.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.72 X-BeenThere: bug-groff@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Bug reports for the GNU version of nroff, troff et al" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200412-035954.sv108747.29715@savannah.gnu.org> X-Mailman-Original-References: <20200412-035507.sv108747.38919@savannah.gnu.org> <20200412-035731.sv108747.26283@savannah.gnu.org> Xref: csiph.com gnu.groff.bug:1804 Follow-up Comment #2, bug #58162 (project groff): I have a voodoo doll of Savannah and I am burning it, slowly. --- 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: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/