[Top][All Lists]

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

[groff] \n[.Y] in release candidates

From: Colin Watson
Subject: [groff] \n[.Y] in release candidates
Date: Sat, 31 Mar 2018 17:23:15 +0100
User-agent: NeoMutt/20170113 (1.7.2)

In groff 1.22.4.rc2:

  $ echo '\n[.Y]' | nroff | grep .

I can see why this happens, of course; but it seems odd for a number
register to contain non-numeric data.  Would it be better to change this
to chop off the dot and everything after it?

Failing that, can anyone suggest an improved version of this code
emitted by man-db that doesn't trip over this ("(4.rc2 >= 2)" in a
conditional doesn't work and ends up emitting noise to the output)?  I
know that testing versions rather than features isn't great, but I
couldn't find a better method in this case.  The purpose of this code is
to load per-locale macros while disabling warnings of the 'file'
category, in order that we don't need to first test whether the relevant
macro file exists, and to only do this with groff >= 1.20.2 because
otherwise we can't disable the resulting warning.  The appropriate
language code is of course substituted for %s.

  .if (\n[.g] & ((\n[.x] > 1) : ((\n[.x] == 1) & (\n[.y] > 20)) : ((\n[.x] == 
1) & (\n[.y] == 20) & (\n[.Y] >= 2)))) \{\
  .  warn (\n[.warn] - (\n[.warn] / 1048576 % 2 * 1048576))
  .  mso %s.tmac


Colin Watson                                       address@hidden

reply via email to

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