User: aidan
Date: 05/12/24 18:33:37
Modified: xemacs/src ChangeLog objects-gtk.c objects-x.c
Log:
Move the XListFonts maxnames param to INT_MAX from 5000
Revision Changes Path
1.912 +6 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.911
retrieving revision 1.912
diff -u -p -r1.911 -r1.912
--- ChangeLog 2005/12/23 15:08:13 1.911
+++ ChangeLog 2005/12/24 17:33:31 1.912
@@ -1,3 +1,9 @@
+2005-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * objects-gtk.c (MAX_FONT_COUNT):
+ * objects-x.c (MAX_FONT_COUNT): Increase MAX_FONT_COUNT from 5000
+ to INT_MAX. Applies to both the X and GTK platforms.
+
2005-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* objects-x.c (x_find_charset_font): More mule-ization.
1.17 +1 -5 XEmacs/xemacs/src/objects-gtk.c
Index: objects-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-gtk.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- objects-gtk.c 2005/01/28 02:58:51 1.16
+++ objects-gtk.c 2005/12/24 17:33:34 1.17
@@ -485,8 +485,7 @@ vars_of_objects_gtk (void)
/* X Specific stuff */
#include <X11/Xatom.h>
-/* Unbounded, for sufficiently small values of infinity... */
-#define MAX_FONT_COUNT 5000
+#define MAX_FONT_COUNT INT_MAX
#ifdef MULE
/* find a font spec that matches font spec FONT and also matches
@@ -536,9 +535,6 @@ gtk_find_charset_font (Lisp_Object devic
return result;
}
#endif /* MULE */
-
-/* Unbounded, for sufficiently small values of infinity... */
-#define MAX_FONT_COUNT 5000
static int
valid_font_name_p (Display *dpy, char *name)
1.34 +6 -6 XEmacs/xemacs/src/objects-x.c
Index: objects-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-x.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- objects-x.c 2005/12/23 15:08:14 1.33
+++ objects-x.c 2005/12/24 17:33:34 1.34
@@ -693,8 +693,9 @@ truename_via_random_props (Display *dpy,
return result;
}
-/* Unbounded, for sufficiently small values of infinity... */
-#define MAX_FONT_COUNT 5000
+/* XListFonts doesn't allocate memory unconditionally based on this. (For
+ XFree86 in 2005, at least. */
+#define MAX_FONT_COUNT INT_MAX
static Extbyte *
truename_via_XListFonts (Display *dpy, Extbyte *font_name)
@@ -807,8 +808,7 @@ x_font_instance_truename (Lisp_Font_Inst
FcChar8 *res = FcNameUnparse (FONT_INSTANCE_X_XFTFONT (f)->pattern);
if (res)
{
- FONT_INSTANCE_TRUENAME (f) =
- build_ext_string (res, Qxft_font_name_encoding);
+ FONT_INSTANCE_TRUENAME (f) = make_string (res, strlen (res));
free (res);
return FONT_INSTANCE_TRUENAME (f);
}
@@ -1176,7 +1176,7 @@ x_find_charset_font (Lisp_Object device,
Extbyte **names;
int count = 0;
const Extbyte *patternext;
- Lisp_Object result = Qnil;
+ Lisp_Object result = Qunbound;
int i;
/* #### with Xft need to handle second stage here -- sjt
@@ -1442,7 +1442,7 @@ x_find_charset_font (Lisp_Object device,
if (x_font_spec_matches_charset (XDEVICE (device), charset,
intname, Qnil, 0, -1, 0))
{
- result = build_ext_string (intname, Qx_font_name_encoding);
+ result = make_string (intname, intlen);
break;
}
}
Show replies by date