Bug 53 - man page of "Xft" confuses 0 and NULL
Summary: man page of "Xft" confuses 0 and NULL
Status: CLOSED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xft (show other bugs)
Version: unspecified
Hardware: All All
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 09:06 UTC by Mike FABIAN
Modified: 2011-10-15 17:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Mike FABIAN 2003-03-25 09:06:58 UTC
The man page of "Xft" contains: 
 
man Xft>        XftFont * 
man Xft>        XftFontOpen (Display *dpy, int screen, ...); 
man Xft>        XftFontOpen takes a list of pattern elements of  the  form 
man Xft>        (field,  type,  value)  terminated  with a 0, matches that 
man Xft>        pattern against the available fonts and opens the matching 
man Xft>        font. 
 
i.e. the man page suggests to use 0. But on 64 bit platforms, 0 and 
NULL are not the same, therefore this causes problems and often 
crashes. I noticed this because "mlterm" used 0 instead of NULL in this 
function like written in the man page which made mlterm crash often 
on x86_64. To fix these crashes I only had to replace 0 -> NULL. 
 
The example in the man page 
 
man Xft>        Example: 
man Xft>             font   =   XftFontOpen   (dpy,  scr, 
man Xft>        XFT_FAMILY,  XftTypeString,   "charter", 
man Xft>        XFT_SIZE, XftTypeDouble, 12.0); 
 
doesn't have a terminating argument at all which is probably wrong as well.
Comment 1 Keith Packard 2003-04-19 19:16:29 UTC
Thanks for the fix
Comment 2 Jeremy Huddleston Sequoia 2011-10-01 14:12:30 UTC
Mass update: Close all bugs resolved over one year ago.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.