diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-23 23:38:27 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-23 23:38:27 +0000 |
commit | 882c0d8d35d1b2340cef61f2c36896e631b9273c (patch) | |
tree | 6261dfb31d9f78014680e26dab104556b257b33e | |
parent | 5f619235641e8784afcf2d6ca2e7152fcc317a58 (diff) | |
download | coreutils-882c0d8d35d1b2340cef61f2c36896e631b9273c.tar.xz |
* NEWS: printf supports the I flag.
* src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | src/printf.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -15,6 +15,11 @@ GNU coreutils NEWS -*- outline -*- df now considers BSD "kernfs" file systems to be dummies +** New features + + printf now supports the 'I' flag on hosts whose underlying printf + implementations support 'I', e.g., "printf %Id 2". + ** Bug fixes cp --sparse preserves sparseness at the end of a file, even when diff --git a/src/printf.c b/src/printf.c index ddced5af4..bfb40728c 100644 --- a/src/printf.c +++ b/src/printf.c @@ -517,6 +517,9 @@ print_formatted (const char *format, int argc, char **argv) for (;; f++, direc_length++) switch (*f) { +#if (__GLIBC__ == 2 && 2 <= __GLIBC_MINOR__) || 3 <= __GLIBC__ + case 'I': +#endif case '\'': ok['a'] = ok['A'] = ok['c'] = ok['e'] = ok['E'] = ok['o'] = ok['s'] = ok['x'] = ok['X'] = 0; |