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>:151: warning: trailing space in the line troff:<stdin>:797: warning: trailing space in the line troff:<stdin>:799: warning: trailing space in the line troff:<stdin>:804: warning: trailing space in the line troff:<stdin>:809: warning: trailing space in the line troff:<stdin>:820: 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' * 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 gpl.7 Output from "mandoc -T lint gpl.7": (shortened list) 1 input text line longer than 80 bytes: A \*(L"User Product\... 1 input text line longer than 80 bytes: For more information... -.-. Output from test-nroff -mandoc -t -ww -z gpl.7: (shortened list) 6 line(s) with a trailing space -.-. 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 6 -.-. 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 \{ -.-. Wrong distance (not two spaces) between sentences in the input file. Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) ("Conventions for source file layout") and "info groff" ("Input Conventions"). The best procedure is to always start a new sentence on a new line, at least, if you are typing on a computer. Remember coding: Only one command ("sentence") on each (logical) line. E-mail: Easier to quote exactly the relevant lines. Generally: Easier to edit the sentence. Patches: Less unaffected text. Search for two adjacent words is easier, when they belong to the same line, and the same phrase. The amount of space between sentences in the output can then be controlled with the ".ss" request. Mark a final abbreviation point as such by suffixing it with "\&". Some sentences (etc.) do not begin on a new line. Split (sometimes) lines after a punctuation mark; before a conjunction. Lines with only one (or two) space(s) between sentences could be split, so latter sentences begin on a new line. Use #!/usr/bin/sh sed -e '/^\./n' \ -e 's/\([[:alpha:]]\)\. */\1.\n/g' $1 to split lines after a sentence period. Check result with the difference between the formatted outputs. See also the attachment "general.bugs" 150:\& Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/> -.-. 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 223, length 86 \&\*(L"This License\*(R" refers to version 3 of the \s-1GNU\s0 General Public License. Line 455, length 84 A \*(L"User Product\*(R" is either (1) a \*(L"consumer product\*(R", which means any Line 797, length 87 \& <one line to give the program\*(Aqs name and a brief idea of what it does.> Line 821, length 84 \& This program comes with ABSOLUTELY NO WARRANTY; for details type "show w". Line 833, length 81 For more information on this, and how to apply and follow the \s-1GNU GPL,\s0 see -.-. 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". gpl.7:244:distribution (with or without modification), making available to the gpl.7:436:on a different server (operated by you or a third party) that supports gpl.7:455:A \*(L"User Product\*(R" is either (1) a \*(L"consumer product\*(R", which means any gpl.7:481:fixed term (regardless of how the transaction is characterized), the gpl.7:550:anyone who conveys the material (or modified versions of it) with gpl.7:594:received notice of violation of this License (for any work) from that gpl.7:697:you (or copies made from those copies), or (b) primarily for and in gpl.7:831:You should also get your employer (if you work as a programmer) or school, -.-. 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. gpl.7:136:.TH GPL 7 "2017-08-14" "gcc-7.2.0" "GNU" gpl.7:141:.SH "NAME" gpl.7:143:.SH "DESCRIPTION" gpl.7:144:.IX Header "DESCRIPTION" gpl.7:155:.SS "Preamble" gpl.7:156:.IX Subsection "Preamble" gpl.7:352:.IP "a." 4 gpl.7:355:.IP "b." 4 gpl.7:360:.IP "c." 4 gpl.7:368:.IP "d." 4 gpl.7:392:.IP "a." 4 gpl.7:397:.IP "b." 4 gpl.7:408:.IP "c." 4 gpl.7:414:.IP "d." 4 gpl.7:427:.IP "e." 4 gpl.7:508:.IP "a." 4 gpl.7:511:.IP "b." 4 gpl.7:515:.IP "c." 4 gpl.7:519:.IP "d." 4 gpl.7:522:.IP "e." 4 gpl.7:525:.IP "f." 4 gpl.7:812:.SH "COPYRIGHT" gpl.7:813:.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" 145:.SS "\s-1GNU\s0 General Public License" 147:.SS "Version 3, 29 June 2007" 155:.SS "Preamble" 219:.SS "\s-1TERMS AND CONDITIONS\s0" 782:.SS "\s-1END OF TERMS AND CONDITIONS\s0" 784:.SS "How to Apply These Terms to Your New Programs" 842:.SH "SEE ALSO" 845:.SH "COPYRIGHT" -.-. 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. 150:\& Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/> 811:\& along with this program. If not, see <http://www.gnu.org/licenses/>. 834:<\fBhttp://www.gnu.org/licenses/\fR>. 841:first, please read <\fBhttp://www.gnu.org/philosophy/why\-not\-lgpl.html\fR>. -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:151: warning: trailing space in the line troff:<stdin>:797: warning: trailing space in the line troff:<stdin>:799: warning: trailing space in the line troff:<stdin>:804: warning: trailing space in the line troff:<stdin>:809: warning: trailing space in the line troff:<stdin>:820: 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.
--- gpl.7 2025-04-15 00:28:18.198509169 +0000 +++ gpl.7.new 2025-04-15 00:36:58.597095834 +0000 @@ -148,7 +148,7 @@ gpl \- GNU General Public License .IX Subsection "Version 3, 29 June 2007" .Vb 1 \& Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/> -\& +\& \& Everyone is permitted to copy and distribute verbatim copies of this \& license document, but changing it is not allowed. .Ve @@ -794,19 +794,19 @@ state the exclusion of warranty; and eac the \*(L"copyright\*(R" line and a pointer to where the full notice is found. .PP .Vb 2 -\& <one line to give the program\*(Aqs name and a brief idea of what it does.> +\& <one line to give the program\*(Aqs name and a brief idea of what it does.> \& Copyright (C) <year> <name of author> -\& +\& \& This program is free software: you can redistribute it and/or modify \& it under the terms of the GNU General Public License as published by \& the Free Software Foundation, either version 3 of the License, or (at \& your option) any later version. -\& +\& \& This program is distributed in the hope that it will be useful, but \& WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \& General Public License for more details. -\& +\& \& You should have received a copy of the GNU General Public License \& along with this program. If not, see <http://www.gnu.org/licenses/>. .Ve @@ -817,7 +817,7 @@ If the program does terminal interaction notice like this when it starts in an interactive mode: .PP .Vb 4 -\& <program> Copyright (C) <year> <name of author> +\& <program> Copyright (C) <year> <name of author> \& This program comes with ABSOLUTELY NO WARRANTY; for details type "show w". \& This is free software, and you are welcome to redistribute it \& under certain conditions; type "show c" for details.
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) -.-