From 1326fcb6afe5a62b675bf99826f7e628c66237b4 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 15 Jan 2009 16:15:23 -0200 Subject: Ansification and compile warning fixes. This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and most gcc 4.3 and sparse warnings. --- .gitignore | 4 ++++ Makefile.am | 2 +- configure.ac | 8 ++++++++ xsetpointer.c | 4 +--- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e68d4d1..d50b502 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ stamp-h1 xsetpointer xsetpointer.1 *~ +*.o +xsetpointer-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 24a33f8..85da618 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,7 @@ CLEANFILES = $(appman_DATA) ChangeLog .PHONY: ChangeLog ChangeLog: - GIT_DIR=$(srcdir)/.git git-log > ChangeLog + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index ec41f32..3e38ada 100644 --- a/configure.ac +++ b/configure.ac @@ -26,17 +26,25 @@ AC_INIT(xsetpointer,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product 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) AC_PROG_CC AC_PROG_INSTALL +XORG_CWARNFLAGS + # Checks for pkg-config packages PKG_CHECK_MODULES(XSETPOINTER, xi x11 [inputproto >= 1.4]) +XSETPOINTER_CFLAGS="$CWARNFLAGS $XSETPOINTER_CFLAGS" AC_SUBST(XSETPOINTER_CFLAGS) AC_SUBST(XSETPOINTER_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/xsetpointer.c b/xsetpointer.c index ce689dc..b85bcf6 100644 --- a/xsetpointer.c +++ b/xsetpointer.c @@ -30,8 +30,6 @@ #include #include -int event_type; - static int StrCaseCmp(char *s1, char *s2) { @@ -115,7 +113,7 @@ main(int argc, char * argv[]) for(loop=0; loop"); + printf("%d: \"%s\" [", (int)devices[loop].id, devices[loop].name ? devices[loop].name : ""); switch(devices[loop].use) { case IsXPointer: printf("XPointer]\n"); -- cgit v1.2.3