X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Finput-method-xlib.c;h=8a1f3cad6c42db5709c878ea128c68a0e1e3d533;hb=f001c704c4a90951c27152ac57907608c8c553c1;hp=db564bb5791e130ba8556dd0774f1e32ada618bf;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git.1 diff --git a/src/input-method-xlib.c b/src/input-method-xlib.c index db564bb..8a1f3ca 100644 --- a/src/input-method-xlib.c +++ b/src/input-method-xlib.c @@ -80,8 +80,8 @@ Boston, MA 02111-1307, USA. */ #include "EmacsFrame.h" #include "events.h" -#ifndef XIM_XLIB -#error XIM_XLIB is not defined?? +#if !defined (XIM_XLIB) && !defined (USE_XFONTSET) +#error neither XIM_XLIB nor USE_XFONTSET is defined?? #endif Lisp_Object Qxim_xlib; @@ -89,6 +89,7 @@ Lisp_Object Qxim_xlib; #define xim_warn1(fmt, str) warn_when_safe (Qxim_xlib, Qwarning, fmt, str); #define xim_info(str) warn_when_safe (Qxim_xlib, Qinfo, str); +#ifdef XIM_XLIB /* XIM_XLIB specific */ /* Get/Set IC values for just one attribute */ #ifdef DEBUG_XEMACS #define XIC_Value(Get_Set, xic, name, attr, value) \ @@ -120,6 +121,7 @@ static char DefaultXIMStyles[] = "XIMPreeditNone|XIMStatusNone"; static XIMStyle best_style (XIMStyles *user, XIMStyles *xim); +#endif /* XIM_XLIB only */ /* This function is documented, but no prototype in the header files */ EXTERN_C char * XSetIMValues(XIM, ...); @@ -175,6 +177,8 @@ Initialize_Locale (void) } } +#ifdef XIM_XLIB /* starting XIM specific codes */ + /* Callbacks for IM are supported from X11R6 or later. */ #ifdef HAVE_XREGISTERIMINSTANTIATECALLBACK @@ -422,13 +426,18 @@ XIM_init_frame (struct frame *f) void XIM_SetGeometry (struct frame *f) { - XIC xic = FRAME_X_XIC (f); - XIMStyle style = FRAME_X_XIC_STYLE (f); + XIC xic; + XIMStyle style; XRectangle area; - if (!xic || !f) + if (!f) + return; + + xic = FRAME_X_XIC (f); + if (!xic) return; + style = FRAME_X_XIC_STYLE (f); if (style & XIMStatusArea) { /* Place Status Area in bottom right corner */ @@ -552,7 +561,7 @@ retry: case XLookupChars: break; default: - abort (); + ABORT (); } new_event.type = ClientMessage; @@ -1113,6 +1122,7 @@ Unit_Test (struct frame *f, char * s) } } #endif +#endif /* XIM_XLIB only */ #if 0 /* Get a fontset for IM to use */