comparison src/intl.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents fe104dbd9147
children 2c611d1463a6
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
47 void 47 void
48 init_input (CONST char *res_name, CONST char *res_class, Display *display) 48 init_input (CONST char *res_name, CONST char *res_class, Display *display)
49 { 49 {
50 XIMStyles *styles; 50 XIMStyles *styles;
51 unsigned short i; 51 unsigned short i;
52 52
53 input_method = 0; 53 input_method = 0;
54 input_method_style = 0; 54 input_method_style = 0;
55 initial_input_context = 0; 55 initial_input_context = 0;
56 input_method_event_mask = 0; 56 input_method_event_mask = 0;
57 57
58 input_method = XOpenIM (display, NULL, 58 input_method = XOpenIM (display, NULL,
59 (char *) res_name, (char *) res_class); 59 (char *) res_name, (char *) res_class);
60 60
61 if (!input_method) 61 if (!input_method)
62 { 62 {
63 stderr_out ("WARNING: XOpenIM() failed...no input server\n"); 63 stderr_out ("WARNING: XOpenIM() failed...no input server\n");
64 return; 64 return;
65 } 65 }
73 { 73 {
74 input_method_style= styles->supported_styles[i]; 74 input_method_style= styles->supported_styles[i];
75 break; 75 break;
76 } 76 }
77 } 77 }
78 78
79 if (!input_method_style) 79 if (!input_method_style)
80 { 80 {
81 stderr_out ("WARNING: Could not find suitable input style.\n"); 81 stderr_out ("WARNING: Could not find suitable input style.\n");
82 return; 82 return;
83 } 83 }
88 if (!initial_input_context) 88 if (!initial_input_context)
89 { 89 {
90 stderr_out ("WARNING: Could not create input context.\n"); 90 stderr_out ("WARNING: Could not create input context.\n");
91 return; 91 return;
92 } 92 }
93 93
94 XGetICValues (initial_input_context, 94 XGetICValues (initial_input_context,
95 XNFilterEvents, &input_method_event_mask, 95 XNFilterEvents, &input_method_event_mask,
96 NULL); 96 NULL);
97 97
98 /* Get a new atom for wide character client messages. */ 98 /* Get a new atom for wide character client messages. */
99 wc_atom = XInternAtom (display, "Wide Character Event", False); 99 wc_atom = XInternAtom (display, "Wide Character Event", False);
100 } 100 }
101 101
102 102
167 167
168 Lisp_Object Qdomain; 168 Lisp_Object Qdomain;
169 Lisp_Object Qdefer_gettext; 169 Lisp_Object Qdefer_gettext;
170 170
171 DEFUN ("ignore-defer-gettext", Fignore_defer_gettext, 1, 1, 0, /* 171 DEFUN ("ignore-defer-gettext", Fignore_defer_gettext, 1, 1, 0, /*
172 If OBJ is of the form (defer-gettext \"string\"), return the string. 172 If OBJ is of the form (defer-gettext "string"), return the string.
173 The purpose of the defer-gettext symbol is to identify strings which 173 The purpose of the defer-gettext symbol is to identify strings which
174 are translated when they are referenced instead of when they are defined. 174 are translated when they are referenced instead of when they are defined.
175 */ 175 */
176 (obj)) 176 (obj))
177 { 177 {