changeset: 5335:c9d31263ab7d
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Jan 11 13:39:35 2011 +0000
files: lwlib/ChangeLog lwlib/lwlib-fonts.c
description:
Replace POSIX index(3) with C89 strchr(3), lwlib-fonts.c
2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
* lwlib-fonts.c (xft_open_font_by_name):
Replace the POSIX index(3), not universally available even today,
with the C89 strchr(3), hopefully fixing a few of the buildbots'
problems.
diff -r b249c479f9e1 -r c9d31263ab7d lwlib/ChangeLog
--- a/lwlib/ChangeLog Mon Jan 10 20:00:57 2011 +0000
+++ b/lwlib/ChangeLog Tue Jan 11 13:39:35 2011 +0000
@@ -1,3 +1,10 @@
+2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lwlib-fonts.c (xft_open_font_by_name):
+ Replace the POSIX index(3), not universally available even today,
+ with the C89 strchr(3), hopefully fixing a few of the buildbots'
+ problems.
+
2010-06-13 Stephen J. Turnbull <stephen(a)xemacs.org>
* lwlib-internal.h: Correct FSF address in permission notice.
diff -r b249c479f9e1 -r c9d31263ab7d lwlib/lwlib-fonts.c
--- a/lwlib/lwlib-fonts.c Mon Jan 10 20:00:57 2011 +0000
+++ b/lwlib/lwlib-fonts.c Tue Jan 11 13:39:35 2011 +0000
@@ -76,7 +76,7 @@
int count = 0;
char *pos = name;
/* extra parens shut up gcc */
- while ((pos = index (pos, '-')))
+ while ((pos = strchr (pos, '-')))
{
count++;
pos++;
@@ -86,7 +86,7 @@
if (count == 14 /* fully-qualified XLFD */
|| (count < 14 /* heuristic for wildcarded XLFD */
&& count >= 5
- && index (name, '*')))
+ && strchr (name, '*')))
res = XftFontOpenXlfd (dpy, DefaultScreen (dpy), name);
else
res = XftFontOpenName (dpy, DefaultScreen (dpy), name);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches