Bug#871225: Man.pm: False point size changes

2022-11-26 Thread Russ Allbery
Bjarni Ingi Gislason  writes:

> "man gcc" with

> MAN_KEEP_STDERR=yes
> MANOPT=--encoding=latin1 --no-hyphenation --warnings=w --no-justification
> MANWIDTH=80

>* What was the outcome of this action?

> :3310: warning: \s escape results in non-positive point size; 
> set to 1
> :3311: warning: \s escape results in non-positive point size; 
> set to 1
> :25: backtrace: string `C+'
[...]

The code that caused these bugs was from minor formatting adjustments
visible only in troff output (and, at least in my opinion, somewhat
dubious).  That code has also been a constant source of bugs and weird
issues for years.

In podlators 5.00, released yesterday, I dropped nearly all of the
troff-only guesswork on the grounds that the minor improvements in
formatting for an output format almost no one uses weren't worth the
maintenance burden.  (I suspect that anyone who wants to print Perl
documentation these days would be better-served by using the rendered
output of one of the excellent POD to HTML converters.)

This bug can therefore be closed once podlators 5.00 is incorporated into
the Perl packages in Debian.  That may still be a bit, since I'm not sure
if it will be pulled into a point release or only the next major release
of Perl.

-- 
Russ Allbery (r...@debian.org)  



Bug#871225: Man.pm: False point size changes

2017-08-06 Thread Bjarni Ingi Gislason
Package: perl-modules-5.26
Version: 5.26.0-5
Severity: minor
Tags: patch

Dear Maintainer,

   * What led up to the situation?

"man gcc" with

MAN_KEEP_STDERR=yes
MANOPT=--encoding=latin1 --no-hyphenation --warnings=w --no-justification
MANWIDTH=80

   * What was the outcome of this action?

:3310: warning: \s escape results in non-positive point size; 
set to 1
:3311: warning: \s escape results in non-positive point size; 
set to 1
:25: backtrace: string `C+'
:3311: warning: \s escape results in non-positive point size; 
set to 1
:3320: warning: \s escape results in non-positive point size; 
set to 1
:3323: warning: \s escape results in non-positive point size; 
set to 1
:3326: warning: \s escape results in non-positive point size; 
set to 1
:3331: warning: \s escape results in non-positive point size; 
set to 1
:: warning: \s escape results in non-positive point size; 
set to 1
:: warning: \s escape results in non-positive point size; 
set to 1
:3336: warning: \s escape results in non-positive point size; 
set to 1
:3337: warning: \s escape results in non-positive point size; 
set to 1
:4668: warning: \s escape results in non-positive point size; 
set to 1
:25: backtrace: string `C+'
:4668: warning: \s escape results in non-positive point size; 
set to 1
:4670: backtrace
/home/bg/git/groff/tmac/an-old.tmac:493: backtrace: macro `IP'
:4670: warning: \s escape results in non-positive point size; 
set to 1
:4670: backtrace
/home/bg/git/groff/tmac/an-old.tmac:493: backtrace: macro `IP'
:4670: warning: \s escape results in non-positive point size; 
set to 1
:9001: warning [p 93, 4.5i]: can't break line
:9023: warning [p 93, 8.2i]: can't break line
:9234: warning [p 95, 7.3i]: can't break line

   * What outcome did you expect instead?

  No warnings

  The escape '\s0' does not get the right former size if another '\s0' comes
after it (like '\s-1...\s-2...\s0...\s0').

  The string '\*(C+' gets resized in the manual for "gcc" in some lines.
  Each use of this string gets the previous size smaller, the warning is not
issued until the size is down to less than 1 point.

Patch:

--- Man.pm  2017-07-30 16:15:47.0 +
+++ Man.pm.new  2017-08-07 00:03:59.0 +
@@ -527,7 +527,7 @@ sub guesswork {
 ( [A-Z] [A-Z] (?: \s? [/A-Z+:\d_\$&] | \\- | \s? [.,\"] )* )  # (2)
 (?= [\s>\}\]\(\)\'\".?!,;] | \\*\(-- | \\[ ] | $ )# (3)
 } {
-$1 . '\s-1' . $2 . '\s0'
+$1 . '\s-1' . $2 . '\s+1'
 }egx;
 }
 
@@ -1521,7 +1521,7 @@ sub preamble_template {
 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
 .\" nothing in troff, for use with C<>.
 .tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s+2\v'.1v'\h'-1p'
 .ie n \{\
 .ds -- \(*W-
 .ds PI pi

-- System Information:
Debian Release: buster/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.30-2u2 (SMP w/2 CPU cores)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE=is_IS.iso88591 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages perl-modules-5.26 depends on:
ii  dpkg   1.18.24
ii  perl-base  5.26.0-5

Versions of packages perl-modules-5.26 recommends:
ii  perl  5.26.0-5

perl-modules-5.26 suggests no packages.

-- no debconf information

-- 
Bjarni I. Gislason