Re: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Oğuz via austin-group-l at The Open Group
On Fri, Sep 1, 2023 at 10:12 AM Stephane Chazelas wrote: > Yes, though note: > > - that implies forking a process and loading an external > executable and its libraries The standard doesn't mandate that printf be a builtin; so, in principle, this might be the case with printf as well. > - bc

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

Re: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Stephane Chazelas via austin-group-l at The Open Group
2023-09-01 07:13:36 +0100, Stephane Chazelas via austin-group-l at The Open Group: > 2023-08-31 10:35:59 -0500, Eric Blake via austin-group-l at The Open Group: > > In today's Austin Group call, we discussed the fact that printf(1) has > > mandated behavior for %b (escape sequence processing

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Stephane Chazelas via austin-group-l at The Open Group
2023-08-31 15:02:22 -0500, Eric Blake via austin-group-l at The Open Group: [...] > The current POSIX says that %b was added so that on a non-XSI > system, you could do: > > my_echo() { > printf %b\\n "$*" > } That is dependant on the current value of $IFS. You'd need: xsi_echo() ( IFS=' '

Re: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Stephane Chazelas via austin-group-l at The Open Group
2023-08-31 10:35:59 -0500, Eric Blake via austin-group-l at The Open Group: > In today's Austin Group call, we discussed the fact that printf(1) has > mandated behavior for %b (escape sequence processing similar to XSI > echo) that will eventually conflict with C2x's desire to introduce %b > to

Re: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Oğuz via austin-group-l at The Open Group
On Fri, Sep 1, 2023 at 7:41 AM Phi Debian wrote: > My vote is for posix_printf %B mapping to libc_printf %b In the shell we already have bc for base conversion. Does POSIX really have to support C2x %b in the first place?

Re: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Stephane Chazelas via austin-group-l at The Open Group
2023-09-01 09:44:08 +0300, Oğuz via austin-group-l at The Open Group: > On Fri, Sep 1, 2023 at 7:41 AM Phi Debian wrote: > > My vote is for posix_printf %B mapping to libc_printf %b > > In the shell we already have bc for base conversion. Does POSIX really > have to support C2x %b in the first

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Eric Blake via austin-group-l at The Open Group
On Fri, Sep 01, 2023 at 08:59:19AM +0100, Stephane Chazelas wrote: > 2023-08-31 15:02:22 -0500, Eric Blake via austin-group-l at The Open Group: > [...] > > The current POSIX says that %b was added so that on a non-XSI > > system, you could do: > > > > my_echo() { > > printf %b\\n "$*" > > } >

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Eric Blake via austin-group-l at The Open Group
On Fri, Sep 01, 2023 at 07:19:13AM +0200, Phi Debian wrote: > Well after reading yet another thread regarding libc_printf() I got to > admit that even %B is crossed out, (Yet already choosen by ksh93) > > The other thread also speak about libc_printf() documentting %# as > undefined for things

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Stephane Chazelas via austin-group-l at The Open Group
2023-09-01 07:15:14 -0500, Eric Blake: [...] > > Note that in bash, you need both > > > > shopt -s xpg_echo > > set -o posix > > > > To get a XSI echo. Without the latter, options are still > > recognised. You can get a XSI echo without those options with: > > > > xsi_echo() { > > local IFS='

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Stephane Chazelas via austin-group-l at The Open Group
2023-09-01 07:54:02 -0500, Eric Blake via austin-group-l at The Open Group: [...] > > Well in all case %b can not change semantic in the bash script, since it is > > there for so long, even if it depart from python, perl, libc, it is > > unfortunate but that's the way it is, nobody want a semantic

Fwd: Re: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Steffen Nurpmeso via austin-group-l at The Open Group
Dropped that from my mail queue as i realized there are many other receivers. (And saw Stephane writing much more to bug-bash@.) --- Forwarded from Steffen Nurpmeso --- Date: Fri, 01 Sep 2023 18:34:34 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: "Oğuz via austin-group-l at The

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://www.austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

[Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-01 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1771 == Reported By:calestyo Assigned To:

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-01 Thread Steffen Nurpmeso via austin-group-l at The Open Group
Stephane Chazelas via austin-group-l at The Open Group wrote in <20230901181024.pwx4plwclz7ij...@chazelas.org>: |2023-09-01 07:54:02 -0500, Eric Blake via austin-group-l at The Open Group: ... |> How many scripts in the wild actually use %b, though? And if there |> are such scripts, anything