From: Jim Meyering Date: Wed, 23 Apr 2003 08:39:00 +0000 (+0000) Subject: Fix printf POSIX compatibility bug reported by Ben Harris in X-Git-Tag: v5.0.1~660 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a06b5aaf21bcaed20f65ffb3f0bbd7ac6e968c7c;p=thirdparty%2Fcoreutils.git Fix printf POSIX compatibility bug reported by Ben Harris in . (printf invocation): It's \NNN in the format, \0NNN in the %b operand. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 2a992dc2ad..dff75cabce 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -8475,13 +8475,14 @@ all of the given @var{argument}s. @command{printf} has one additional directive, @samp{%b}, which prints its argument string with @samp{\} escapes interpreted in the same way as in -the @var{format} string. +the @var{format} string, except that octal escapes are of the form +@samp{\0@var{ooo}} where @var{ooo} is 0 to 3 octal digits. @kindex \@var{ooo} @kindex \x@var{hh} @command{printf} interprets @samp{\@var{ooo}} in @var{format} as an octal number -(if @var{ooo} is 0 to 3 octal digits) specifying a character to print, +(if @var{ooo} is 1 to 3 octal digits) specifying a character to print, and @samp{\x@var{hh}} as a hexadecimal number (if @var{hh} is 1 to 2 hex digits) specifying a character to print.