summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-22 15:40:27 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-22 15:40:27 -0200
commit9bb8ad30520e9e9d688e844e18590b371a2ac1a9 (patch)
treef3a60fad0ef2032e39b96d0751d56ebfb73e8a8b
parent15a8c8d5c3db1945a3ba6876241d04f0027e9dcd (diff)
Correct make distcheck and sparse warnings.
-rw-r--r--.gitignore4
-rw-r--r--Logo.c4
-rw-r--r--Makefile.am27
-rw-r--r--app-defaults/XLogo (renamed from app-defaults/XLogo.ad)0
-rw-r--r--app-defaults/XLogo-color (renamed from app-defaults/XLogo-color.ad)0
-rw-r--r--configure.ac21
-rw-r--r--xlogo.c4
7 files changed, 28 insertions, 32 deletions
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.ad b/app-defaults/XLogo
index a70ff3c..a70ff3c 100644
--- a/app-defaults/XLogo.ad
+++ b/app-defaults/XLogo
diff --git a/app-defaults/XLogo-color.ad b/app-defaults/XLogo-color
index add98cc..add98cc 100644
--- a/app-defaults/XLogo-color.ad
+++ b/app-defaults/XLogo-color
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=<pathname>],
+ [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 \\"