Package: icu-devtools Version: 72.1-5+b1 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: backtrace: file '<stdin>':93 troff:<stdin>:93: warning: trailing space in the line * 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.5-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) Versions of packages icu-devtools depends on: ii libc6 2.40-3 ii libgcc-s1 14.2.0-6 ii libicu72 72.1-5+b1 ii libstdc++6 14.2.0-6 icu-devtools recommends no packages. icu-devtools suggests no packages. -- no debconf information
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 genccode.8": (possibly shortened list) mandoc: genccode.8:92:96: STYLE: input text line longer than 80 bytes: Normally, an ICU dat... mandoc: genccode.8:93:90: STYLE: input text line longer than 80 bytes: However, if this par... mandoc: genccode.8:93:90: STYLE: whitespace at end of input line -.-. Remove space characters at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". 93:However, if this parameter was set to "somedata", the output files will be somedata.o and -.-. 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. genccode.8:108:Copyright (C) 2000-2004 IBM, Inc. and others. -.-. Use the correct macro for the font change of a single argument or split the argument into two. 16:.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" 64:.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" 101:.BI "\-n\fP, \fB\-\-name" 103:.BI "\-t\fP, \fB\-\-type" -.-. Change - to \- if it shall be printed as a minus sign. genccode.8:108:Copyright (C) 2000-2004 IBM, Inc. and others. -.-. Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-), if it is in front of a name for an option, is a symbol for standard input, is a single character used to indicate an option, or is in the NAME section (man-pages(7)). N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen (0x2010, groff \[u2010] or \[hy]) in the output. 48:If the \fB-a\fP option is used, platform specific assembly 69:Use \fB-h\fP to see the list of available types of assembly to generate and -.-. 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. 80:instead of the default. This name is also used as the base name of the 81:output. The default name is made of the 108:Copyright (C) 2000-2004 IBM, Inc. and others. -.-. 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 92, length 96 Normally, an ICU data file such as mydata.icu will be turned into mydata_icu.c and mydata_icu.o. Line 93, length 90 However, if this parameter was set to "somedata", the output files will be somedata.o and -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ": troff: backtrace: file '<stdin>':93 troff:<stdin>:93: warning: trailing space in the line Additionally (general): Abbreviations get a '\&' added after their final full stop (.) to mark them as such and not as an end of a sentence.
--- genccode.8 2024-11-09 23:03:05.103290451 +0000 +++ genccode.8.new 2024-11-09 23:29:48.066178239 +0000 @@ -13,22 +13,27 @@ .SH SYNOPSIS .B genccode [ -.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" +.BR \-h ", " \-? ", " \-\-help ] [ -.BI "\-a\fP, \fB\-\-assembly" " name" +.BR \-a ", " \-\-assembly +.I name ] [ -.BI "\-d\fP, \fB\-\-destdir" " destination" +.BR \-d ", " \-\-destdir +.I destination ] [ -.BI "\-n\fP, \fB\-\-name" " name" +.BR \-n ", " \-\-name +.I name ] [ -.BI "\-e\fP, \fB\-\-entrypoint" " name" +.BR \-e ", " \-\-entrypoint +.I name ] [ -.BI "\-f\fP, \fB\-\-filename" " name" +.BR \-f ", " \-\-filename +.I name ] [ .IR filename " .\|.\|." @@ -45,7 +50,7 @@ replacing dots by underscores, and addin .I .c file extension. .PP -If the \fB-a\fP option is used, platform specific assembly +If the \fB\-a\fP option is used, platform specific assembly code is generated instead of C code. Most C compilers will accept both C and assembly files. Instead of writing a filename with a @@ -61,48 +66,59 @@ is called with no it terminates gracefully. .SH OPTIONS .TP -.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" +.BR \-h ", " \-? ", " \-\-help Print help about usage and exit. .TP -.BI "\-a\fP, \fB\-\-assembly" " name" +.BR \-a ", " "\-\-assembly "\c +.I name Output assembly code instead of C code. -Use \fB-h\fP to see the list of available types of assembly to generate and +Use \fB\-h\fP to see the list of available types of assembly to generate and to specify for this option. .TP -.BI "\-d\fP, \fB\-\-destdir" " destination" +.BR \-d ", " "\-\-destdir "\c +.I destination Set the destination directory to .IR destination . The default destination directory is the current directory. .TP -.BI "\-n\fP, \fB\-\-name" " name" +.BR \-n ", " "\-\-name "\c +.I name Set the data name to .I name -instead of the default. This name is also used as the base name of the -output. The default name is made of the +instead of the default. +This name is also used as the base name of the output. +The default name is made of the .I icudt -prefix, followed by a two-digit version number corresponding to -the current version of the ICU release, and a single letter indicating -the endianness of the data (the letter +prefix, +followed by a two-digit version number corresponding to +the current version of the ICU release, +and a single letter indicating the endianness of the data (the letter .I b -indicated big endian data, and the letter +indicated big endian data, +and the letter .I l indicates little endian ones). .TP -.BI "\-f\fP, \fB\-\-filename" " name" -Normally, an ICU data file such as mydata.icu will be turned into mydata_icu.c and mydata_icu.o. -However, if this parameter was set to "somedata", the output files will be somedata.o and -somedata.c, respectively. +.BR \-f ", " "\-\-filename "\c +.I name +Normally, +an ICU data file such as mydata.icu will be turned into mydata_icu.c and +mydata_icu.o. +However, +if this parameter was set to "somedata", +the output files will be somedata.o and somedata.c, respectively. .TP -.BI "\-e\fP, \fB\-\-entrypoint" " name" +.BR \-e ", " "\-\-entrypoint "\c +.I name Set the data entry point (used for linking against the data in a shared library form) to .IR name . The default entry point name is made of the data (set by the -.BI "\-n\fP, \fB\-\-name" +.BR \-n ", " \-\-name option) followed by an underscore and the type of the data (set by the -.BI "\-t\fP, \fB\-\-type" +.BR \-t ", " \-\-type option). .SH VERSION 72.1 .SH COPYRIGHT -Copyright (C) 2000-2004 IBM, Inc. and others. +Copyright (C) 2000\(en2004 IBM, Inc.\& and others.