From: Richard Stallman Date: Tue, 20 Oct 1992 07:37:27 +0000 (+0000) Subject: (print_table, scan_table): Add support for XPG4's %S and %C formats for printing... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3c738e1ce76595c6cd939e090f6c09737c49f58;p=gcc.git (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 --- diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 9c4c1a421be..9acec10a47e 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 }