changeset 3097:859a2346db99

[xemacs-hg @ 2005-11-26 18:24:51 by stephent] Build fixes. <87hd9z2rge.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Sat, 26 Nov 2005 18:25:03 +0000
parents 5694c986bd92
children ceb34344c827
files ChangeLog configure configure.ac src/ChangeLog src/objects-x.c src/xft-fonts.c
diffstat 6 files changed, 41 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Nov 26 13:20:23 2005 +0000
+++ b/ChangeLog	Sat Nov 26 18:25:03 2005 +0000
@@ -1,3 +1,8 @@
+2005-11-27  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* configure.ac (XE_COMPLEX_ARG[xft]): Remove merge detritus and
+	regenerate configure to fix syntax error.
+
 2005-11-26  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	Merge Xft.
--- a/configure	Sat Nov 26 13:20:23 2005 +0000
+++ b/configure	Sat Nov 26 18:25:03 2005 +0000
@@ -2340,7 +2340,6 @@
 
 
 fi;
-	, )
 # If --with-gtk or --without-gtk were given then copy the value to the
 # equivalent enable_gtk variable.
 if test "${with_gtk+set}" = set; then
--- a/configure.ac	Sat Nov 26 13:20:23 2005 +0000
+++ b/configure.ac	Sat Nov 26 18:25:03 2005 +0000
@@ -643,7 +643,6 @@
 	XE_COMPLEX_OPTION([menubars],[yes]),
 	XE_COMPLEX_OPTION([tabs],[yes]),
 	XE_COMPLEX_OPTION([gauges],[yes])])
-	[], [])
 XE_MERGED_ARG([gtk],
 	AC_HELP_STRING([--with-gtk],[Support GTK on the X Window System. (EXPERIMENTAL)]),
 	[true], [with_gtk=no])
--- a/src/ChangeLog	Sat Nov 26 13:20:23 2005 +0000
+++ b/src/ChangeLog	Sat Nov 26 18:25:03 2005 +0000
@@ -1,3 +1,14 @@
+2005-11-27  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	Build fixes and dead code removal.
+	
+	* xft-fonts.c (Ffc_pattern_destroy): Delete.
+	(syms_of_xft_fonts): Delete Ffc_pattern_destroy and comment out
+	Fxft_name_unparse.
+
+	* objects-x.c (DECLARE_DEBUG_FONTNAME): Renamed improved
+	SET_DEBUG_FONTNAME.  Remove redundant debug level checks.
+
 2004-12-19  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* keymap.c (Fwhere_is_internal): Rewrite docstring.
--- a/src/objects-x.c	Sat Nov 26 13:20:23 2005 +0000
+++ b/src/objects-x.c	Sat Nov 26 18:25:03 2005 +0000
@@ -1155,11 +1155,14 @@
 
 /* Choose appropriate font name for debug messages.
    Use only in the top half of next function (enforced with #undef). */
-#define SET_DEBUG_FONTNAME(name)                                     \
-  do { name =                                                        \
-         debug_xft > 2 ? eistr_fullname                              \
-                       : debug_xft > 1 ? eistr_longname              \
-                                       : eistr_shortname } while (0)
+#define DECLARE_DEBUG_FONTNAME(__xemacs_name)          \
+  Eistring *__xemacs_name;                             \
+  do                                                   \
+    {	       					       \
+      __xemacs_name = debug_xft > 2 ? eistr_fullname   \
+                      : debug_xft > 1 ? eistr_longname \
+                      : eistr_shortname;               \
+    } while (0)
 
 #endif /* USE_XFT */
 
@@ -1302,11 +1305,8 @@
 
       if (cr->rfc3066)
 	{
-	  if (debug_xft > 0)
-	    {
-	      SET_DEBUG_FONTNAME (name);
-	      CHECKING_LANG (0, eidata(name), cr->language);
-	    }
+	  DECLARE_DEBUG_FONTNAME (name);
+	  CHECKING_LANG (0, eidata(name), cr->language);
 	  lang = cr->rfc3066;
 	}
       else if (cr->charset)
@@ -1348,12 +1348,9 @@
 		 should have the full thing internally as truename, and
 		 filter stuff the client doesn't want to see on output.
 		 Should we just store it into the truename right here? */
-	      if (debug_xft > 0)
-		{
-		  SET_DEBUG_FONTNAME (name);
-		  DEBUG_XFT2 (0, "Xft font %s supports %s\n",
-			      eidata(name), lang);
-		}
+	      DECLARE_DEBUG_FONTNAME (name);
+	      DEBUG_XFT2 (0, "Xft font %s supports %s\n",
+			  eidata(name), lang);
 #ifdef RETURN_LONG_FONTCONFIG_NAMES
 	      result = eimake_string(eistr_fullname);
 #else
@@ -1362,12 +1359,9 @@
 	    }
 	  else
 	    {
-	      if (debug_xft > 0)
-		{
-		  SET_DEBUG_FONTNAME (name);
-		  DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n",
-			      eidata(name), lang);
-		}
+	      DECLARE_DEBUG_FONTNAME (name);
+	      DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n",
+			  eidata(name), lang);
 	      result = Qnil;
 	    }
 
@@ -1394,12 +1388,9 @@
 		}
 	      else if (FcLangSetHasLang (v.u.l, lang) != FcLangDifferentLang)
 		{
-		  if (debug_xft > 0)
-		    {
-		      SET_DEBUG_FONTNAME (name);
-		      DEBUG_XFT2 (0, "Xft font %s supports %s\n",
-				  eidata(name), lang);
-		    }
+		  DECLARE_DEBUG_FONTNAME (name);
+		  DEBUG_XFT2 (0, "Xft font %s supports %s\n",
+			      eidata(name), lang);
 #ifdef RETURN_LONG_FONTCONFIG_NAMES
 		  result = eimake_string(eistr_fullname);
 #else
@@ -1408,12 +1399,9 @@
 		}
 	      else
 		{
-		  if (debug_xft > 0)
-		    {
-		      SET_DEBUG_FONTNAME (name);
-		      DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n",
-				  eidata(name), lang);
-		    }
+		  DECLARE_DEBUG_FONTNAME (name);
+		  DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n",
+			      eidata(name), lang);
 		  result = Qnil;
 		}
 	    }
@@ -1434,7 +1422,7 @@
 
   DEBUG_XFT1 (0, "shit happens, try X11 charset match for %s\n", 
 	      XSTRING_DATA(font));
-#undef SET_DEBUG_FONTNAME
+#undef DECLARE_DEBUG_FONTNAME
 #endif /* USE_XFT */
 
   LISP_STRING_TO_EXTERNAL (font, patternext, Qx_font_name_encoding);
--- a/src/xft-fonts.c	Sat Nov 26 13:20:23 2005 +0000
+++ b/src/xft-fonts.c	Sat Nov 26 18:25:03 2005 +0000
@@ -463,25 +463,6 @@
     }
 }
 
-#if 0
-/* #### delete this after some testing!! don't forget the DEFSUBR */
-/* #### This is a big mistake, no? --- crap, there's no implicit finalizer */
-DEFUN("fc-pattern-destroy", Ffc_pattern_destroy, 1, 1, 0, /*
-Explicitly deallocate a fc pattern object PATTERN. */
-      (pattern))
-{
-  CHECK_FCPATTERN(pattern); 
-
-  /* paranoia strikes deep */
-  if (XFCPATTERN_PTR(pattern))
-    {
-      FcPatternDestroy(XFCPATTERN_PTR(pattern));
-      XFCPATTERN_PTR(pattern) = 0;
-    }
-  return Qnil;
-}
-#endif
-
 DEFUN("fc-font-match", Ffc_font_match, 2, 2, 0, /*
 Return the font on DEVICE that most closely matches PATTERN.
 
@@ -785,14 +766,13 @@
   DEFSUBR(Ffc_pattern_create);
   DEFSUBR(Ffc_name_parse);
   DEFSUBR(Ffc_name_unparse);
+#if 0
   DEFSUBR(Fxft_name_unparse);	/* URK! */
+#endif
   DEFSUBR(Ffc_pattern_duplicate);
   DEFSUBR(Ffc_pattern_add);
   DEFSUBR(Ffc_pattern_del);
   DEFSUBR(Ffc_pattern_get);
-#if 0
-  DEFSUBR(Ffc_pattern_destroy);
-#endif
   DEFSUBR(Ffc_list_fonts_pattern_objects);
   DEFSUBR(Ffc_font_sort);
   DEFSUBR(Ffc_font_match);