From 9bb8ad30520e9e9d688e844e18590b371a2ac1a9 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 22 Jan 2009 15:40:27 -0200 Subject: Correct make distcheck and sparse warnings. --- .gitignore | 4 ++++ Logo.c | 4 ++-- Makefile.am | 27 +++++++-------------------- app-defaults/XLogo | 4 ++++ app-defaults/XLogo-color | 5 +++++ app-defaults/XLogo-color.ad | 5 ----- app-defaults/XLogo.ad | 4 ---- configure.ac | 21 +++++++++++++-------- xlogo.c | 4 ++-- 9 files changed, 37 insertions(+), 41 deletions(-) create mode 100644 app-defaults/XLogo create mode 100644 app-defaults/XLogo-color delete mode 100644 app-defaults/XLogo-color.ad delete mode 100644 app-defaults/XLogo.ad diff --git a/.gitignore b/.gitignore index cc6ffa3..156cf18 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ stamp-h1 xlogo xlogo.1 *~ +*.o +xlogo-*.tar.* +ChangeLog +tags diff --git a/Logo.c b/Logo.c index 99d2153..cd5b113 100644 --- a/Logo.c +++ b/Logo.c @@ -239,7 +239,7 @@ RenderPrepare (LogoWidget w) } } -XtConvertArgRec xftColorConvertArgs[] = { +static XtConvertArgRec xftColorConvertArgs[] = { {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen), sizeof(Screen *)}, {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.colormap), @@ -367,7 +367,7 @@ Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args) LogoWidget w = (LogoWidget)new; #ifdef XRENDER - w->logo.draw = 0; + w->logo.draw = NULL; w->logo.fgpixel = w->logo.fg.pixel; #endif if (w->core.width < 1) w->core.width = 100; diff --git a/Makefile.am b/Makefile.am index 8b8c389..eca35f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,35 +37,22 @@ xlogo_SOURCES = \ appman_PRE = \ xlogo.man -# App default files (*.ad) +# App default files +DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults appdefaultdir = @appdefaultdir@ - -APPDEFAULTFILES = \ +dist_appdefault_DATA = \ app-defaults/XLogo \ app-defaults/XLogo-color -SUFFIXES = .ad - -.ad: - [ -d app-defaults ] || mkdir app-defaults - cp $< $@ - -appdefault_DATA = $(APPDEFAULTFILES) - -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) - -CLEANFILES = $(APPDEFAULTFILES) - - appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -EXTRA_DIST += $(appman_PRE) -CLEANFILES += $(appman_DATA) +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) SED = sed @@ -86,7 +73,7 @@ MAN_SUBSTS = \ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' -SUFFIXES += .$(APP_MAN_SUFFIX) .man +SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): sed $(MAN_SUBSTS) < $< > $@ @@ -97,6 +84,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 diff --git a/app-defaults/XLogo b/app-defaults/XLogo new file mode 100644 index 0000000..a70ff3c --- /dev/null +++ b/app-defaults/XLogo @@ -0,0 +1,4 @@ +XLogo*iconPixmap: xlogo32 +XLogo*iconMask: xlogo32 +XLogo*baseTranslations: #override \ +q,Escape: quit() diff --git a/app-defaults/XLogo-color b/app-defaults/XLogo-color new file mode 100644 index 0000000..add98cc --- /dev/null +++ b/app-defaults/XLogo-color @@ -0,0 +1,5 @@ +! $Xorg: XLogo-co.ad,v 1.3 2000/08/17 19:54:52 cpqbld Exp $ +#include "XLogo" +! MIT colors are Cardinal Red (Pantone 201c) and Silver Grey (Pantone 421c) +XLogo*background: rgb:d2/22/32 +XLogo*foreground: rgb:d7/d7/d7 diff --git a/app-defaults/XLogo-color.ad b/app-defaults/XLogo-color.ad deleted file mode 100644 index add98cc..0000000 --- a/app-defaults/XLogo-color.ad +++ /dev/null @@ -1,5 +0,0 @@ -! $Xorg: XLogo-co.ad,v 1.3 2000/08/17 19:54:52 cpqbld Exp $ -#include "XLogo" -! MIT colors are Cardinal Red (Pantone 201c) and Silver Grey (Pantone 421c) -XLogo*background: rgb:d2/22/32 -XLogo*foreground: rgb:d7/d7/d7 diff --git a/app-defaults/XLogo.ad b/app-defaults/XLogo.ad deleted file mode 100644 index a70ff3c..0000000 --- a/app-defaults/XLogo.ad +++ /dev/null @@ -1,4 +0,0 @@ -XLogo*iconPixmap: xlogo32 -XLogo*iconMask: xlogo32 -XLogo*baseTranslations: #override \ -q,Escape: quit() diff --git a/configure.ac b/configure.ac index dbd75ab..13fd703 100644 --- a/configure.ac +++ b/configure.ac @@ -25,21 +25,20 @@ AC_INIT(xlogo,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg] 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(XLOGO, xaw7) -if test "x$xaw_use_xprint" = "xyes" ; then - PKG_CHECK_MODULES(XPRINT_UTIL, xprintutil xp) - - XLOGO_CFLAGS="$XLOGO_CFLAGS $XPRINT_UTIL_CFLAGS" - XLOGO_LIBS="$XLOGO_LIBS $XPRINT_UTIL_LIBS" -fi - # Use render & xft2 to draw logo? AC_ARG_WITH(render, @@ -64,14 +63,20 @@ PKG_CHECK_MODULES(XEXT, xext) XLOGO_CFLAGS="$XLOGO_CFLAGS $XEXT_CFLAGS" XLOGO_LIBS="$XLOGO_LIBS $XEXT_LIBS" +XLOGO_CFLAGS="$CWARNFLAGS $XLOGO_CFLAGS" AC_SUBST(XLOGO_CFLAGS) AC_SUBST(XLOGO_LIBS) PKG_CHECK_MODULES(APPDEFS, xt) -appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +AC_ARG_WITH(appdefaultdir, + AC_HELP_STRING([--with-appdefaultdir=], + [specify directory for app-defaults files (default is autodetected)]), + [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) AC_SUBST(appdefaultdir) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/xlogo.c b/xlogo.c index 2df8a0d..452c2ab 100644 --- a/xlogo.c +++ b/xlogo.c @@ -82,7 +82,7 @@ XLogoResourceData userOptions; #define Offset(field) XtOffsetOf(XLogoResourceData, field) -XtResource resources[] = { +static XtResource resources[] = { {"verbose", "Verbose", XtRBoolean, sizeof(Boolean), Offset(verbose), XtRImmediate, (XtPointer)False}, {"quiet", "Quiet", XtRBoolean, sizeof(Boolean), Offset(quiet), XtRImmediate, (XtPointer)False}, #ifdef INCLUDE_XPRINT_SUPPORT @@ -93,7 +93,7 @@ XtResource resources[] = { }; -String fallback_resources[] = { +static String fallback_resources[] = { "*iconPixmap: xlogo32", "*iconMask: xlogo32", "*baseTranslations: #override \\" -- cgit v1.2.3