diff src/input-method-xlib.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents 183866b06e0b
children e38acbeb1cae
line wrap: on
line diff
--- a/src/input-method-xlib.c	Fri Mar 08 13:33:14 2002 +0000
+++ b/src/input-method-xlib.c	Wed Mar 13 08:54:06 2002 +0000
@@ -84,12 +84,8 @@
 #error  neither XIM_XLIB nor USE_XFONTSET is defined??
 #endif
 
-Lisp_Object Qxim_xlib;
-#define xim_warn(str) warn_when_safe (Qxim_xlib, Qwarning, str);
-#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 */
 
-#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)			\
@@ -121,62 +117,12 @@
 "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, ...);
 
-void
-Initialize_Locale (void)
-{
-  char *locale;
-
-  /* dverna - Nov. 98: #### DON'T DO THIS !!! The default XtLanguageProc
-     routine calls setlocale(LC_ALL, lang) which fucks up our lower-level
-     locale management, and especially the value of LC_NUMERIC. Anyway, since
-     at this point, we don't know yet whether we're gonna need an X11 frame,
-     we should really do it manually and not use Xlib's dumb default routine */
-  /*XtSetLanguageProc (NULL, (XtLanguageProc) NULL, NULL);*/
-  if ((locale = setlocale (LC_ALL, "")) == NULL)
-    {
-      xim_warn ("Can't set locale.\n"
-		"Using C locale instead.\n");
-      putenv ("LANG=C");
-      putenv ("LC_ALL=C");
-      if ((locale = setlocale (LC_ALL, "C")) == NULL)
-	{
-	  xim_warn ("Can't even set locale to `C'!\n");
-	  return;
-	}
-    }
-
-  if (!XSupportsLocale ())
-    {
-      xim_warn1 ("X Windows does not support locale `%s'\n"
-		 "Using C Locale instead\n", locale);
-      putenv ("LANG=C");
-      putenv ("LC_ALL=C");
-      if ((locale = setlocale (LC_ALL, "C")) == NULL)
-	{
-	  xim_warn ("Can't even set locale to `C'!\n");
-	  return;
-	}
-      if (!XSupportsLocale ())
-        {
-          xim_warn ("X Windows does not even support locale `C'!\n");
-          return;
-        }
-    }
-
-  setlocale(LC_NUMERIC, "C");
-
-  if (XSetLocaleModifiers ("") == NULL)
-    {
-      xim_warn ("XSetLocaleModifiers(\"\") failed\n"
-		"Check the value of the XMODIFIERS environment variable.\n");
-    }
-}
-
 #ifdef XIM_XLIB /* starting XIM specific codes */
 
 /* Callbacks for IM are supported from X11R6 or later. */
@@ -273,7 +219,7 @@
   DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class);
   if (xim == NULL)
     {
-      xim_warn ("XOpenIM() failed...no input server available\n");
+      xintl_warn ("XOpenIM() failed...no input server available\n");
       return;
     }
   else
@@ -363,7 +309,7 @@
 			     NULL, 0);
   if (!xic_vars.fontset)
     {
-      xim_warn ("Can't get fontset resource for Input Method\n");
+      xintl_warn ("Can't get fontset resource for Input Method\n");
       FRAME_X_XIC (f) = NULL;
       return;
     }
@@ -401,7 +347,7 @@
 
   if (!xic)
     {
-      xim_warn ("Warning: XCreateIC failed.\n");
+      xintl_warn ("Warning: XCreateIC failed.\n");
       return;
     }
 
@@ -850,7 +796,6 @@
 void
 syms_of_input_method_xlib (void)
 {
-  DEFSYMBOL (Qxim_xlib);
 #if 0 /* see above */
   DEFSUBR (Fx_open_xim);
   DEFSUBR (Fx_close_xim);