diff options
author | keramida <keramida@FreeBSD.org> | 2004-09-24 18:20:43 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2004-09-24 18:20:43 +0000 |
commit | 23afcbf88f770c3340e7eecdbdce1e7233a9eeca (patch) | |
tree | be55b69c6074bfba1542ed0048d8d74895b7316e /usr.bin/printf/printf.c | |
parent | e1013efdd6dfaecf954cf95a1ecf7981147e53af (diff) | |
download | FreeBSD-src-23afcbf88f770c3340e7eecdbdce1e7233a9eeca.zip FreeBSD-src-23afcbf88f770c3340e7eecdbdce1e7233a9eeca.tar.gz |
Allow %' to be used as a format flag by printf(1). This makes it
possible to print the thousands separator in the locale setups that
have one, by something like this:
$ env -i LC_NUMERIC=en_US.ISO8859-1 ./printf "%'0.2f\n" 12345
12,345.00
Reviewed by: das
Diffstat (limited to 'usr.bin/printf/printf.c')
-rw-r--r-- | usr.bin/printf/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 58d2cca..2dcf4f4 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -138,7 +138,7 @@ main(int argc, char *argv[]) * arguments, arguments of zero/null string are provided to use * up the format string. */ - skip1 = "#-+ 0"; + skip1 = "#'-+ 0"; skip2 = "0123456789"; chopped = escape(fmt = format = *argv, 1);/* backslash interpretation */ |