Janitor: Correct make distcheck and sparse warnings.

  Use only one toplevel .gitignore file.

  It was tempting to also modify the code to not, first check if
xrender is >= 0.8.2, and then, if failing, check for libXrender
functions with different build options, but left as is, as it
could be somehow useful at least as an example of being backwards
compatible.
parent cb80b449
.deps
.libs
Makefile Makefile
Makefile.in Makefile.in
aclocal.m4 aclocal.m4
...@@ -20,3 +22,11 @@ stamp-h1 ...@@ -20,3 +22,11 @@ stamp-h1
xft-config xft-config
xft.pc xft.pc
*~ *~
*.o
*.la
*.lo
*.1
*.3
libXft-*.tar.*
ChangeLog
tags
...@@ -28,14 +28,12 @@ pkgconfig_DATA = xft.pc ...@@ -28,14 +28,12 @@ pkgconfig_DATA = xft.pc
CLEANFILES = xft-config CLEANFILES = xft-config
EXTRA_DIST = xft-config.in xft.pc.in autogen.sh EXTRA_DIST = xft-config.in xft.pc.in ChangeLog
EXTRA_DIST += ChangeLog
MAINTAINERCLEANFILES = ChangeLog MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog .PHONY: ChangeLog
ChangeLog: ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) $(CHANGELOG_CMD)
dist-hook: ChangeLog dist-hook: ChangeLog
...@@ -36,11 +36,15 @@ AC_CONFIG_AUX_DIR(.) ...@@ -36,11 +36,15 @@ AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.2)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
# checks for progs # checks for progs
AC_PROG_CC AC_PROG_CC
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
XORG_CWARNFLAGS
# #
# Check for Xrender # Check for Xrender
...@@ -128,16 +132,8 @@ if test "$VERSION" = "" ; then ...@@ -128,16 +132,8 @@ if test "$VERSION" = "" ; then
VERSION=$PACKAGE_VERSION; VERSION=$PACKAGE_VERSION;
fi fi
WARN_CFLAGS=""
if test "x$GCC" = "xyes"; then
WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wnested-externs -fno-strict-aliasing"
fi
AC_SUBST(WARN_CFLAGS)
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG
AC_OUTPUT([Makefile AC_OUTPUT([Makefile
xft.pc xft.pc
......
Makefile
Makefile.in
Xft.3
xft-config.1
.deps
.libs
Makefile
Makefile.in
*.la
*.lo
AM_CFLAGS = $(FONTCONFIG_CFLAGS) $(FREETYPE_CFLAGS) $(XRENDER_CFLAGS) \ AM_CFLAGS = $(FONTCONFIG_CFLAGS) $(FREETYPE_CFLAGS) $(XRENDER_CFLAGS) \
$(WARN_CFLAGS) -I$(top_srcdir)/include/X11/Xft $(CWARNFLAGS) -I$(top_srcdir)/include/X11/Xft
lib_LTLIBRARIES = libXft.la lib_LTLIBRARIES = libXft.la
......
...@@ -997,7 +997,7 @@ XftGlyphCore (XftDraw *draw, ...@@ -997,7 +997,7 @@ XftGlyphCore (XftDraw *draw,
else else
{ {
draw->core.use_pixmap--; draw->core.use_pixmap--;
image = 0; image = NULL;
} }
if (!image && (depth = XftDrawDepth (draw))) if (!image && (depth = XftDrawDepth (draw)))
{ {
...@@ -1153,7 +1153,7 @@ XftGlyphSpecCore (XftDraw *draw, ...@@ -1153,7 +1153,7 @@ XftGlyphSpecCore (XftDraw *draw,
else else
{ {
draw->core.use_pixmap--; draw->core.use_pixmap--;
image = 0; image = NULL;
} }
if (!image && (depth = XftDrawDepth (draw))) if (!image && (depth = XftDrawDepth (draw)))
{ {
...@@ -1304,7 +1304,7 @@ XftGlyphFontSpecCore (XftDraw *draw, ...@@ -1304,7 +1304,7 @@ XftGlyphFontSpecCore (XftDraw *draw,
else else
{ {
draw->core.use_pixmap--; draw->core.use_pixmap--;
image = 0; image = NULL;
} }
if (!image && (depth = XftDrawDepth (draw))) if (!image && (depth = XftDrawDepth (draw)))
{ {
......
...@@ -83,7 +83,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary) ...@@ -83,7 +83,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
} }
} }
if (!createIfNecessary) if (!createIfNecessary)
return 0; return NULL;
info = (XftDisplayInfo *) malloc (sizeof (XftDisplayInfo)); info = (XftDisplayInfo *) malloc (sizeof (XftDisplayInfo));
if (!info) if (!info)
...@@ -94,10 +94,10 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary) ...@@ -94,10 +94,10 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
(void) XESetCloseDisplay (dpy, info->codes->extension, _XftCloseDisplay); (void) XESetCloseDisplay (dpy, info->codes->extension, _XftCloseDisplay);
info->display = dpy; info->display = dpy;
info->defaults = 0; info->defaults = NULL;
info->solidFormat = 0; info->solidFormat = NULL;
info->hasRender = (XRenderQueryExtension (dpy, &event_base, &error_base) && info->hasRender = (XRenderQueryExtension (dpy, &event_base, &error_base) &&
(XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0)); (XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != NULL));
info->use_free_glyphs = FcTrue; info->use_free_glyphs = FcTrue;
if (info->hasRender) if (info->hasRender)
{ {
...@@ -155,12 +155,12 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary) ...@@ -155,12 +155,12 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
info->colors[i].screen = -1; info->colors[i].screen = -1;
info->colors[i].pict = 0; info->colors[i].pict = 0;
} }
info->fonts = 0; info->fonts = NULL;
info->next = _XftDisplayInfo; info->next = _XftDisplayInfo;
_XftDisplayInfo = info; _XftDisplayInfo = info;
info->glyph_memory = 0; info->glyph_memory = NULL;
info->max_glyph_memory = XftDefaultGetInteger (dpy, info->max_glyph_memory = XftDefaultGetInteger (dpy,
XFT_MAX_GLYPH_MEMORY, 0, XFT_MAX_GLYPH_MEMORY, 0,
XFT_DPY_MAX_GLYPH_MEMORY); XFT_DPY_MAX_GLYPH_MEMORY);
...@@ -185,7 +185,7 @@ bail0: ...@@ -185,7 +185,7 @@ bail0:
{ {
printf ("XftDisplayInfoGet failed to initialize, Xft unhappy\n"); printf ("XftDisplayInfoGet failed to initialize, Xft unhappy\n");
} }
return 0; return NULL;
} }
/* /*
...@@ -393,7 +393,7 @@ _XftDefaultInit (Display *dpy) ...@@ -393,7 +393,7 @@ _XftDefaultInit (Display *dpy)
bail1: bail1:
FcPatternDestroy (pat); FcPatternDestroy (pat);
bail0: bail0:
return 0; return NULL;
} }
static FcResult static FcResult
......
...@@ -134,7 +134,7 @@ XftDrawCreate (Display *dpy, ...@@ -134,7 +134,7 @@ XftDrawCreate (Display *dpy,
draw = (XftDraw *) malloc (sizeof (XftDraw)); draw = (XftDraw *) malloc (sizeof (XftDraw));
if (!draw) if (!draw)
return 0; return NULL;
draw->dpy = dpy; draw->dpy = dpy;
draw->drawable = drawable; draw->drawable = drawable;
...@@ -144,7 +144,7 @@ XftDrawCreate (Display *dpy, ...@@ -144,7 +144,7 @@ XftDrawCreate (Display *dpy,
draw->visual = visual; draw->visual = visual;
draw->colormap = colormap; draw->colormap = colormap;
draw->render.pict = 0; draw->render.pict = 0;
draw->core.gc = 0; draw->core.gc = NULL;
draw->core.use_pixmap = 0; draw->core.use_pixmap = 0;
draw->clip_type = XftClipTypeNone; draw->clip_type = XftClipTypeNone;
draw->subwindow_mode = ClipByChildren; draw->subwindow_mode = ClipByChildren;
...@@ -160,16 +160,16 @@ XftDrawCreateBitmap (Display *dpy, ...@@ -160,16 +160,16 @@ XftDrawCreateBitmap (Display *dpy,
draw = (XftDraw *) malloc (sizeof (XftDraw)); draw = (XftDraw *) malloc (sizeof (XftDraw));
if (!draw) if (!draw)
return 0; return NULL;
draw->dpy = dpy; draw->dpy = dpy;
draw->drawable = (Drawable) bitmap; draw->drawable = (Drawable) bitmap;
draw->screen = _XftDrawScreen (dpy, bitmap, 0); draw->screen = _XftDrawScreen (dpy, bitmap, NULL);
draw->depth = 1; draw->depth = 1;
draw->bits_per_pixel = 1; draw->bits_per_pixel = 1;
draw->visual = 0; draw->visual = NULL;
draw->colormap = 0; draw->colormap = 0;
draw->render.pict = 0; draw->render.pict = 0;
draw->core.gc = 0; draw->core.gc = NULL;
draw->core.use_pixmap = 0; draw->core.use_pixmap = 0;
draw->clip_type = XftClipTypeNone; draw->clip_type = XftClipTypeNone;
draw->subwindow_mode = ClipByChildren; draw->subwindow_mode = ClipByChildren;
...@@ -186,16 +186,16 @@ XftDrawCreateAlpha (Display *dpy, ...@@ -186,16 +186,16 @@ XftDrawCreateAlpha (Display *dpy,
draw = (XftDraw *) malloc (sizeof (XftDraw)); draw = (XftDraw *) malloc (sizeof (XftDraw));
if (!draw) if (!draw)
return 0; return NULL;
draw->dpy = dpy; draw->dpy = dpy;
draw->drawable = (Drawable) pixmap; draw->drawable = (Drawable) pixmap;
draw->screen = _XftDrawScreen (dpy, pixmap, 0); draw->screen = _XftDrawScreen (dpy, pixmap, NULL);
draw->depth = depth; draw->depth = depth;
draw->bits_per_pixel = 0; /* don't find out until we need it */ draw->bits_per_pixel = 0; /* don't find out until we need it */
draw->visual = 0; draw->visual = NULL;
draw->colormap = 0; draw->colormap = 0;
draw->render.pict = 0; draw->render.pict = 0;
draw->core.gc = 0; draw->core.gc = NULL;
draw->core.use_pixmap = 0; draw->core.use_pixmap = 0;
draw->clip_type = XftClipTypeNone; draw->clip_type = XftClipTypeNone;
draw->subwindow_mode = ClipByChildren; draw->subwindow_mode = ClipByChildren;
...@@ -209,9 +209,9 @@ _XftDrawFormat (XftDraw *draw) ...@@ -209,9 +209,9 @@ _XftDrawFormat (XftDraw *draw)
XftDisplayInfo *info = _XftDisplayInfoGet (draw->dpy, True); XftDisplayInfo *info = _XftDisplayInfoGet (draw->dpy, True);
if (!info || !info->hasRender) if (!info || !info->hasRender)
return 0; return NULL;
if (draw->visual == 0) if (draw->visual == NULL)
{ {
XRenderPictFormat pf; XRenderPictFormat pf;
...@@ -244,7 +244,7 @@ XftDrawChange (XftDraw *draw, ...@@ -244,7 +244,7 @@ XftDrawChange (XftDraw *draw,
if (draw->core.gc) if (draw->core.gc)
{ {
XFreeGC (draw->dpy, draw->core.gc); XFreeGC (draw->dpy, draw->core.gc);
draw->core.gc = 0; draw->core.gc = NULL;
} }
} }
...@@ -818,7 +818,7 @@ _X_EXPORT Bool ...@@ -818,7 +818,7 @@ _X_EXPORT Bool
XftDrawSetClip (XftDraw *draw, XftDrawSetClip (XftDraw *draw,
Region r) Region r)
{ {
Region n = 0; Region n = NULL;
/* /*
* Check for quick exits * Check for quick exits
...@@ -907,7 +907,7 @@ XftDrawSetClipRectangles (XftDraw *draw, ...@@ -907,7 +907,7 @@ XftDrawSetClipRectangles (XftDraw *draw,
_Xconst XRectangle *rects, _Xconst XRectangle *rects,
int n) int n)
{ {
XftClipRect *new = 0; XftClipRect *new = NULL;
/* /*
* Check for quick exit * Check for quick exit
......
...@@ -53,7 +53,7 @@ XftGlyphExtents (Display *dpy, ...@@ -53,7 +53,7 @@ XftGlyphExtents (Display *dpy,
XftFontLoadGlyphs (dpy, pub, FcFalse, missing, nmissing); XftFontLoadGlyphs (dpy, pub, FcFalse, missing, nmissing);
g = glyphs; g = glyphs;
n = nglyphs; n = nglyphs;
xftg = 0; xftg = NULL;
while (n) while (n)
{ {
glyph = *g++; glyph = *g++;
......
...@@ -31,19 +31,19 @@ XftFontMatch (Display *dpy, ...@@ -31,19 +31,19 @@ XftFontMatch (Display *dpy,
FcPattern *new; FcPattern *new;
FcPattern *match; FcPattern *match;
if (!XftInit (0)) if (!XftInit (NULL))
return 0; return NULL;
new = FcPatternDuplicate (pattern); new = FcPatternDuplicate (pattern);
if (!new) if (!new)
return 0; return NULL;
if (XftDebug () & XFT_DBG_OPENV) if (XftDebug () & XFT_DBG_OPENV)
{ {
printf ("XftFontMatch pattern "); printf ("XftFontMatch pattern ");
FcPatternPrint (new); FcPatternPrint (new);
} }
FcConfigSubstitute (0, new, FcMatchPattern); FcConfigSubstitute (NULL, new, FcMatchPattern);
if (XftDebug () & XFT_DBG_OPENV) if (XftDebug () & XFT_DBG_OPENV)
{ {
printf ("XftFontMatch after FcConfig substitutions "); printf ("XftFontMatch after FcConfig substitutions ");
...@@ -55,8 +55,8 @@ XftFontMatch (Display *dpy, ...@@ -55,8 +55,8 @@ XftFontMatch (Display *dpy,
printf ("XftFontMatch after X resource substitutions "); printf ("XftFontMatch after X resource substitutions ");
FcPatternPrint (new); FcPatternPrint (new);
} }
match = FcFontMatch (0, new, result); match = FcFontMatch (NULL, new, result);
if (XftDebug () & XFT_DBG_OPENV) if (XftDebug () & XFT_DBG_OPENV)
{ {
printf ("XftFontMatch result "); printf ("XftFontMatch result ");
...@@ -76,13 +76,13 @@ XftFontOpen (Display *dpy, int screen, ...) ...@@ -76,13 +76,13 @@ XftFontOpen (Display *dpy, int screen, ...)
XftFont *font; XftFont *font;
va_start (va, screen); va_start (va, screen);
pat = FcPatternVaBuild (0, va); pat = FcPatternVaBuild (NULL, va);
va_end (va); va_end (va);
if (!pat) if (!pat)
{ {
if (XftDebug () & XFT_DBG_OPEN) if (XftDebug () & XFT_DBG_OPEN)
printf ("XftFontOpen: Invalid pattern argument\n"); printf ("XftFontOpen: Invalid pattern argument\n");
return 0; return NULL;
} }
match = XftFontMatch (dpy, screen, pat, &result); match = XftFontMatch (dpy, screen, pat, &result);
if (XftDebug () & XFT_DBG_OPEN) if (XftDebug () & XFT_DBG_OPEN)
...@@ -99,7 +99,7 @@ XftFontOpen (Display *dpy, int screen, ...) ...@@ -99,7 +99,7 @@ XftFontOpen (Display *dpy, int screen, ...)
} }
FcPatternDestroy (pat); FcPatternDestroy (pat);
if (!match) if (!match)
return 0; return NULL;
font = XftFontOpenPattern (dpy, match); font = XftFontOpenPattern (dpy, match);
if (!font) if (!font)
...@@ -131,7 +131,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name) ...@@ -131,7 +131,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name)
} }
if (!pat) if (!pat)
return 0; return NULL;
match = XftFontMatch (dpy, screen, pat, &result); match = XftFontMatch (dpy, screen, pat, &result);
if (XftDebug () & XFT_DBG_OPEN) if (XftDebug () & XFT_DBG_OPEN)
{ {
...@@ -145,7 +145,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name) ...@@ -145,7 +145,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name)
} }
FcPatternDestroy (pat); FcPatternDestroy (pat);
if (!match) if (!match)
return 0; return NULL;
font = XftFontOpenPattern (dpy, match); font = XftFontOpenPattern (dpy, match);
if (!font) if (!font)
...@@ -177,7 +177,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd) ...@@ -177,7 +177,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd)
} }
if (!pat) if (!pat)
return 0; return NULL;
match = XftFontMatch (dpy, screen, pat, &result); match = XftFontMatch (dpy, screen, pat, &result);
if (XftDebug () & XFT_DBG_OPEN) if (XftDebug () & XFT_DBG_OPEN)
{ {
...@@ -191,7 +191,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd) ...@@ -191,7 +191,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd)
} }
FcPatternDestroy (pat); FcPatternDestroy (pat);
if (!match) if (!match)
return 0; return NULL;
font = XftFontOpenPattern (dpy, match); font = XftFontOpenPattern (dpy, match);
if (!font) if (!font)
......
...@@ -33,7 +33,7 @@ _X_HIDDEN FT_Library _XftFTlibrary; ...@@ -33,7 +33,7 @@ _X_HIDDEN FT_Library _XftFTlibrary;
*/ */
static XftFtFile *_XftFtFiles; static XftFtFile *_XftFtFiles;
_X_HIDDEN int XftMaxFreeTypeFiles = 5; static int XftMaxFreeTypeFiles = 5;
static XftFtFile * static XftFtFile *
_XftGetFile (const FcChar8 *file, int id) _XftGetFile (const FcChar8 *file, int id)
...@@ -41,7 +41,7 @@ _XftGetFile (const FcChar8 *file, int id) ...@@ -41,7 +41,7 @@ _XftGetFile (const FcChar8 *file, int id)
XftFtFile *f; XftFtFile *f;
if (!XftInitFtLibrary ()) if (!XftInitFtLibrary ())
return 0; return NULL;
for (f = _XftFtFiles; f; f = f->next) for (f = _XftFtFiles; f; f = f->next)
{ {
...@@ -56,7 +56,7 @@ _XftGetFile (const FcChar8 *file, int id) ...@@ -56,7 +56,7 @@ _XftGetFile (const FcChar8 *file, int id)
} }
f = malloc (sizeof (XftFtFile) + strlen ((char *) file) + 1); f = malloc (sizeof (XftFtFile) + strlen ((char *) file) + 1);
if (!f) if (!f)
return 0; return NULL;
XftMemAlloc (XFT_MEM_FILE, sizeof (XftFtFile) + strlen ((char *) file) + 1); XftMemAlloc (XFT_MEM_FILE, sizeof (XftFtFile) + strlen ((char *) file) + 1);
if (XftDebug () & XFT_DBG_REF) if (XftDebug () & XFT_DBG_REF)
...@@ -72,7 +72,7 @@ _XftGetFile (const FcChar8 *file, int id) ...@@ -72,7 +72,7 @@ _XftGetFile (const FcChar8 *file, int id)
f->id = id; f->id = id;
f->lock = 0; f->lock = 0;
f->face = 0; f->face = NULL;
f->xsize = 0; f->xsize = 0;
f->ysize = 0; f->ysize = 0;
f->matrix.xx = f->matrix.xy = f->matrix.yx = f->matrix.yy = 0; f->matrix.xx = f->matrix.xy = f->matrix.yx = f->matrix.yy = 0;
...@@ -86,13 +86,13 @@ _XftGetFaceFile (FT_Face face) ...@@ -86,13 +86,13 @@ _XftGetFaceFile (FT_Face face)
f = malloc (sizeof (XftFtFile)); f = malloc (sizeof (XftFtFile));
if (!f) if (!f)
return 0; return NULL;
XftMemAlloc (XFT_MEM_FILE, sizeof(XftFtFile)); XftMemAlloc (XFT_MEM_FILE, sizeof(XftFtFile));
f->next = 0; f->next = NULL;
f->ref = 1; f->ref = 1;
f->file = 0; f->file = NULL;
f->id = 0; f->id = 0;
f->lock = 0; f->lock = 0;
f->face = face; f->face = face;
...@@ -139,7 +139,7 @@ _XftUncacheFiles (void) ...@@ -139,7 +139,7 @@ _XftUncacheFiles (void)
printf ("Discard file %s/%d from cache\n", printf ("Discard file %s/%d from cache\n",
f->file, f->id); f->file, f->id);
FT_Done_Face (f->face); FT_Done_Face (f->face);
f->face = 0; f->face = NULL;
} }
} }
} }
...@@ -255,7 +255,7 @@ _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix ...@@ -255,7 +255,7 @@ _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix
(double) matrix->xy / 0x10000, (double) matrix->xy / 0x10000,
(double) matrix->yx / 0x10000, (double) matrix->yx / 0x10000,
(double) matrix->yy / 0x10000); (double) matrix->yy / 0x10000);
FT_Set_Transform (face, matrix, 0); FT_Set_Transform (face, matrix, NULL);
f->matrix = *matrix; f->matrix = *matrix;
} }
return True; return True;
...@@ -357,7 +357,7 @@ XftLockFace (XftFont *public) ...@@ -357,7 +357,7 @@ XftLockFace (XftFont *public)
if (face && !_XftSetFace (fi->file, fi->xsize, fi->ysize, &fi->matrix)) if (face && !_XftSetFace (fi->file, fi->xsize, fi->ysize, &fi->matrix))
{ {
_XftUnlockFile (fi->file); _XftUnlockFile (fi->file);
face = 0; face = NULL;
} }
return face; return face;
} }
...@@ -402,7 +402,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi) ...@@ -402,7 +402,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
*/ */
switch (FcPatternGetString (pattern, FC_FILE, 0, &filename)) { switch (FcPatternGetString (pattern, FC_FILE, 0, &filename)) {
case FcResultNoMatch: case FcResultNoMatch:
filename = 0; filename = NULL;
break; break;
case FcResultMatch: case FcResultMatch:
break; break;
...@@ -717,7 +717,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi) ...@@ -717,7 +717,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
bail1: bail1:
_XftReleaseFile (fi->file); _XftReleaseFile (fi->file);
fi->file = 0; fi->file = NULL;
bail0: bail0:
return FcFalse; return FcFalse;
} }
...@@ -735,12 +735,12 @@ XftFontInfoCreate (Display *dpy, _Xconst FcPattern *pattern) ...@@ -735,12 +735,12 @@ XftFontInfoCreate (Display *dpy, _Xconst FcPattern *pattern)
XftFontInfo *fi = malloc (sizeof (XftFontInfo)); XftFontInfo *fi = malloc (sizeof (XftFontInfo));
if (!fi) if (!fi)
return 0; return NULL;
if (!XftFontInfoFill (dpy, pattern, fi)) if (!XftFontInfoFill (dpy, pattern, fi))
{ {
free (fi); free (fi);
fi = 0; fi = NULL;
} }
XftMemAlloc (XFT_MEM_FONT, sizeof (XftFontInfo)); XftMemAlloc (XFT_MEM_FONT, sizeof (XftFontInfo));
return fi; return fi;
...@@ -788,7 +788,7 @@ XftFontOpenInfo (Display *dpy, ...@@ -788,7 +788,7 @@ XftFontOpenInfo (Display *dpy,
int num_glyphs; int num_glyphs;
if (!info) if (!info)
return 0; return NULL;
/* /*
* Find a matching previously opened font * Find a matching previously opened font
*/ */
...@@ -831,7 +831,7 @@ XftFontOpenInfo (Display *dpy, ...@@ -831,7 +831,7 @@ XftFontOpenInfo (Display *dpy,
if (FcPatternGetCharSet (pattern, FC_CHARSET, 0, &charset) == FcResultMatch) if (FcPatternGetCharSet (pattern, FC_CHARSET, 0, &charset) == FcResultMatch)
charset = FcCharSetCopy (charset); charset = FcCharSetCopy (charset);
else else
charset = FcFreeTypeCharSet (face, FcConfigGetBlanks (0)); charset = FcFreeTypeCharSet (face, FcConfigGetBlanks (NULL));
antialias = fi->antialias; antialias = fi->antialias;
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
...@@ -865,7 +865,7 @@ XftFontOpenInfo (Display *dpy, ...@@ -865,7 +865,7 @@ XftFontOpenInfo (Display *dpy,
goto bail2; goto bail2;
} }
else else
format = 0; format = NULL;
if (charset) if (charset)
{ {
...@@ -1018,7 +1018,7 @@ bail2: ...@@ -1018,7 +1018,7 @@ bail2:
bail1: bail1:
_XftUnlockFile (fi->file); _XftUnlockFile (fi->file);
bail0: bail0:
return 0; return NULL;
} }
_X_EXPORT XftFont * _X_EXPORT XftFont *
...@@ -1028,7 +1028,7 @@ XftFontOpenPattern (Display *dpy, FcPattern *pattern) ...@@ -1028,7 +1028,7 @@ XftFontOpenPattern (Display *dpy, FcPattern *pattern)
XftFont *font; XftFont *font;
if (!XftFontInfoFill (dpy, pattern, &info))