diff options
author | Richard Stallman <rms@gnu.org> | 1992-10-20 07:37:27 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-10-20 07:37:27 +0000 |
commit | d3c738e1ce76595c6cd939e090f6c09737c49f58 (patch) | |
tree | dfc08bd65ad9e179021f8e861df4500bfc10e46b | |
parent | a4c17831639675d3ead6000bfd831bd27d9ee4eb (diff) | |
download | gcc-d3c738e1ce76595c6cd939e090f6c09737c49f58.zip gcc-d3c738e1ce76595c6cd939e090f6c09737c49f58.tar.gz gcc-d3c738e1ce76595c6cd939e090f6c09737c49f58.tar.bz2 |
(print_table, scan_table): Add support for XPG4's %S and %C formats for printing/reading wide characters.
(print_table, scan_table): Add support for XPG4's %S and %C formats
for printing/reading wide characters. %lc and %ls too.
From-SVN: r2522
-rw-r--r-- | gcc/c-typeck.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 9c4c1a4..9acec10 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1273,6 +1273,7 @@ build_array_ref (array, index) #define T_LD &long_double_type_node #define T_C &char_type_node #define T_V &void_type_node +#define T_W &wchar_type_node typedef struct { @@ -1299,8 +1300,10 @@ static format_char_info print_table[] { "oxX", 0, T_UI, T_UI, T_UL, NULL, "-wp0#" }, { "u", 0, T_UI, T_UI, T_UL, NULL, "-wp0" }, { "feEgG", 0, T_D, NULL, NULL, T_LD, "-wp0 +#" }, - { "c", 0, T_I, NULL, NULL, NULL, "-w" }, - { "s", 1, T_C, NULL, NULL, NULL, "-wp" }, + { "c", 0, T_I, NULL, T_W, NULL, "-w" }, + { "C", 0, T_W, NULL, NULL, NULL, "-w" }, + { "s", 1, T_C, NULL, T_W, NULL, "-wp" }, + { "S", 1, T_W, NULL, NULL, NULL, "-wp" }, { "p", 1, T_V, NULL, NULL, NULL, "-" }, { "n", 1, T_I, T_S, T_L, NULL, "" }, { NULL } @@ -1311,7 +1314,10 @@ static format_char_info scan_table[] { "di", 1, T_I, T_S, T_L, NULL, "*" }, { "ouxX", 1, T_UI, T_US, T_UL, NULL, "*" }, { "efgEG", 1, T_F, NULL, T_D, T_LD, "*" }, - { "s[c", 1, T_C, NULL, NULL, NULL, "*" }, + { "sc", 1, T_C, NULL, T_W, NULL, "*" }, + { "[", 1, T_C, NULL, NULL, NULL, "*" }, + { "C", 1, T_W, NULL, NULL, NULL, "*" }, + { "S", 1, T_W, NULL, NULL, NULL, "*" }, { "p", 2, T_V, NULL, NULL, NULL, "*" }, { "n", 1, T_I, T_S, T_L, NULL, "" }, { NULL } |