diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2013-03-17 00:28:12 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2013-03-17 00:28:12 +0530 |
commit | d8dbdc83c08584968a551624825e07eae0edfb34 (patch) | |
tree | 4420526d476b781d9a32bc62279abe767df1948f /builtin_printf.cpp | |
parent | 359a7cebde1805831e923d414f41f20e0616ed57 (diff) |
Cleaned up some code in printf builtin
Diffstat (limited to 'builtin_printf.cpp')
-rw-r--r-- | builtin_printf.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/builtin_printf.cpp b/builtin_printf.cpp index 099a2f0d..3ed4503d 100644 --- a/builtin_printf.cpp +++ b/builtin_printf.cpp @@ -55,11 +55,6 @@ #include "common.h" -/* The official name of this program (e.g., no `g' prefix). */ -#define PROGRAM_NAME "printf" - -#define AUTHORS "David MacKenzie" - bool isodigit(const wchar_t &c) { return wcschr(L"01234567", c) != NULL; @@ -141,7 +136,7 @@ static bool posixly_correct; /* This message appears in N_() here rather than just in _() below because the sole use would have been in a #define. */ static wchar_t const *const cfcc_msg = - N_(L"warning: %s: character(s) following character constant have been ignored"); + N_(L"warning: %ls: character(s) following character constant have been ignored"); double C_STRTOD (wchar_t const *nptr, wchar_t **endptr) { @@ -215,12 +210,11 @@ FUNC_NAME (wchar_t const *s) \ STRTOX (intmax_t, vwcstoimax, wcstoimax (s, &end, 0)) STRTOX (uintmax_t, vwcstoumax, wcstoumax (s, &end, 0)) -STRTOX (long double, vstrtold, C_STRTOD(s, &end)) +STRTOX (long double, vwcstold, C_STRTOD(s, &end)) /* Output a single-character \ escape. */ -static void -print_esc_char (wchar_t c) +static void print_esc_char (wchar_t c) { switch (c) { @@ -447,7 +441,7 @@ static void print_direc (const wchar_t *start, size_t length, wchar_t conversion case L'g': case L'G': { - long double arg = vstrtold (argument); + long double arg = vwcstold (argument); if (!have_field_width) { if (!have_precision) |