Re: printf(1) Fix hex numbers

2021-04-18 Thread Martijn van Duren
On Sun, 2021-04-18 at 12:38 -0900, Philip Guenther wrote: > On Sun, Apr 18, 2021 at 12:04 PM Martijn van Duren > wrote: > > On Sun, 2021-04-18 at 11:17 -0900, Philip Guenther wrote: > > > > > > I'll just throw in a note that the current POSIX spec does not include > > > support for \x in the pr

Re: printf(1) Fix hex numbers

2021-04-18 Thread Philip Guenther
On Sun, Apr 18, 2021 at 12:04 PM Martijn van Duren < openbsd+t...@list.imperialat.at> wrote: > On Sun, 2021-04-18 at 11:17 -0900, Philip Guenther wrote: > > > > I'll just throw in a note that the current POSIX spec does not include > support for \x in the printf(1) format or in the argument to the

Re: printf(1) Fix hex numbers

2021-04-18 Thread Martijn van Duren
On Sun, 2021-04-18 at 11:17 -0900, Philip Guenther wrote: > > I'll just throw in a note that the current POSIX spec does not include > support for \x in the printf(1) format or in the argument to the %b format > specifier.  At least for \x in the format string it > appears to require that it _no

Re: printf(1) Fix hex numbers

2021-04-18 Thread Philip Guenther
I'll just throw in a note that the current POSIX spec does not include support for \x in the printf(1) format or in the argument to the %b format specifier. At least for \x in the format string it appears to require that it _not_ be interpreted, such that printf '\x61\n' must output \x61

Re: printf(1) Fix hex numbers

2021-04-18 Thread Martijn van Duren
On Thu, 2021-04-15 at 19:48 -0600, Todd C. Miller wrote: > On Fri, 16 Apr 2021 03:34:04 +0200, Martijn van Duren wrote: > > > We currently have NetBSD's behaviour when it comes to to no characters, > > so no need to change there imho, but the 2 character limit seems like > > a good place to stop,

Re: printf(1) Fix hex numbers

2021-04-15 Thread Todd C . Miller
On Fri, 16 Apr 2021 03:34:04 +0200, Martijn van Duren wrote: > We currently have NetBSD's behaviour when it comes to to no characters, > so no need to change there imho, but the 2 character limit seems like > a good place to stop, especially since there's no way to break out of > this hungry hungr

printf(1) Fix hex numbers

2021-04-15 Thread Martijn van Duren
Hello tech@, When toying with SHY I found (thanks to sthen@) that printf(1) supports \x syntax, but if I use isxdigit(3) characters as suffix I found the behaviour somewhat surprising: all extra characters were consumed. Looking at our closest neighbours: - FreeBSD: doesn't support \x - NetBSD: L