Package: binutils-common Version: 2.43.50.20241204-2 (Debian testing) Severity: minor Tags: patch
* What led up to the situation? Checking for defects with test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" [Use "groff -e ' $' <file>" to find 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>:100: warning: font name 'CW' is deprecated * 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.11.10-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 c++filt.1 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> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- So any 'generator' should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. This is just a simple quality control measure. The 'generator' may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Input text line longer than 80 bytes. Not removing trailing spaces (in in- and output). The reason for these trailing spaces should be found and eliminated. Not beginning each input sentence on a new line. Lines should thus be shorter. 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 -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 of 'diff -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) -.-. Output from "mandoc -T lint c++filt.1 ": (shortened list) 1 empty block 1 input text line longer than 80 bytes -.-. Output from "test-groff -mandoc -t -ww -b -z c++filt.1 ": (shortened list) 1 font name 'CW' is deprecated -.-. Output from "mandoc -T lint c++filt.1 ": mandoc: c++filt.1:148:82: STYLE: input text line longer than 80 bytes: name \f(CW\*(C`_foo\... mandoc: c++filt.1:260:2: WARNING: empty block: RS -.-. Change '-' (\-) to '\(en' (en-dash) for a numeric range. GNU gnulib has recently (2023-06-18) updated its "build_aux/update-copyright" to recognize "\(en" in man pages. c++filt.1:291:Copyright (c) 1991\-2024 Free Software Foundation, Inc. -.-. Wrong distance 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. 83:each different version. This process is known as \fImangling\fR. The -.-. 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. Line 148, length 82 name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether -.-. Add a zero (0) in front of a decimal fraction that begins with a period (.) 7:.if t .sp 0.5v -.-. Two or more space charaters between printable characters. When the distance is between sentences, start the beginning of the second one on a separate line ("semantic newline", see man-pages(7)). N.B. The number of lines affected can be too large to be in a patch. 80:each function takes parameters of different types. In order to be 83:each different version. This process is known as \fImangling\fR. The 105:names from the standard input instead. All the results are printed on 106:the standard output. The difference between reading names from the 109:checking is performed to separate them from surrounding text. Thus 122:will not work. (Note the extra comma at the end of the mangled 123:name which makes it invalid). This command however will work: 130:trailing comma. This behaviour is because when the names are read 133:characters trailing after a mangled name. For example: 147:of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level 148:name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether 171:Attempt to demangle types as well as function names. This is disabled 173:the compiler, and they can be confused with non-mangled names. For example, 199:whilst demangling strings. Since the name mangling formats allow for 202:machine, triggering a memory fault. The limit tries to prevent this 206:necessary in order to demangle truly complicated names. Note however 211:\&\fB\-\-no\-recurse\-limit\fR option. The \fB\-R\fR option is a 220:different compilers. The argument to this option selects which 270:Read command-line options from \fIfile\fR. The options read are 271:inserted in place of the original @\fIfile\fR option. If \fIfile\fR 275:Options in \fIfile\fR are separated by whitespace. A whitespace 277:option in either single or double quotes. Any character (including a 279:with a backslash. The \fIfile\fR may itself contain additional 297:Back-Cover Texts. A copy of the license is included in the -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -z ": troff:<stdin>:100: warning: font name 'CW' is deprecated -.- Additonal: Adjust macro Vb to use the 'CR' font, when the formatter is "groff" or compatible. -.- Change font 'CW' to 'CR'.
--- c++filt.1 2024-12-06 23:12:30.696478012 +0000 +++ c++filt.1.new 2024-12-06 23:29:59.531958326 +0000 @@ -8,7 +8,8 @@ .if n .sp .. .de Vb \" Begin verbatim text -.ft CW +.ie \\n(.g .ft CR +.el .ft CW .nf .ne \\$1 .. @@ -72,7 +73,7 @@ c++filt [\fB\-_\fR|\fB\-\-strip\-undersc [\fB\-r\fR|\fB\-\-no\-recurse\-limit\fR] [\fB\-R\fR|\fB\-\-recurse\-limit\fR] [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR] - [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...] + [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...] .SH DESCRIPTION .IX Header "DESCRIPTION" The C++ and Java languages provide function overloading, which means @@ -143,10 +144,13 @@ characters trailing after a mangled name .IP \fB\-\-strip\-underscore\fR 4 .IX Item "--strip-underscore" .PD -On some systems, both the C and C++ compilers put an underscore in front -of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level -name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether -\&\fBc++filt\fR removes the underscore by default is target dependent. +On some systems, +both the C and C++ compilers put an underscore in front of every name. +For example, +the C name \f(CR\*(C`foo\*(C'\fR gets the low-level name +\f(CR\*(C`_foo\*(C'\fR. +This option removes the initial underscore. +Whether \&\fBc++filt\fR removes the underscore by default is target dependent. .IP \fB\-n\fR 4 .IX Item "-n" .PD 0 @@ -221,39 +225,39 @@ different compilers. The argument to th method it uses: .RS 4 .ie n .IP """auto""" 4 -.el .IP \f(CWauto\fR 4 +.el .IP \f(CRauto\fR 4 .IX Item "auto" Automatic selection based on executable (the default method) .ie n .IP """gnu""" 4 -.el .IP \f(CWgnu\fR 4 +.el .IP \f(CRgnu\fR 4 .IX Item "gnu" the one used by the GNU C++ compiler (g++) .ie n .IP """lucid""" 4 -.el .IP \f(CWlucid\fR 4 +.el .IP \f(CRlucid\fR 4 .IX Item "lucid" the one used by the Lucid compiler (lcc) .ie n .IP """arm""" 4 -.el .IP \f(CWarm\fR 4 +.el .IP \f(CRarm\fR 4 .IX Item "arm" the one specified by the C++ Annotated Reference Manual .ie n .IP """hp""" 4 -.el .IP \f(CWhp\fR 4 +.el .IP \f(CRhp\fR 4 .IX Item "hp" the one used by the HP compiler (aCC) .ie n .IP """edg""" 4 -.el .IP \f(CWedg\fR 4 +.el .IP \f(CRedg\fR 4 .IX Item "edg" the one used by the EDG compiler .ie n .IP """gnu\-v3""" 4 -.el .IP \f(CWgnu\-v3\fR 4 +.el .IP \f(CRgnu\-v3\fR 4 .IX Item "gnu-v3" the one used by the GNU C++ compiler (g++) with the V3 ABI. .ie n .IP """java""" 4 -.el .IP \f(CWjava\fR 4 +.el .IP \f(CRjava\fR 4 .IX Item "java" the one used by the GNU Java compiler (gcj) .ie n .IP """gnat""" 4 -.el .IP \f(CWgnat\fR 4 +.el .IP \f(CRgnat\fR 4 .IX Item "gnat" the one used by the GNU Ada compiler (GNAT). .RE @@ -281,14 +285,14 @@ with a backslash. The \fIfile\fR may it .SH FOOTNOTES .IX Header "FOOTNOTES" .IP 1. 4 -MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on +MS-DOS does not allow \f(CR\*(C`+\*(C'\fR characters in file names, so on MS-DOS this program is named \fBCXXFILT\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" the Info entries for \fIbinutils\fR. .SH COPYRIGHT .IX Header "COPYRIGHT" -Copyright (c) 1991\-2024 Free Software Foundation, Inc. +Copyright (c) 1991\(en2024 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3