git: printf(1): Sync with FreeBSD

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Feb 13 12:05:19 PST 2011


commit 7c0c6da87340bdc8a8511fc490d84b9436417133
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sun Feb 13 00:12:53 2011 -1000

    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

Summary of changes:
 usr.bin/printf/printf.1 |  103 ++++++++++---
 usr.bin/printf/printf.c |  398 ++++++++++++++++++++++++++---------------------
 2 files changed, 301 insertions(+), 200 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7c0c6da87340bdc8a8511fc490d84b9436417133


-- 
DragonFly BSD source repository





More information about the Commits mailing list