diff --git a/charsets/bracket.xml b/charsets/bracket.xml
index 6026949..8a15020 100644
--- a/charsets/bracket.xml
+++ b/charsets/bracket.xml
@@ -31,8 +31,13 @@
-
+
+
+
+
-
+
+
+
diff --git a/pw3270.cbp b/pw3270.cbp
index e386b88..f159284 100644
--- a/pw3270.cbp
+++ b/pw3270.cbp
@@ -14,6 +14,7 @@
+
@@ -74,6 +75,7 @@
+
diff --git a/src/include/lib3270/X11keysym.h b/src/include/lib3270/X11keysym.h
new file mode 100644
index 0000000..7c086ef
--- /dev/null
+++ b/src/include/lib3270/X11keysym.h
@@ -0,0 +1,217 @@
+/*
+ * Copyright 1999 by Paul Mattes.
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * c3270, s3270 and tcl3270 are distributed in the hope that they will
+ * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE
+ * for more details.
+ */
+
+/* X11 keysyms used by c3270, s3270 and tcl3270 */
+
+#if !defined(_x11_keysym_h) /*[*/
+#define _x11_keysym_h 1
+
+/* Latin-1 Keysyms */
+#define XK_space 0x020
+#define XK_exclam 0x021
+#define XK_quotedbl 0x022
+#define XK_numbersign 0x023
+#define XK_dollar 0x024
+#define XK_percent 0x025
+#define XK_ampersand 0x026
+#define XK_apostrophe 0x027
+#define XK_quoteright 0x027
+#define XK_parenleft 0x028
+#define XK_parenright 0x029
+#define XK_asterisk 0x02a
+#define XK_plus 0x02b
+#define XK_comma 0x02c
+#define XK_minus 0x02d
+#define XK_period 0x02e
+#define XK_slash 0x02f
+#define XK_0 0x030
+#define XK_1 0x031
+#define XK_2 0x032
+#define XK_3 0x033
+#define XK_4 0x034
+#define XK_5 0x035
+#define XK_6 0x036
+#define XK_7 0x037
+#define XK_8 0x038
+#define XK_9 0x039
+#define XK_colon 0x03a
+#define XK_semicolon 0x03b
+#define XK_less 0x03c
+#define XK_equal 0x03d
+#define XK_greater 0x03e
+#define XK_question 0x03f
+#define XK_at 0x040
+#define XK_A 0x041
+#define XK_B 0x042
+#define XK_C 0x043
+#define XK_D 0x044
+#define XK_E 0x045
+#define XK_F 0x046
+#define XK_G 0x047
+#define XK_H 0x048
+#define XK_I 0x049
+#define XK_J 0x04a
+#define XK_K 0x04b
+#define XK_L 0x04c
+#define XK_M 0x04d
+#define XK_N 0x04e
+#define XK_O 0x04f
+#define XK_P 0x050
+#define XK_Q 0x051
+#define XK_R 0x052
+#define XK_S 0x053
+#define XK_T 0x054
+#define XK_U 0x055
+#define XK_V 0x056
+#define XK_W 0x057
+#define XK_X 0x058
+#define XK_Y 0x059
+#define XK_Z 0x05a
+#define XK_bracketleft 0x05b
+#define XK_backslash 0x05c
+#define XK_bracketright 0x05d
+#define XK_asciicircum 0x05e
+#define XK_underscore 0x05f
+#define XK_grave 0x060
+#define XK_quoteleft 0x060
+#define XK_a 0x061
+#define XK_b 0x062
+#define XK_c 0x063
+#define XK_d 0x064
+#define XK_e 0x065
+#define XK_f 0x066
+#define XK_g 0x067
+#define XK_h 0x068
+#define XK_i 0x069
+#define XK_j 0x06a
+#define XK_k 0x06b
+#define XK_l 0x06c
+#define XK_m 0x06d
+#define XK_n 0x06e
+#define XK_o 0x06f
+#define XK_p 0x070
+#define XK_q 0x071
+#define XK_r 0x072
+#define XK_s 0x073
+#define XK_t 0x074
+#define XK_u 0x075
+#define XK_v 0x076
+#define XK_w 0x077
+#define XK_x 0x078
+#define XK_y 0x079
+#define XK_z 0x07a
+#define XK_braceleft 0x07b
+#define XK_bar 0x07c
+#define XK_braceright 0x07d
+#define XK_asciitilde 0x07e
+#define XK_nobreakspace 0x0a0
+#define XK_exclamdown 0x0a1
+#define XK_cent 0x0a2
+#define XK_sterling 0x0a3
+#define XK_currency 0x0a4
+#define XK_yen 0x0a5
+#define XK_brokenbar 0x0a6
+#define XK_section 0x0a7
+#define XK_diaeresis 0x0a8
+#define XK_copyright 0x0a9
+#define XK_ordfeminine 0x0aa
+#define XK_guillemotleft 0x0ab
+#define XK_notsign 0x0ac
+#define XK_hyphen 0x0ad
+#define XK_registered 0x0ae
+#define XK_macron 0x0af
+#define XK_degree 0x0b0
+#define XK_plusminus 0x0b1
+#define XK_twosuperior 0x0b2
+#define XK_threesuperior 0x0b3
+#define XK_acute 0x0b4
+#define XK_mu 0x0b5
+#define XK_paragraph 0x0b6
+#define XK_periodcentered 0x0b7
+#define XK_cedilla 0x0b8
+#define XK_onesuperior 0x0b9
+#define XK_masculine 0x0ba
+#define XK_guillemotright 0x0bb
+#define XK_onequarter 0x0bc
+#define XK_onehalf 0x0bd
+#define XK_threequarters 0x0be
+#define XK_questiondown 0x0bf
+#define XK_Agrave 0x0c0
+#define XK_Aacute 0x0c1
+#define XK_Acircumflex 0x0c2
+#define XK_Atilde 0x0c3
+#define XK_Adiaeresis 0x0c4
+#define XK_Aring 0x0c5
+#define XK_AE 0x0c6
+#define XK_Ccedilla 0x0c7
+#define XK_Egrave 0x0c8
+#define XK_Eacute 0x0c9
+#define XK_Ecircumflex 0x0ca
+#define XK_Ediaeresis 0x0cb
+#define XK_Igrave 0x0cc
+#define XK_Iacute 0x0cd
+#define XK_Icircumflex 0x0ce
+#define XK_Idiaeresis 0x0cf
+#define XK_ETH 0x0d0
+#define XK_Eth 0x0d0
+#define XK_Ntilde 0x0d1
+#define XK_Ograve 0x0d2
+#define XK_Oacute 0x0d3
+#define XK_Ocircumflex 0x0d4
+#define XK_Otilde 0x0d5
+#define XK_Odiaeresis 0x0d6
+#define XK_multiply 0x0d7
+#define XK_Ooblique 0x0d8
+#define XK_Ugrave 0x0d9
+#define XK_Uacute 0x0da
+#define XK_Ucircumflex 0x0db
+#define XK_Udiaeresis 0x0dc
+#define XK_Yacute 0x0dd
+#define XK_THORN 0x0de
+#define XK_Thorn 0x0de
+#define XK_ssharp 0x0df
+#define XK_agrave 0x0e0
+#define XK_aacute 0x0e1
+#define XK_acircumflex 0x0e2
+#define XK_atilde 0x0e3
+#define XK_adiaeresis 0x0e4
+#define XK_aring 0x0e5
+#define XK_ae 0x0e6
+#define XK_ccedilla 0x0e7
+#define XK_egrave 0x0e8
+#define XK_eacute 0x0e9
+#define XK_ecircumflex 0x0ea
+#define XK_ediaeresis 0x0eb
+#define XK_igrave 0x0ec
+#define XK_iacute 0x0ed
+#define XK_icircumflex 0x0ee
+#define XK_idiaeresis 0x0ef
+#define XK_eth 0x0f0
+#define XK_ntilde 0x0f1
+#define XK_ograve 0x0f2
+#define XK_oacute 0x0f3
+#define XK_ocircumflex 0x0f4
+#define XK_otilde 0x0f5
+#define XK_odiaeresis 0x0f6
+#define XK_division 0x0f7
+#define XK_oslash 0x0f8
+#define XK_ugrave 0x0f9
+#define XK_uacute 0x0fa
+#define XK_ucircumflex 0x0fb
+#define XK_udiaeresis 0x0fc
+#define XK_yacute 0x0fd
+#define XK_thorn 0x0fe
+#define XK_ydiaeresis 0x0ff
+
+#endif /*]*/
diff --git a/src/lib3270/X11keysym.h b/src/lib3270/X11keysym.h
deleted file mode 100644
index 7c086ef..0000000
--- a/src/lib3270/X11keysym.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright 1999 by Paul Mattes.
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * c3270, s3270 and tcl3270 are distributed in the hope that they will
- * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE
- * for more details.
- */
-
-/* X11 keysyms used by c3270, s3270 and tcl3270 */
-
-#if !defined(_x11_keysym_h) /*[*/
-#define _x11_keysym_h 1
-
-/* Latin-1 Keysyms */
-#define XK_space 0x020
-#define XK_exclam 0x021
-#define XK_quotedbl 0x022
-#define XK_numbersign 0x023
-#define XK_dollar 0x024
-#define XK_percent 0x025
-#define XK_ampersand 0x026
-#define XK_apostrophe 0x027
-#define XK_quoteright 0x027
-#define XK_parenleft 0x028
-#define XK_parenright 0x029
-#define XK_asterisk 0x02a
-#define XK_plus 0x02b
-#define XK_comma 0x02c
-#define XK_minus 0x02d
-#define XK_period 0x02e
-#define XK_slash 0x02f
-#define XK_0 0x030
-#define XK_1 0x031
-#define XK_2 0x032
-#define XK_3 0x033
-#define XK_4 0x034
-#define XK_5 0x035
-#define XK_6 0x036
-#define XK_7 0x037
-#define XK_8 0x038
-#define XK_9 0x039
-#define XK_colon 0x03a
-#define XK_semicolon 0x03b
-#define XK_less 0x03c
-#define XK_equal 0x03d
-#define XK_greater 0x03e
-#define XK_question 0x03f
-#define XK_at 0x040
-#define XK_A 0x041
-#define XK_B 0x042
-#define XK_C 0x043
-#define XK_D 0x044
-#define XK_E 0x045
-#define XK_F 0x046
-#define XK_G 0x047
-#define XK_H 0x048
-#define XK_I 0x049
-#define XK_J 0x04a
-#define XK_K 0x04b
-#define XK_L 0x04c
-#define XK_M 0x04d
-#define XK_N 0x04e
-#define XK_O 0x04f
-#define XK_P 0x050
-#define XK_Q 0x051
-#define XK_R 0x052
-#define XK_S 0x053
-#define XK_T 0x054
-#define XK_U 0x055
-#define XK_V 0x056
-#define XK_W 0x057
-#define XK_X 0x058
-#define XK_Y 0x059
-#define XK_Z 0x05a
-#define XK_bracketleft 0x05b
-#define XK_backslash 0x05c
-#define XK_bracketright 0x05d
-#define XK_asciicircum 0x05e
-#define XK_underscore 0x05f
-#define XK_grave 0x060
-#define XK_quoteleft 0x060
-#define XK_a 0x061
-#define XK_b 0x062
-#define XK_c 0x063
-#define XK_d 0x064
-#define XK_e 0x065
-#define XK_f 0x066
-#define XK_g 0x067
-#define XK_h 0x068
-#define XK_i 0x069
-#define XK_j 0x06a
-#define XK_k 0x06b
-#define XK_l 0x06c
-#define XK_m 0x06d
-#define XK_n 0x06e
-#define XK_o 0x06f
-#define XK_p 0x070
-#define XK_q 0x071
-#define XK_r 0x072
-#define XK_s 0x073
-#define XK_t 0x074
-#define XK_u 0x075
-#define XK_v 0x076
-#define XK_w 0x077
-#define XK_x 0x078
-#define XK_y 0x079
-#define XK_z 0x07a
-#define XK_braceleft 0x07b
-#define XK_bar 0x07c
-#define XK_braceright 0x07d
-#define XK_asciitilde 0x07e
-#define XK_nobreakspace 0x0a0
-#define XK_exclamdown 0x0a1
-#define XK_cent 0x0a2
-#define XK_sterling 0x0a3
-#define XK_currency 0x0a4
-#define XK_yen 0x0a5
-#define XK_brokenbar 0x0a6
-#define XK_section 0x0a7
-#define XK_diaeresis 0x0a8
-#define XK_copyright 0x0a9
-#define XK_ordfeminine 0x0aa
-#define XK_guillemotleft 0x0ab
-#define XK_notsign 0x0ac
-#define XK_hyphen 0x0ad
-#define XK_registered 0x0ae
-#define XK_macron 0x0af
-#define XK_degree 0x0b0
-#define XK_plusminus 0x0b1
-#define XK_twosuperior 0x0b2
-#define XK_threesuperior 0x0b3
-#define XK_acute 0x0b4
-#define XK_mu 0x0b5
-#define XK_paragraph 0x0b6
-#define XK_periodcentered 0x0b7
-#define XK_cedilla 0x0b8
-#define XK_onesuperior 0x0b9
-#define XK_masculine 0x0ba
-#define XK_guillemotright 0x0bb
-#define XK_onequarter 0x0bc
-#define XK_onehalf 0x0bd
-#define XK_threequarters 0x0be
-#define XK_questiondown 0x0bf
-#define XK_Agrave 0x0c0
-#define XK_Aacute 0x0c1
-#define XK_Acircumflex 0x0c2
-#define XK_Atilde 0x0c3
-#define XK_Adiaeresis 0x0c4
-#define XK_Aring 0x0c5
-#define XK_AE 0x0c6
-#define XK_Ccedilla 0x0c7
-#define XK_Egrave 0x0c8
-#define XK_Eacute 0x0c9
-#define XK_Ecircumflex 0x0ca
-#define XK_Ediaeresis 0x0cb
-#define XK_Igrave 0x0cc
-#define XK_Iacute 0x0cd
-#define XK_Icircumflex 0x0ce
-#define XK_Idiaeresis 0x0cf
-#define XK_ETH 0x0d0
-#define XK_Eth 0x0d0
-#define XK_Ntilde 0x0d1
-#define XK_Ograve 0x0d2
-#define XK_Oacute 0x0d3
-#define XK_Ocircumflex 0x0d4
-#define XK_Otilde 0x0d5
-#define XK_Odiaeresis 0x0d6
-#define XK_multiply 0x0d7
-#define XK_Ooblique 0x0d8
-#define XK_Ugrave 0x0d9
-#define XK_Uacute 0x0da
-#define XK_Ucircumflex 0x0db
-#define XK_Udiaeresis 0x0dc
-#define XK_Yacute 0x0dd
-#define XK_THORN 0x0de
-#define XK_Thorn 0x0de
-#define XK_ssharp 0x0df
-#define XK_agrave 0x0e0
-#define XK_aacute 0x0e1
-#define XK_acircumflex 0x0e2
-#define XK_atilde 0x0e3
-#define XK_adiaeresis 0x0e4
-#define XK_aring 0x0e5
-#define XK_ae 0x0e6
-#define XK_ccedilla 0x0e7
-#define XK_egrave 0x0e8
-#define XK_eacute 0x0e9
-#define XK_ecircumflex 0x0ea
-#define XK_ediaeresis 0x0eb
-#define XK_igrave 0x0ec
-#define XK_iacute 0x0ed
-#define XK_icircumflex 0x0ee
-#define XK_idiaeresis 0x0ef
-#define XK_eth 0x0f0
-#define XK_ntilde 0x0f1
-#define XK_ograve 0x0f2
-#define XK_oacute 0x0f3
-#define XK_ocircumflex 0x0f4
-#define XK_otilde 0x0f5
-#define XK_odiaeresis 0x0f6
-#define XK_division 0x0f7
-#define XK_oslash 0x0f8
-#define XK_ugrave 0x0f9
-#define XK_uacute 0x0fa
-#define XK_ucircumflex 0x0fb
-#define XK_udiaeresis 0x0fc
-#define XK_yacute 0x0fd
-#define XK_thorn 0x0fe
-#define XK_ydiaeresis 0x0ff
-
-#endif /*]*/
diff --git a/src/lib3270/charset.c b/src/lib3270/charset.c
index c7c988e..62ad497 100644
--- a/src/lib3270/charset.c
+++ b/src/lib3270/charset.c
@@ -35,7 +35,7 @@
*/
#include "private.h"
-#include "X11keysym.h"
+#include
#include
/*
diff --git a/src/pw3270/v3270/charset.c b/src/pw3270/v3270/charset.c
index 6094a59..5b4c428 100644
--- a/src/pw3270/v3270/charset.c
+++ b/src/pw3270/v3270/charset.c
@@ -31,6 +31,7 @@
#include "private.h"
#include
#include
+ #include
#define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME)
@@ -54,6 +55,222 @@
static unsigned short getChar(const gchar *id, GError **error) {
+ static struct
+ {
+ const char * name;
+ unsigned short keysym;
+ } latin[] =
+ {
+ { "space", XK_space },
+ { "exclam", XK_exclam },
+ { "quotedbl", XK_quotedbl },
+ { "numbersign", XK_numbersign },
+ { "dollar", XK_dollar },
+ { "percent", XK_percent },
+ { "ampersand", XK_ampersand },
+ { "apostrophe", XK_apostrophe },
+ { "quoteright", XK_quoteright },
+ { "parenleft", XK_parenleft },
+ { "parenright", XK_parenright },
+ { "asterisk", XK_asterisk },
+ { "plus", XK_plus },
+ { "comma", XK_comma },
+ { "minus", XK_minus },
+ { "period", XK_period },
+ { "slash", XK_slash },
+ { "0", XK_0 },
+ { "1", XK_1 },
+ { "2", XK_2 },
+ { "3", XK_3 },
+ { "4", XK_4 },
+ { "5", XK_5 },
+ { "6", XK_6 },
+ { "7", XK_7 },
+ { "8", XK_8 },
+ { "9", XK_9 },
+ { "colon", XK_colon },
+ { "semicolon", XK_semicolon },
+ { "less", XK_less },
+ { "equal", XK_equal },
+ { "greater", XK_greater },
+ { "question", XK_question },
+ { "at", XK_at },
+ { "A", XK_A },
+ { "B", XK_B },
+ { "C", XK_C },
+ { "D", XK_D },
+ { "E", XK_E },
+ { "F", XK_F },
+ { "G", XK_G },
+ { "H", XK_H },
+ { "I", XK_I },
+ { "J", XK_J },
+ { "K", XK_K },
+ { "L", XK_L },
+ { "M", XK_M },
+ { "N", XK_N },
+ { "O", XK_O },
+ { "P", XK_P },
+ { "Q", XK_Q },
+ { "R", XK_R },
+ { "S", XK_S },
+ { "T", XK_T },
+ { "U", XK_U },
+ { "V", XK_V },
+ { "W", XK_W },
+ { "X", XK_X },
+ { "Y", XK_Y },
+ { "Z", XK_Z },
+ { "bracketleft", XK_bracketleft },
+ { "backslash", XK_backslash },
+ { "bracketright", XK_bracketright },
+ { "asciicircum", XK_asciicircum },
+ { "underscore", XK_underscore },
+ { "grave", XK_grave },
+ { "quoteleft", XK_quoteleft },
+ { "a", XK_a },
+ { "b", XK_b },
+ { "c", XK_c },
+ { "d", XK_d },
+ { "e", XK_e },
+ { "f", XK_f },
+ { "g", XK_g },
+ { "h", XK_h },
+ { "i", XK_i },
+ { "j", XK_j },
+ { "k", XK_k },
+ { "l", XK_l },
+ { "m", XK_m },
+ { "n", XK_n },
+ { "o", XK_o },
+ { "p", XK_p },
+ { "q", XK_q },
+ { "r", XK_r },
+ { "s", XK_s },
+ { "t", XK_t },
+ { "u", XK_u },
+ { "v", XK_v },
+ { "w", XK_w },
+ { "x", XK_x },
+ { "y", XK_y },
+ { "z", XK_z },
+ { "braceleft", XK_braceleft },
+ { "bar", XK_bar },
+ { "braceright", XK_braceright },
+ { "asciitilde", XK_asciitilde },
+ { "nobreakspace", XK_nobreakspace },
+ { "exclamdown", XK_exclamdown },
+ { "cent", XK_cent },
+ { "sterling", XK_sterling },
+ { "currency", XK_currency },
+ { "yen", XK_yen },
+ { "brokenbar", XK_brokenbar },
+ { "section", XK_section },
+ { "diaeresis", XK_diaeresis },
+ { "copyright", XK_copyright },
+ { "ordfeminine", XK_ordfeminine },
+ { "guillemotleft", XK_guillemotleft },
+ { "notsign", XK_notsign },
+ { "hyphen", XK_hyphen },
+ { "registered", XK_registered },
+ { "macron", XK_macron },
+ { "degree", XK_degree },
+ { "plusminus", XK_plusminus },
+ { "twosuperior", XK_twosuperior },
+ { "threesuperior", XK_threesuperior },
+ { "acute", XK_acute },
+ { "mu", XK_mu },
+ { "paragraph", XK_paragraph },
+ { "periodcentered", XK_periodcentered },
+ { "cedilla", XK_cedilla },
+ { "onesuperior", XK_onesuperior },
+ { "masculine", XK_masculine },
+ { "guillemotright", XK_guillemotright },
+ { "onequarter", XK_onequarter },
+ { "onehalf", XK_onehalf },
+ { "threequarters", XK_threequarters },
+ { "questiondown", XK_questiondown },
+ { "Agrave", XK_Agrave },
+ { "Aacute", XK_Aacute },
+ { "Acircumflex", XK_Acircumflex },
+ { "Atilde", XK_Atilde },
+ { "Adiaeresis", XK_Adiaeresis },
+ { "Aring", XK_Aring },
+ { "AE", XK_AE },
+ { "Ccedilla", XK_Ccedilla },
+ { "Egrave", XK_Egrave },
+ { "Eacute", XK_Eacute },
+ { "Ecircumflex", XK_Ecircumflex },
+ { "Ediaeresis", XK_Ediaeresis },
+ { "Igrave", XK_Igrave },
+ { "Iacute", XK_Iacute },
+ { "Icircumflex", XK_Icircumflex },
+ { "Idiaeresis", XK_Idiaeresis },
+ { "ETH", XK_ETH },
+ { "Eth", XK_Eth },
+ { "Ntilde", XK_Ntilde },
+ { "Ograve", XK_Ograve },
+ { "Oacute", XK_Oacute },
+ { "Ocircumflex", XK_Ocircumflex },
+ { "Otilde", XK_Otilde },
+ { "Odiaeresis", XK_Odiaeresis },
+ { "multiply", XK_multiply },
+ { "Ooblique", XK_Ooblique },
+ { "Ugrave", XK_Ugrave },
+ { "Uacute", XK_Uacute },
+ { "Ucircumflex", XK_Ucircumflex },
+ { "Udiaeresis", XK_Udiaeresis },
+ { "Yacute", XK_Yacute },
+ { "THORN", XK_THORN },
+ { "Thorn", XK_Thorn },
+ { "ssharp", XK_ssharp },
+ { "agrave", XK_agrave },
+ { "aacute", XK_aacute },
+ { "acircumflex", XK_acircumflex },
+ { "atilde", XK_atilde },
+ { "adiaeresis", XK_adiaeresis },
+ { "aring", XK_aring },
+ { "ae", XK_ae },
+ { "ccedilla", XK_ccedilla },
+ { "egrave", XK_egrave },
+ { "eacute", XK_eacute },
+ { "ecircumflex", XK_ecircumflex },
+ { "ediaeresis", XK_ediaeresis },
+ { "igrave", XK_igrave },
+ { "iacute", XK_iacute },
+ { "icircumflex", XK_icircumflex },
+ { "idiaeresis", XK_idiaeresis },
+ { "eth", XK_eth },
+ { "ntilde", XK_ntilde },
+ { "ograve", XK_ograve },
+ { "oacute", XK_oacute },
+ { "ocircumflex", XK_ocircumflex },
+ { "otilde", XK_otilde },
+ { "odiaeresis", XK_odiaeresis },
+ { "division", XK_division },
+ { "oslash", XK_oslash },
+ { "ugrave", XK_ugrave },
+ { "uacute", XK_uacute },
+ { "ucircumflex", XK_ucircumflex },
+ { "udiaeresis", XK_udiaeresis },
+ { "yacute", XK_yacute },
+ { "thorn", XK_thorn },
+ { "ydiaeresis", XK_ydiaeresis },
+
+ // The following are, umm, hacks to allow symbolic names for
+ // control codes.
+ #if !defined(_WIN32)
+ { "BackSpace", 0x08 },
+ { "Tab", 0x09 },
+ { "Linefeed", 0x0a },
+ { "Return", 0x0d },
+ { "Escape", 0x1b },
+ { "Delete", 0x7f },
+ #endif
+ };
+
+ size_t ix;
+
if(*error) {
return 0;
}
@@ -62,15 +279,26 @@
unsigned int rc = 0;
- if(sscanf(id + 2, "%x", &rc) != 1) {
+ if(sscanf(id + 2, "%x", &rc) != 1)
+ {
*error = g_error_new(ERROR_DOMAIN,EINVAL,"%s",_( "Can't parse character value" ));
- return;
+ return 0;
}
return (unsigned short) rc;
}
+ for(ix=0;ix < G_N_ELEMENTS(latin);ix++) {
+ if(!g_ascii_strcasecmp(id,latin[ix].name))
+ return latin[ix].keysym;
+ }
+
+ if(strlen(id) != 1)
+ {
+ *error = g_error_new(ERROR_DOMAIN,EINVAL,"%s",_( "Invalid character value" ));
+ return 0;
+ }
return (unsigned short) *id;
}
--
libgit2 0.21.2