Buildbot is timing out for me right now, and I couldn’t actually reproduce
the failure locally; hopefully this will do the trick despite that.
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1294753175 0
# Node ID c9d31263ab7db633744accb5195727a4a343a3d7
# Parent b249c479f9e1d0b94f449074793e12411720aed2
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);
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches