From 3747f97f133b5fe8dea0d1991d68c4693d488aae Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 30 Jan 2009 16:49:59 -0200 Subject: Janitor: make distcheck, compiler warnings, .gitignore. --- .gitignore | 8 ++++++++ Makefile.am | 7 ++----- configure.ac | 20 +++++++------------- src/.gitignore | 6 ------ src/Filter.c | 12 ++++++------ src/Makefile.am | 4 ++-- src/Poly.c | 4 ++-- src/Xrender.c | 26 +++++++++++++------------- 8 files changed, 40 insertions(+), 47 deletions(-) delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index a3112b4..09a9259 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs aclocal.m4 autom4te.cache config.guess @@ -19,3 +21,9 @@ mkinstalldirs stamp-h1 xrender.pc *~ +*.o +*.la +*.lo +libXrender-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index b6c4cd4..b3602d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,15 +24,12 @@ SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xrender.pc -EXTRA_DIST = xrender.pc.in autogen.sh - - -EXTRA_DIST += ChangeLog +EXTRA_DIST = xrender.pc.in ChangeLog MAINTAINERCLEANFILES = ChangeLog .PHONY: 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 diff --git a/configure.ac b/configure.ac index 1f4409e..2056806 100644 --- a/configure.ac +++ b/configure.ac @@ -34,22 +34,15 @@ AC_INIT(libXrender, 0.9.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=x AM_INIT_AUTOMAKE([dist-bzip2]) 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) # Check for progs AC_PROG_CC AC_PROG_LIBTOOL - -# Check for X -PKG_CHECK_MODULES(X, x11) - -X_REQUIRES="x11" -X_NON_PKG_CFLAGS="" -X_NON_PKG_LIBS="" - -AC_SUBST(X_REQUIRES) -AC_SUBST(X_NON_PKG_CFLAGS) -AC_SUBST(X_NON_PKG_LIBS) +XORG_CWARNFLAGS # Check render configuration, strip extra digits from package version to # find the required protocol version @@ -59,12 +52,13 @@ if test "$VERSION" = "" ; then fi RENDER_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] AC_SUBST(RENDER_VERSION) -PKG_CHECK_MODULES(RENDER, renderproto >= $RENDER_VERSION) - +PKG_CHECK_MODULES(RENDER, x11 renderproto >= $RENDER_VERSION) +RENDER_CFLAGS="$CWARNFLAGS $RENDER_CFLAGS" AC_SUBST(RENDER_CFLAGS) XORG_CHECK_MALLOC_ZERO XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 94e77db..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -libXrender.la -*.lo -Makefile -Makefile.in diff --git a/src/Filter.c b/src/Filter.c index 45a481b..76c8cfa 100644 --- a/src/Filter.c +++ b/src/Filter.c @@ -40,14 +40,14 @@ XRenderQueryFilters (Display *dpy, Drawable drawable) long nbytes, nbytesAlias, nbytesName; if (!RenderHasExtension (info)) - return 0; + return NULL; if (!XRenderQueryFormats (dpy)) - return 0; + return NULL; xri = info->info; if (xri->minor_version < 6) - return 0; + return NULL; LockDisplay (dpy); GetReq (RenderQueryFilters, req); @@ -58,7 +58,7 @@ XRenderQueryFilters (Display *dpy, Drawable drawable) { UnlockDisplay (dpy); SyncHandle (); - return 0; + return NULL; } /* * Compute total number of bytes for filter names @@ -82,7 +82,7 @@ XRenderQueryFilters (Display *dpy, Drawable drawable) _XEatData (dpy, (unsigned long) rep.length << 2); UnlockDisplay (dpy); SyncHandle (); - return 0; + return NULL; } /* @@ -146,7 +146,7 @@ XRenderSetPictureFilter (Display *dpy, req->nbytes = nbytes; req->length += ((nbytes + 3) >> 2) + nparams; Data (dpy, filter, nbytes); - Data (dpy, params, nparams << 2); + Data (dpy, (_Xconst char *)params, nparams << 2); UnlockDisplay(dpy); SyncHandle(); } diff --git a/src/Makefile.am b/src/Makefile.am index 19dab07..7482017 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = $(RENDER_CFLAGS) $(X_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include/X11/extensions $(MALLOC_ZERO_CFLAGS) +AM_CFLAGS = $(RENDER_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include/X11/extensions $(MALLOC_ZERO_CFLAGS) lib_LTLIBRARIES = libXrender.la @@ -17,7 +17,7 @@ libXrender_la_SOURCES = AddTrap.c \ Xrender.c \ Xrenderint.h -libXrender_la_LIBADD = @X_LIBS@ -lX11 +libXrender_la_LIBADD = $(RENDER_LIBS) # -version-number requires libtool >= 1.5 libXrender_la_LDFLAGS = -version-number 1:3:0 -no-undefined diff --git a/src/Poly.c b/src/Poly.c index ee461d7..16599b2 100644 --- a/src/Poly.c +++ b/src/Poly.c @@ -99,7 +99,7 @@ XRenderComputeTrapezoids (Edge *edges, qsort (edges, nedges, sizeof (Edge), CompareEdge); y = edges[0].edge.p1.y; - active = 0; + active = NULL; inactive = 0; while (active || inactive < nedges) { @@ -112,7 +112,7 @@ XRenderComputeTrapezoids (Edge *edges, /* move this edge into the active list */ inactive++; e->next = active; - e->prev = 0; + e->prev = NULL; if (active) active->prev = e; active = e; diff --git a/src/Xrender.c b/src/Xrender.c index 3a51663..c763076 100644 --- a/src/Xrender.c +++ b/src/Xrender.c @@ -346,7 +346,7 @@ _XRenderFindFormat (XRenderInfo *xri, PictFormat format) for (nf = 0; nf < xri->nformat; nf++) if (xri->format[nf].id == format) return &xri->format[nf]; - return 0; + return NULL; } static Visual * @@ -601,15 +601,15 @@ XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual) int nv; XRenderInfo *xri; XRenderVisual *xrv; - - RenderCheckExtension (dpy, info, 0); + + RenderCheckExtension (dpy, info, NULL); if (!XRenderQueryFormats (dpy)) - return 0; + return NULL; xri = info->info; for (nv = 0, xrv = xri->visual; nv < xri->nvisual; nv++, xrv++) if (xrv->visual == visual) return xrv->format; - return 0; + return NULL; } XRenderPictFormat * @@ -621,10 +621,10 @@ XRenderFindFormat (Display *dpy, XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); int nf; XRenderInfo *xri; - - RenderCheckExtension (dpy, info, 0); + + RenderCheckExtension (dpy, info, NULL); if (!XRenderQueryFormats (dpy)) - return 0; + return NULL; xri = info->info; for (nf = 0; nf < xri->nformat; nf++) { @@ -667,7 +667,7 @@ XRenderFindFormat (Display *dpy, if (count-- == 0) return &xri->format[nf]; } - return 0; + return NULL; } XRenderPictFormat * @@ -820,7 +820,7 @@ XRenderFindStandardFormat (Display *dpy, standardFormats[format].mask, &standardFormats[format].templ, 0); - return 0; + return NULL; } XIndexValue * @@ -834,7 +834,7 @@ XRenderQueryPictIndexValues(Display *dpy, XIndexValue *values; int nbytes, nread, rlength, i; - RenderCheckExtension (dpy, info, 0); + RenderCheckExtension (dpy, info, NULL); LockDisplay (dpy); GetReq (RenderQueryPictIndexValues, req); @@ -845,7 +845,7 @@ XRenderQueryPictIndexValues(Display *dpy, { UnlockDisplay (dpy); SyncHandle (); - return 0; + return NULL; } /* request data length */ @@ -862,7 +862,7 @@ XRenderQueryPictIndexValues(Display *dpy, _XEatData (dpy, nbytes); UnlockDisplay (dpy); SyncHandle (); - return 0; + return NULL; } /* read the values one at a time and convert */ -- cgit v1.2.3