Ansification and compile warning fixes. 39/9239/1
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Tue, 13 Jan 2009 19:42:47 +0000 (17:42 -0200)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 3 Sep 2013 03:37:53 +0000 (23:37 -0400)
  This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
make distcheck and all gcc 4.3 and sparse warnings.

Change-Id: I83f1a63f147aa49276f9011870243ae6ccd5d287

.gitignore
Eyes.c
Makefile.am
configure.ac
transform.c

index d1fde44..f4eb813 100644 (file)
@@ -18,3 +18,7 @@ stamp-h1
 xeyes
 xeyes.1
 *~
+*.o
+xeyes-*.tar.*
+ChangeLog
+tags
diff --git a/Eyes.c b/Eyes.c
index 181d794..745ba99 100644 (file)
--- a/Eyes.c
+++ b/Eyes.c
@@ -169,7 +169,7 @@ static void Initialize (
                                                       &shape_error_base))
        w->eyes.shape_window = False;
     w->eyes.shape_mask = 0;
-    w->eyes.shapeGC = 0;
+    w->eyes.shapeGC = NULL;
 }
 
 static void eyeLiner (
index 7fa48a0..ca2956c 100644 (file)
@@ -74,6 +74,6 @@ 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
index 0046cbd..188d2ca 100644 (file)
@@ -28,15 +28,23 @@ AM_MAINTAINER_MODE
 
 AM_CONFIG_HEADER(config.h)
 
+# 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)
+
 AC_PROG_CC
 AC_PROG_INSTALL
 
+XORG_CWARNFLAGS
+
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XEYES, x11 xt xext xmu)
+XEYES_CFLAGS="$CWARNFLAGS $XEYES_CFLAGS"
 AC_SUBST(XEYES_CFLAGS)
 AC_SUBST(XEYES_LIBS)
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile])
index be4896c..0f02498 100644 (file)
@@ -83,13 +83,9 @@ TDrawArc (
 #endif
 
 void
-TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
-    Display    *dpy;
-    Drawable   d;
-    GC         gc;
-    Transform  *t;
-    double     x, y, width, height;
-    int                angle1, angle2;
+TFillArc (Display *dpy, Drawable d, GC gc, Transform *t,
+         double x, double y, double width, double height,
+         int angle1, int angle2)
 {
        int     xx, xy, xw, xh;
 
@@ -109,10 +105,9 @@ TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
 }
 
 void
-SetTransform (t, xx1, xx2, xy1, xy2, tx1, tx2, ty1, ty2)
-    Transform  *t;
-    int                xx1, xx2, xy1, xy2;
-    double     tx1, tx2, ty1, ty2;
+SetTransform (Transform *t,
+             int xx1, int xx2, int xy1, int xy2,
+             double tx1, double tx2, double ty1, double ty2)
 {
        t->mx = ((double) xx2 - xx1) / (tx2 - tx1);
        t->bx = ((double) xx1) - t->mx * tx1;