Package: libxpm-dev Version: 1:3.5.17-1+b3 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>:44: warning: expected numeric expression, got character 'l' troff:<stdin>:46: warning: expected numeric expression, got character 'l' troff:<stdin>:48: warning: expected numeric expression, got character 'l' troff:<stdin>:50: warning: expected numeric expression, got character 'l' troff:<stdin>:52: warning: expected numeric expression, got character 'l' troff:<stdin>:54: warning: expected numeric expression, got character 'l' an.tmac:<stdin>:110: misuse, warning: .BR is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. * 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) Versions of packages libxpm-dev depends on: ii libx11-dev 2:1.8.12-1 ii libxpm4 1:3.5.17-1+b3 ii x11proto-dev 2024.1-1 libxpm-dev recommends no packages. libxpm-dev suggests no packages. -- no debconf information
Input file is XpmCreateBuffer.3 Output from "mandoc -T lint XpmCreateBuffer.3": (shortened list) 3 skipping paragraph macro: PP after SS -.-. Output from test-nroff -mandoc -t -ww -z XpmCreateBuffer.3: (shortened list) 1 Use macro '.B' for one argument or split argument. 1 .BR is for at least 2 arguments, got 1 6 expected numeric expression, got character 'l' -.-. Reduce space between words. XpmCreateBuffer.3:27:XpmCreateBuffer \- create an XPM Buffer -.-. 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" 80:and to write a file from a buffer. Thus for instance one may decide to use -.-. Split a punctuation mark from a single argument for a two-font macro 110:.BR XpmNoMemory, -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". XpmCreateBuffer.3:53:Specifies the location of a structure containing information (or NULL). XpmCreateBuffer.3:55:Specifies the location of a structure to get possible information (or NULL). -.-. Only one space character is after a possible end of sentence (after a punctuation, that can end a sentence). XpmCreateBuffer.3:80:and to write a file from a buffer. Thus for instance one may decide to use -.-. Use ".na" (no adjustment) instead of ".ad l" (and ".ad" to begin the same adjustment again as before). 123:.ad l -.-. Section headings (.SH and .SS) do not need quoting their arguments. 122:.SH "SEE ALSO" -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:44: warning: expected numeric expression, got character 'l' troff:<stdin>:46: warning: expected numeric expression, got character 'l' troff:<stdin>:48: warning: expected numeric expression, got character 'l' troff:<stdin>:50: warning: expected numeric expression, got character 'l' troff:<stdin>:52: warning: expected numeric expression, got character 'l' troff:<stdin>:54: warning: expected numeric expression, got character 'l' an.tmac:<stdin>:110: misuse, warning: .BR is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. -.-. Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- XpmCreateBuffer.3 2025-04-12 20:01:54.850209585 +0000 +++ XpmCreateBuffer.3.new 2025-04-12 20:10:52.096818052 +0000 @@ -24,7 +24,7 @@ .hw XImage .TH XpmCreateBuffer 3 "libXpm 3.5.17" "X Version 11" "libXpm functions" .SH NAME -XpmCreateBuffer \- create an XPM Buffer +XpmCreateBuffer \- create an XPM Buffer .SH SYNOPSIS .nf @@ -41,23 +41,24 @@ XpmCreateBuffer \- create an XPM Buffer .SH ARGUMENTS -.IP \fIdisplay\fP li +.IP \fIdisplay\fP 1i Specifies the connection to the X server. -.IP \fIbuffer_return\fP li +.IP \fIbuffer_return\fP 1i Returns the buffer which is created. -.IP \fIimage\fP li +.IP \fIimage\fP 1i Specifies the image. -.IP \fIshapeimage\fP li +.IP \fIshapeimage\fP 1i Specifies the shape mask image. -.IP \fIattributes\fP li -Specifies the location of a structure containing information (or NULL). -.IP \fIinfo\fP li -Specifies the location of a structure to get possible information (or NULL). +.IP \fIattributes\fP 1i +Specifies the location of a structure containing information +(or NULL). +.IP \fIinfo\fP 1i +Specifies the location of a structure to get possible information +(or NULL). .SH DESCRIPTION .SS XpmCreateBufferFromPixmap -.PP .BR XpmCreateBufferFromPixmap () creates an XPM buffer from a Pixmap. The @@ -77,7 +78,8 @@ As a convenience, the and .BR XpmWriteFileFromBuffer (3) functions are provided to copy a file to a buffer -and to write a file from a buffer. Thus for instance one may decide to use +and to write a file from a buffer. +Thus for instance one may decide to use .BR XpmCreateBufferFromPixmap (), .BR XpmWriteFileFromBuffer (3), and @@ -88,7 +90,6 @@ On some systems this may lead to a perfo processing will be performed in memory, but it uses more memory. .SS XpmCreateBufferFromImage -.PP The .BR XpmCreateBufferFromImage () function works as @@ -99,7 +100,6 @@ The caller should free the buffer using when finished. .SS XpmCreateBufferFromXpmImage. -.PP To create an XPM buffer from an XpmImage, use .BR XpmCreateBufferFromXpmImage (). The @@ -107,7 +107,7 @@ The function writes out the given image to a single block mallocâed buffer in XPM format. If insufficient working storage is allocated, it returns -.BR XpmNoMemory, +.BR XpmNoMemory , and returns .B XpmSuccess on success. @@ -119,8 +119,8 @@ The caller should free the buffer using .BR XpmFree (3) when finished. -.SH "SEE ALSO" -.ad l +.SH SEE ALSO +.na .nh .BR XpmFree (3), .BR XpmWriteFileFromBuffer (3),
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) -.-