Date:        Tue, 3 Jul 2018 10:39:37 +0200
    From:        Edgar =?iso-8859-1?B?RnXf?= <e...@math.uni-bonn.de>
    Message-ID:  <20180703083936.gi48...@trav.math.uni-bonn.de>

  | > that is, \0123 in a format string, and in a %b arg are treated 
differently.
  | There's always something new to learn.
  | Do you have any idea which system's printf's bug POSIX is modeled after 
here?

I'm not certain, but I think that printf came from 9th edition (bell labs) 
unix, and the format string was designed as an apparoximate copy of printf(3).

I am not sure whether %b comes from there or not, but it was added as a way
to allow printf(1) to emulate Sys V echo - and that one uses \0NNN for octal
(probably from when the \ nonsense was added to echo somewhere in the
System III, or perhaps even PWB days ... ie: too long ago to care, and just 
another example of whoever added that being dangerously incompetant.)

kre

Reply via email to