#define abs(x) ((x) < 0 ? -(x) : (x))
/* Default to using XIM if available. */
+#ifdef USE_XIM
int use_xim = 1;
+#else
+int use_xim = 0; /* configure --without-xim */
+#endif
+
\f
/* Non-nil means Emacs uses toolkit scroll bars. */
{
struct x_display_info *dpyinfo;
struct input_event bufp[10];
- struct input_event *bufpp = bufp;
+ struct input_event *bufpp;
int numchars = 10;
int finish = X_EVENT_NORMAL;
+ for (bufpp = bufp; bufpp != bufp + 10; bufpp++)
+ EVENT_INIT (*bufpp);
+ bufpp = bufp;
+
for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
if (dpyinfo->display == display)
break;
XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
resource_name, EMACS_CLASS,
xim_instantiate_callback,
- /* Fixme: This is XPointer in
- XFree86 but (XPointer *) on
- Tru64, at least. */
+ /* This is XPointer in XFree86
+ but (XPointer *) on Tru64, at
+ least, hence the configure test. */
(XPointer) xim_inst);
#else /* not HAVE_X11R6_XIM */
dpyinfo->xim = NULL;
build_string ("useXIM"),
build_string ("UseXIM"),
Qnil, Qnil);
+#ifdef USE_XIM
if (STRINGP (value)
&& (!strcmp (XSTRING (value)->data, "false")
|| !strcmp (XSTRING (value)->data, "off")))
use_xim = 0;
+#else
+ if (STRINGP (value)
+ && (!strcmp (XSTRING (value)->data, "true")
+ || !strcmp (XSTRING (value)->data, "on")))
+ use_xim = 1;
+#endif
}
UNBLOCK_INPUT;