cvs commit: src/usr.bin/printf printf.c
David Schultz
das at FreeBSD.org
Sat Aug 2 06:02:23 UTC 2008
das 2008-08-02 06:02:02 UTC
FreeBSD src repository
Modified files:
usr.bin/printf printf.c
Log:
SVN rev 181153 on 2008-08-02 06:02:02Z by das
POSIX says that octal escapes have the format \ddd in the format string,
but \0ddd in a %b argument, with a length restriction of 3 octal digits
in either case. This seems silly, but it needs to be right so it's possible
to write an octal escape followed by an ordinary digit. Solaris printf(1)
and GNU printf(1) also behave this way.
Example: "printf '\0752'" now produces "=2" instead of garbage.
Revision Changes Path
1.38 +2 -1 src/usr.bin/printf/printf.c
More information about the cvs-src
mailing list