Package: whiptail
Version: 0.52.24-4
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 "groff -e ' $' <file>" to find obvious 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>:93: warning: trailing space in the line
an.tmac:<stdin>:295: 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.9-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 whiptail depends on:
ii  libc6        2.40-5
ii  libnewt0.52  0.52.24-4
ii  libpopt0     1.19+dfsg-2
ii  libslang2    2.3.3-5+b1

whiptail recommends no packages.

whiptail suggests no packages.

-- no debconf information
Input file is whiptail.1

Output from "mandoc -T lint  whiptail.1": (shortened list)

      1 unterminated quoted argument
      1 whitespace at end of input line

-.-.

Output from "test-groff -mandoc -t -ww -z whiptail.1": (shortened list)

      1         Use macro '.B' for one argument or split argument.
      1 .BR is for at least 2 arguments, got 1
      1 trailing space in the line

-.-.

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

-.-.

Use the correct macro for the font change of a single argument or
split the argument into two.

295:.BR whiptail

-.-.

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.

Mark a final abbreviation point as such by suffixing it with "\&".

66:display messages using dialog boxes from a shell script. Currently,
117:the item strings. The menu widget still needs some items specified,
163:columns will be displayed. The string specified by
165:is displayed inside the dialog box. If this string is too long to be fit
167:appropriate places. The
190:button. You can use this dialog box to display any message you like.
201:will exit immediately after displaying the message to the user. The
205:shell script clears it later. This is useful when you want to inform
211:require the user to input a string as the answer. If init is supplied
216:key can be used to correct typing errors. If the input string is longer than
217:the width of the dialog box, the input field will be scrolled. On exit,
223:enters is not displayed. This is useful when prompting for passwords or 
other
224:sensitive information. Be aware that if anything is passed in "init", it
225:will be visible in the system's process table to casual snoopers. Also, it
227:cannot see. For these reasons, using "init" is highly discouraged.
231:dialog box. It is like a simple text file viewer. The user can move
237:keys can be used to scroll the text region horizontally. For more
243:the form of a menu for the user to choose. Each menu entry consists of a
247:menu. The
249:is a short description of the option that the entry represents. The
254:as a hot-key. There are
257:scrolled if there are more entries than that. When
303:button is pressed. Otherwise, if errors occur inside

-.-.

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 263, length 91

.IP "\fB\-\-checklist \fItext height width list-height \fR[ \fItag item status 
\fR] \fI..."

Line 274, length 92

.IP "\fB\-\-radiolist \fItext height width list-height \fR [ \fItag item status 
\fR] \fI..."

-.-.

Use \(en (en-dash) for a dash at the beginning of a line,
or between space characters,
not a minus (\-) or a hyphen (-), except in the NAME section.

whiptail.1:313:Savio Lam (lam...@cs.cuhk.hk) - version 0.3
whiptail.1:315:Stuart Herbert (s.herb...@sheffield.ac.uk) - patch for version 
0.4

-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

311:Based on the man page for dialog(1) by:

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
Not considered in a patch, too many lines.


whiptail.1:78:This doesn't work in an xterm (and descendants) if alternate 
screen
whiptail.1:79:switching is enabled, because in that case slang writes to (and 
clears)

-.-.

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

troff:<stdin>:93: warning: trailing space in the line
an.tmac:<stdin>:295: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
--- whiptail.1  2025-01-25 23:35:10.438117421 +0000
+++ whiptail.1.new      2025-01-26 00:27:47.220035502 +0000
@@ -75,8 +75,11 @@ these types of dialog boxes are implemen
 .B \-\-clear
 The screen will be cleared to the
 .BR "screen attribute" " on exit."
-This doesn't work in an xterm (and descendants) if alternate screen
-switching is enabled, because in that case slang writes to (and clears)
+This doesn't work in an xterm
+(and descendants)
+if alternate screen
+switching is enabled, because in that case slang writes to
+(and clears)
 an alternate screen.
 .TP
 .B \-\-defaultno
@@ -90,7 +93,7 @@ Normally the first item in the box is th
 \fB\-\-fb\fR, \fB\-\-fullbuttons\fR
 Use full buttons.  (By default,
 .B whiptail
-uses compact buttons). 
+uses compact buttons).
 .TP
 .B \-\-nocancel
 The dialog box won't have a
@@ -277,7 +280,9 @@ that you can indicate which entry is cur
 .IR status " to " on "."
 
 .IP "\fB\-\-gauge \fItext height width percent\fR"
-.RB "A " gauge " box displays a meter along the bottom of the box.
+A
+.B gauge
+box displays a meter along the bottom of the box.
 The meter indicates a percentage.  New percentages are read from
 standard input, one integer per line.  The meter is updated
 to reflect each new percentage.  If stdin is XXX, the first following line is
@@ -292,7 +297,7 @@ argument "\-\-" which means that all fol
 be treated verbatim and not parsed as options.
 
 If the specified height, width, or menu/list-height is zero,
-.BR whiptail
+.B whiptail
 will increase the values as needed in order to display all information.
 
 .SH DIAGNOSTICS
@@ -308,11 +313,13 @@ is exited by pressing the
 .I ESC
 key, the exit status is 255.
 .SH AUTHOR
-Based on the man page for dialog(1) by:
+Based on the man page for
+.BR dialog (1)
+by:
 .LP
-Savio Lam (lam...@cs.cuhk.hk) - version 0.3
+Savio Lam (lam...@cs.cuhk.hk) \(en version 0.3
 .LP
-Stuart Herbert (s.herb...@sheffield.ac.uk) - patch for version 0.4
+Stuart Herbert (s.herb...@sheffield.ac.uk) \(en patch for version 0.4
 .LP
 Modifications for whiptail by:
 .LP
  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

-.-

  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.

  Not beginning each input sentence on a new line.
Line length 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 -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 -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