From f4f59348603fffd2fd3249f272eeeaa72f819b9a Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 22 Jan 2009 16:05:29 -0200 Subject: Correct make distcheck and sparse warnings. --- .gitignore | 4 ++++ Makefile.am | 27 +++++++------------------- app-defaults/Xmessage | 6 ++++++ app-defaults/Xmessage-color | 44 ++++++++++++++++++++++++++++++++++++++++++ app-defaults/Xmessage-color.ad | 44 ------------------------------------------ app-defaults/Xmessage.ad | 6 ------ configure.ac | 14 +++++++++++++- makeform.c | 1 + xmessage.c | 6 +++--- 9 files changed, 78 insertions(+), 74 deletions(-) create mode 100644 app-defaults/Xmessage create mode 100644 app-defaults/Xmessage-color delete mode 100644 app-defaults/Xmessage-color.ad delete mode 100644 app-defaults/Xmessage.ad diff --git a/.gitignore b/.gitignore index ed63b3d..985788c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ stamp-h1 xmessage xmessage.1 *~ +*.o +xmessage-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index b068461..20543ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,34 +34,21 @@ xmessage_SOURCES = \ appman_PRE = \ xmessage.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/Xmessage \ app-defaults/Xmessage-color -SUFFIXES = .ad - -.ad: - $(mkdir_p) app-defaults - cp $< $@ - -appdefault_DATA = $(APPDEFAULTFILES) - -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) Tests - -CLEANFILES = $(APPDEFAULTFILES) - - appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -EXTRA_DIST += $(appman_PRE) -CLEANFILES += $(appman_DATA) ChangeLog +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) ChangeLog MAINTAINERCLEANFILES = ChangeLog SED = sed @@ -83,7 +70,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) < $< > $@ @@ -91,6 +78,6 @@ SUFFIXES += .$(APP_MAN_SUFFIX) .man .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/Xmessage b/app-defaults/Xmessage new file mode 100644 index 0000000..1028ed2 --- /dev/null +++ b/app-defaults/Xmessage @@ -0,0 +1,6 @@ +! $XConsortium: Xmessage.ad,v 1.3 94/07/26 20:23:17 gildea Exp $ +*baseTranslations: #override :Return: default-exit() +*message.scrollVertical: Always +*message.scrollHorizontal: Never +*Command.shapeStyle: oval +*Command.highlightThickness: 1 diff --git a/app-defaults/Xmessage-color b/app-defaults/Xmessage-color new file mode 100644 index 0000000..8d5f433 --- /dev/null +++ b/app-defaults/Xmessage-color @@ -0,0 +1,44 @@ +! $XFree86$ + +#include "Xmessage" + +*background: gray85 +*foreground: gray15 + +*Scrollbar.thumb: vlines2 +*Scrollbar.width: 14 +*Scrollbar.foreground: rgb:a/5/5 +*Scrollbar.borderWidth: 0 +*Scrollbar.displayList:\ +foreground gray90;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray60;\ +lines -1,0,0,0,0,-1 + +*Text.?.cursorColor: rgb:d/5/5 +*Text.borderColor: gray80 +*Text*background: gray96 +*Text*Scrollbar.background: gray80 +*Text.displayList:\ +foreground gray90;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray60;\ +lines -1,0,0,0,0,-1 + +*Command.highlightThickness: 2 +*Command.internalWidth: 5 +*Command.internalHeight: 3 +*Command.borderColor: gray40 +*Command.shapeStyle: Rectangle +*Command.background: gray80 +*Command.displayList:\ +foreground gray60;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1 + +*Form.displayList:\ +foreground gray60;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1 diff --git a/app-defaults/Xmessage-color.ad b/app-defaults/Xmessage-color.ad deleted file mode 100644 index 8d5f433..0000000 --- a/app-defaults/Xmessage-color.ad +++ /dev/null @@ -1,44 +0,0 @@ -! $XFree86$ - -#include "Xmessage" - -*background: gray85 -*foreground: gray15 - -*Scrollbar.thumb: vlines2 -*Scrollbar.width: 14 -*Scrollbar.foreground: rgb:a/5/5 -*Scrollbar.borderWidth: 0 -*Scrollbar.displayList:\ -foreground gray90;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray60;\ -lines -1,0,0,0,0,-1 - -*Text.?.cursorColor: rgb:d/5/5 -*Text.borderColor: gray80 -*Text*background: gray96 -*Text*Scrollbar.background: gray80 -*Text.displayList:\ -foreground gray90;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray60;\ -lines -1,0,0,0,0,-1 - -*Command.highlightThickness: 2 -*Command.internalWidth: 5 -*Command.internalHeight: 3 -*Command.borderColor: gray40 -*Command.shapeStyle: Rectangle -*Command.background: gray80 -*Command.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1 - -*Form.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1 diff --git a/app-defaults/Xmessage.ad b/app-defaults/Xmessage.ad deleted file mode 100644 index 1028ed2..0000000 --- a/app-defaults/Xmessage.ad +++ /dev/null @@ -1,6 +0,0 @@ -! $XConsortium: Xmessage.ad,v 1.3 94/07/26 20:23:17 gildea Exp $ -*baseTranslations: #override :Return: default-exit() -*message.scrollVertical: Always -*message.scrollHorizontal: Never -*Command.shapeStyle: oval -*Command.highlightThickness: 1 diff --git a/configure.ac b/configure.ac index 89a8cf5..ce572d8 100644 --- a/configure.ac +++ b/configure.ac @@ -26,21 +26,33 @@ AC_INIT(xmessage,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo 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(XMESSAGE, xaw7) +XMESSAGE_CFLAGS="$CWARNFLAGS $XMESSAGE_CFLAGS" AC_SUBST(XMESSAGE_CFLAGS) AC_SUBST(XMESSAGE_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/makeform.c b/makeform.c index 898b554..0899771 100644 --- a/makeform.c +++ b/makeform.c @@ -91,6 +91,7 @@ parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr) int len; char *copy; + *brptr = NULL; if (!buttonlist) return 0; /* diff --git a/xmessage.c b/xmessage.c index a3e0152..6f31007 100644 --- a/xmessage.c +++ b/xmessage.c @@ -72,11 +72,11 @@ static XtResource resources[] = { { "nearMouse", "NearMouse", XtRBoolean, sizeof (Boolean), offset(nearmouse), XtRString, "false" }, { "timeout", "Timeout", XtRInt, sizeof (int), - offset(timeout_secs), XtRInt, 0 }, + offset(timeout_secs), XtRInt, NULL }, { "maxHeight", "Maximum", XtRDimension, sizeof (Dimension), - offset(maxHeight), XtRDimension, 0 }, + offset(maxHeight), XtRDimension, NULL }, { "maxWidth", "Maximum", XtRDimension, sizeof (Dimension), - offset(maxWidth), XtRDimension, 0 }, + offset(maxWidth), XtRDimension, NULL }, }; #undef offset -- cgit v1.2.3