Package: gcc-doc-base
Version: 14.2.0-1
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man 
page"

  [Use 

grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>

  to find (most) trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

troff:<stdin>:157: warning: trailing space in the line

  Additionally:

Bad use of \s0 in a string definition, the string "X" could be resized,
for example with "\s-1\*X\s0".

25:.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'


   * What outcome did you expect instead?

     No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


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

Kernel: Linux 6.12.21-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

-- no debconf information
Input file is gfdl.7

Output from "mandoc -T lint  gfdl.7": (shortened list)

      1 input text line longer than 80 bytes: A section \*(L"Entit...
      1 input text line longer than 80 bytes: For any section Enti...
      1 input text line longer than 80 bytes: The operator of an \...
      1 input text line longer than 80 bytes: or in part into the ...
      1 input text line longer than 80 bytes: text that translates...
      1 input text line longer than 80 bytes: title either is prec...

-.-.

Output from
test-nroff -mandoc -t -ww -z gfdl.7: (shortened list)

      1 line(s) with a trailing space


Find trailing space with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

-.-.

Show if Pod::Man generated this.

Who is actually creating this man page?  Debian or upstream?

Is the generating software out of date?

1:.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)

-.-.

Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

Number of lines affected is

1

-.-.

Add a backslash, if it is missing after \{ at the end of a line.

59:.if (\n(rF:(\n(.g==0)) \{
60:.    if \nF \{
64:.        if !\nF==2 \{

-.-.

Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Add "\:" to split the string for the output, "\<newline>" in the source.  

Line 109, length 84

.ds o 
\\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]

Line 145, length 95

\&\f(CW@comment\fR For some cases, this default \f(CW@node\fR/@unnumbered is 
not applicable and

Line 147, length 89

\&\f(CW@comment\fR nodefaultgnufreedocumentationlicensenode and provide it's 
own version.

Line 148, length 93

\&\f(CW@comment\fR F.i., when this file is included in an 
\f(CW@raisesections\fR context, the

Line 155, length 83

\&        Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, 
Inc.

Line 263, length 83

A section \*(L"Entitled \s-1XYZ\*(R"\s0 means a named subunit of the Document 
whose

Line 264, length 84

title either is precisely \s-1XYZ\s0 or contains \s-1XYZ\s0 in parentheses 
following

Line 265, length 83

text that translates \s-1XYZ\s0 in another language.  (Here \s-1XYZ\s0 stands 
for a

Line 267, length 104

\&\*(L"Dedications\*(R", \*(L"Endorsements\*(R", or \*(L"History\*(R".)  To 
\*(L"Preserve the Title\*(R"

Line 399, length 86

For any section Entitled \*(L"Acknowledgements\*(R" or \*(L"Dedications\*(R", 
Preserve

Line 471, length 87

\&\*(L"History\*(R"; likewise combine any sections Entitled 
\*(L"Acknowledgements\*(R",

Line 526, length 86

\&\*(L"Dedications\*(R", or \*(L"History\*(R", the requirement (section 4) to 
Preserve

Line 583, length 91

\&\*(L"Massive Multiauthor Collaboration Site\*(R" (or \*(L"\s-1MMC\s0 
Site\*(R") means any

Line 587, length 88

\&\*(L"Massive Multiauthor Collaboration\*(R" (or \*(L"\s-1MMC\*(R"\s0) 
contained in the

Line 603, length 85

or in part into the \s-1MMC, \\fIs0\fR\|(1) had no cover texts or invariant 
sections,

Line 606, length 84

The operator of an \s-1MMC\s0 Site may republish an \s-1MMC\s0 contained in the 
site

Line 617, length 81

\&          Permission is granted to copy, distribute and/or modify this 
document

Line 620, length 81

\&          with no Invariant Sections, no Front\-Cover Texts, and no 
Back\-Cover

Line 621, length 82

\&          Texts.  A copy of the license is included in the section entitled 
"GNU

Line 630, length 81

\&            the Front\-Cover Texts being <list>, and with the Back\-Cover 
Texts

Longest line is number 267 with 104 characters

-.-.

Do not use "\s0" in a string definition but an absolute number,
as the size of the string could be changed.
Then a situation of "\s+X...\s+Y...\s0...\s0" could emerge.
Type size changes have an effect in "troff", but not in "nroff".

25:.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'

-.-.

Add a zero (0) in front of a decimal fraction that begins with a period
(.)

6:.if t .sp .5v
77:.    ds #V .8m
78:.    ds #F .3m
84:.    ds #V .6m

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

gfdl.7:206:subject (or to related matters) and contains nothing that could fall
gfdl.7:231:pixels) generic paint programs or (for drawings) some widely 
available
gfdl.7:267:\&\*(L"Dedications\*(R", \*(L"Endorsements\*(R", or 
\*(L"History\*(R".)  To \*(L"Preserve the Title\*(R"
gfdl.7:325:Opaque copy (directly or through your agents or retailers) of that
gfdl.7:344:Use in the Title Page (and on the covers, if any) a title distinct
gfdl.7:354:Document (all of its principal authors, if it has fewer than five),
gfdl.7:526:\&\*(L"Dedications\*(R", or \*(L"History\*(R", the requirement 
(section 4) to Preserve
gfdl.7:527:its Title (section 1) will typically require changing the actual
gfdl.7:548:received notice of violation of this License (for any work) from that
gfdl.7:571:of any later version that has been published (not as a draft) by the
gfdl.7:583:\&\*(L"Massive Multiauthor Collaboration Site\*(R" (or 
\*(L"\s-1MMC\s0 Site\*(R") means any
gfdl.7:587:\&\*(L"Massive Multiauthor Collaboration\*(R" (or 
\*(L"\s-1MMC\*(R"\s0) contained in the

-.-.

Only one space character is after a possible end of sentence
(after a punctuation, that can end a sentence).

gfdl.7:246:\&\s-1JPG. \s0 Opaque formats include proprietary formats that can be

-.-.

Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.

gfdl.7:136:.TH GFDL 7 "2017-08-14" "gcc-7.2.0" "GNU"
gfdl.7:141:.SH "NAME"
gfdl.7:143:.SH "DESCRIPTION"
gfdl.7:144:.IX Header "DESCRIPTION"
gfdl.7:161:.IP "0." 4
gfdl.7:184:.IP "1." 4
gfdl.7:275:.IP "2." 4
gfdl.7:290:.IP "3." 4
gfdl.7:327:.IP "4." 4
gfdl.7:337:.IP "A." 4
gfdl.7:343:.IP "B." 4
gfdl.7:349:.IP "C." 4
gfdl.7:352:.IP "D." 4
gfdl.7:354:.IP "E." 4
gfdl.7:357:.IP "F." 4
gfdl.7:361:.IP "G." 4
gfdl.7:364:.IP "H." 4
gfdl.7:366:.IP "I." 4
gfdl.7:374:.IP "J." 4
gfdl.7:382:.IP "K." 4
gfdl.7:387:.IP "L." 4
gfdl.7:391:.IP "M." 4
gfdl.7:394:.IP "N." 4
gfdl.7:397:.IP "O." 4
gfdl.7:429:.IP "5." 4
gfdl.7:453:.IP "6." 4
gfdl.7:466:.IP "7." 4
gfdl.7:485:.IP "8." 4
gfdl.7:505:.IP "9." 4
gfdl.7:532:.IP "10." 4
gfdl.7:553:.IP "11." 4
gfdl.7:618:.SH "COPYRIGHT"
gfdl.7:619:.IX Header "COPYRIGHT"

-.-.

Use ".na" (no adjustment) instead of ".ad l" (and ".ad" to begin the
same adjustment again as before).

139:.if n .ad l

-.-.

Add lines to use the CR font for groff instead of CW.

.if t \{\
.  ie \\n(.g .ft CR
.  el .ft CW
.\}


10:.ft CW

-.-.

Section headings (.SH and .SS) do not need quoting their arguments.

141:.SH "NAME"
143:.SH "DESCRIPTION"
150:.SS "\s-1GNU\s0 Free Documentation License"
152:.SS "Version 1.3, 3 November 2008"
609:.SS "\s-1ADDENDUM:\s0 How to use this License for your documents"
642:.SH "SEE ALSO"
645:.SH "COPYRIGHT"

-.-.

.\" Define a fallback for font CW with

.if t \{\
.  ie \n(.g .ds fC \f(CR
.  el .ds fC \f(CW
.\}
.
.if n \{\
.  ds fC \fR
.\}

Change \f(CW to \*(fC

145:\&\f(CW@comment\fR For some cases, this default \f(CW@node\fR/@unnumbered 
is not applicable and
146:\&\f(CW@comment\fR causes warnings.  In those cases, the including file can 
set
147:\&\f(CW@comment\fR nodefaultgnufreedocumentationlicensenode and provide 
it's own version.
148:\&\f(CW@comment\fR F.i., when this file is included in an 
\f(CW@raisesections\fR context, the
149:\&\f(CW@comment\fR including file can use an \f(CW@unnumberedsec\fR.

-.-.

Put a (long) web address on a new output line to reduce the posibility of
splitting the address between two output lines.
Or inhibit hyphenation with "\%" in front of the name.


156:\&        E<lt>B<http://fsf.org/>E<gt>
565:<\fBhttp://www.gnu.org/copyleft/\fR>.
648:<\fBhttp://fsf.org/\fR>

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

troff:<stdin>:157: warning: trailing space in the line

Bad use of \s0 in a string definition, the string "X" could be resized,
for example with "\s-1\*X\s0".


25:.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- gfdl.7      2025-04-14 23:45:49.549354403 +0000
+++ gfdl.7.new  2025-04-14 23:57:39.797722296 +0000
@@ -56,12 +56,12 @@
 ..
 .nr rF 0
 .if \n(.g .if rF .nr rF 1
-.if (\n(rF:(\n(.g==0)) \{
-.    if \nF \{
+.if (\n(rF:(\n(.g==0)) \{\
+.    if \nF \{\
 .        de IX
 .        tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.        if !\nF==2 \{
+.        if !\nF==2 \{\
 .            nr % 0
 .            nr F 2
 .        \}
@@ -154,7 +154,7 @@ gfdl \- GNU Free Documentation License
 .Vb 2
 \&        Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, 
Inc.
 \&        E<lt>B<http://fsf.org/>E<gt>
-\&        
+\&
 \&        Everyone is permitted to copy and distribute verbatim copies
 \&        of this license document, but changing it is not allowed.
 .Ve
  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>

  To find trailing space use

grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

  Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced.

  The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.

  See man-pages(7), item "semantic newline".

-.-

The difference between the formatted output of the original and patched file
can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -d -u <out1> <out2>

and for groff, using

\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"

instead of 'nroff -mandoc'

  Add the option '-t', if the file contains a table.

  Read the output from 'diff -d -u ...' with 'less -R' or similar.

-.-.

  If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

  The option "-warnings=w"

  The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

  or

  (produce only warnings):

export MANROFFOPT="-ww -b -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)

-.-

Reply via email to