printf(1): Sync with FreeBSD
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 13 Feb 2011 10:12:53 +0000 (00:12 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 13 Feb 2011 10:35:10 +0000 (00:35 -1000)
commit7c0c6da87340bdc8a8511fc490d84b9436417133
tree06ec85b32a0c0f493fc3638bef72b98461fc651f
parent17745ede8e87eb9827993ecff90271234b5e55d1
printf(1): Sync with FreeBSD

-Fix more issues allowing /bin/sh to pass more regression tests.
-Do not use sh memory functions in sh builtin.
-We work on ctype's and not only on numbers so set LC_ALL.
-The only caller of mknum() provides a char instead of an int, so make
it match the definition.
-Remove support for building as a csh builtin.
-POSIX compliance.
-Prefer intmax_t over long long.
-Handle null characters in the format string.
-No reason to write \a and \v as octal escape sequences.
-Move parts of the long main() function into a new function doformat().
-Rewrite the loop in main() to be more understandable.
-Replace buggy for-loops to skip certain character with strspn().
-Support the L modifier for floating-point values as an extension.
-Allow %' to be used as a format flag by printf(1).
-Enable support for the %a, %A, and %F format specifiers.
-Let printf(1) tell the difference between zero width/precision and
unspecified width/precision.
-Allow format strings containing "%%" to be reused.
-Allow `%' to be written out with an octal escape (\45 or \045).
-Man page markup.

Obtained-from: FreeBSD
usr.bin/printf/printf.1
usr.bin/printf/printf.c