install-headers stdckdint.h error

2024-03-28 Thread Grisha Levit
The addition of stdckdint.h to CREATED_HEADERS in Makefile.in leads to an error when installing loadable builtins on platforms that provide the header: install: cannot stat '/tmp/bash/stdckdint.h': No such file or directory make[2]: *** [Makefile:903: install-headers] Error 1 make[2]: Leaving dire

[PATCH 13/13] doc/bash.1: Trivially refactor *roff markup.

2024-03-28 Thread G. Branden Robinson
Use `\fP` to restore previous font in places where it adequately returns to roman face rather than the explicit `\fR` (which can clobber the "previous font selection" datum in the formatter). --- doc/bash.1 | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) dif

[PATCH 11/13] [man pages]: Make comment more informative.

2024-03-28 Thread G. Branden Robinson
Double quotes aren't any easier to use with AT&T troff just because you tuck them inside a string definition. (The _name_ of the string doesn't matter; that gets interpolated before "quote removal", if you will.) https://www.gnu.org/software/groff/manual/groff.html.node/Calling-Macros.html --- d

[PATCH 12/13] doc/bash.1: Fix *roff style nit.

2024-03-28 Thread G. Branden Robinson
While font mounting position 3 is usually assigned a bold typeface, it seems a bit fragile to not explicitly ask for bold. The concept of mounting positions is also not something man page authors typically need to think about. --- doc/bash.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletion

[PATCH 10/13] lib/readline/doc/history.3: Make `EX` and `EE` man(7) macros usable on DWB troff.

2024-03-28 Thread G. Branden Robinson
This prevents lines in the displayed struct definition from oversetting on DWB troff. Diff of rendering (DWB only): @@ -10150,11 +10150,11 @@ The state of the History library is encapsulated into a sin- gle structure: -/* - * structure for

[PATCH 07/13] lib/readline/doc/history.3: Fix hyphen-minus signs.

2024-03-28 Thread G. Branden Robinson
Use a *roff minus sign for minus signs and the `-` character in email addresses. --- lib/readline/doc/history.3 | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/readline/doc/history.3 b/lib/readline/doc/history.3 index 30b4d7be..40b85b20 100644 --- a/lib/readline/doc

[PATCH 09/13] lib/readline/doc/history.3: Revise inline struct.

2024-03-28 Thread G. Branden Robinson
This unfilled block of text was oversetting the line on DWB nroff, which uses a line length of 65n (just like Seventh Edition Unix nroff). Recast comments to occupy less space. Also bracket this inline code display with `EX`/`EE` macros; this sets the code in a monospace/constant-width font on pl

[PATCH 04/13] lib/readline/doc/history.3: Replace blank lines with macro calls.

2024-03-28 Thread G. Branden Robinson
When formatting for typesetters, a blank input line produces 1 vee (one line height, basically) of vertical space, but the default inter-paragraph distance in man(7) is 0.4v. Fixes numerous style warnings from "nroff -rCHECKSTYLE=3 -man" in groff 1.23.0 of the following form. an.tmac:lib/readline

[PATCH 08/13] lib/readline/doc/history.3: Fix font thinko.

2024-03-28 Thread G. Branden Robinson
Replace no-op font selection escape sequence with what appears to have been intended. --- lib/readline/doc/history.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/readline/doc/history.3 b/lib/readline/doc/history.3 index 40b85b20..7b6ab73b 100644 --- a/lib/readline/doc/hi

[PATCH 05/13] lib/readline/doc/history.3: Fix style minutia.

2024-03-28 Thread G. Branden Robinson
Set a period in the intended face (roman, not bold). Stop breaking a line in the middle of a sentence without motivation. Diff of rendering: (groff Git, 1.23.0, 1.22.4; mandoc; Heirloom Doctools nroff) - G Apply the following ā€œsā€ - or ā€œ&ā€ modifier once to each word in the ev

[PATCH 06/13] lib/readline/doc/history.3: Drop microtypography.

2024-03-28 Thread G. Branden Robinson
Now that we're using a correct caret/circumflex/hat glyph on modern typesetters (and terminals with a Unicode repertoire), drop the thicket of partial-line motion and type size-altering escape sequences, certain to frighten and confuse any unfrozen caveman page authors. I expect this to slightly r

[PATCH 01/13] lib/readline/doc/history.3: Fix failure to render on DWB and Solaris 10 troff.

2024-03-28 Thread G. Branden Robinson
The following syntax is killing the page on AT&T troff. You get the header and footer and nothing else--just an ocean of blank space. .de Fn1 With traditional roff eyeballs, this is interpreted the same as this: .deFn1 or: .de Fn 1 ...which may at last make the problem clear. Identifiers ar

[PATCH 03/13] lib/readline/doc/history.3: Drop spacing around (sub)section headings.

2024-03-28 Thread G. Branden Robinson
When formatting for typesetters, a blank input line produces 1 vee (one line height, basically) of vertical space, but the default inter-paragraph distance in man(7) is 0.4v. Second, the package always puts inter-paragraph spacing before a (sub)section heading anyway. Third, forcing vertical space

[PATCH 02/13] doc/bash.1: Fix groff man(7) style warnings.

2024-03-28 Thread G. Branden Robinson
Diff of rendering (ignoring differences in character set, default line length, and a font selection affecting only a period): (groff Git, 1.23.0, 1.22.4; mandoc; Heirloom Doctools nroff; DWB nroff) - expansion, word splitting, pathname expansion, and quote removal . + expansion, word spli

Re: [PATCH] fix cmd and hist nums in ${var@P} inside $PS[012]

2024-03-28 Thread Chet Ramey
On 3/26/24 9:02 AM, Grisha Levit wrote: When \# or \! is decoded in a ${var@P} expansion embedded in a prompt string, the value can be off by one from that of the same sequence embedded directly in the prompt string. Thanks for the report and patch. Chet -- ``The lyf so short, the craft so lo

Re: funsub in PS2

2024-03-28 Thread Chet Ramey
On 3/26/24 9:49 AM, Grisha Levit wrote: Having funsubs in PS2 seems to cause input tokens that are split across lines to be partially replaced with the last token of the last funsub to be parsed while expanding the prompt string. $ PS2='${ : ; }> ' $ printf '[%s]\n' ab\ > cd

Re: Memory Leak - Bash 4.3.x30

2024-03-28 Thread Jordi Ferrer
El 27/03/24 a les 18:51, Chet Ramey ha escrit: On 3/26/24 1:33 PM, Jordi Ferrer wrote: Just in case for people running old servers: This simple code cause a memory leak in bash: #!/bin/bash # Array=("S" "E") while [ 1 ]; do