diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | listres.c | 45 |
4 files changed, 30 insertions, 32 deletions
@@ -18,3 +18,7 @@ listres.1 missing stamp-h1 *~ +*.o +listres-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index e86ee9c..6e77f2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,6 +68,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/configure.ac b/configure.ac index b1d47c3..1529d36 100644 --- a/configure.ac +++ b/configure.ac @@ -26,21 +26,28 @@ AC_INIT(listres,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xor 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 + PKG_CHECK_MODULES(XAW, xaw7) # Checks for pkg-config packages PKG_CHECK_MODULES(LISTRES, x11 xt xmu) -LISTRES_CFLAGS="$DEP_CFLAGS $XAW_CFLAGS" -LISTRES_LIBS="$DEP_LIBS $XAW_LIBS" +LISTRES_CFLAGS="$CWARNFLAGS $LISTRES_CFLAGS $XAW_CFLAGS" +LISTRES_LIBS="$LISTRES_LIBS $XAW_LIBS" AC_SUBST(LISTRES_CFLAGS) AC_SUBST(LISTRES_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) @@ -61,7 +61,7 @@ typedef struct { char *format; } OptionsRec; -OptionsRec options; +static OptionsRec options; #define Offset(field) XtOffsetOf(OptionsRec, field) @@ -80,10 +80,10 @@ static XtResource Resources[] = { #undef Offset -const char *ProgramName; +static const char *ProgramName; -void -usage () +static void +usage (void) { fprintf(stderr, "usage: %s [-options...]\n", ProgramName); fprintf(stderr, "\nwhere options include:\n"); @@ -103,9 +103,7 @@ usage () exit (1); } -static void print_tree_level (wn, level) - register XmuWidgetNode *wn; - register int level; +static void print_tree_level (register XmuWidgetNode *wn, register int level) { register int i; @@ -119,7 +117,7 @@ static void print_tree_level (wn, level) print_tree_level (wn->siblings, level); } -static void tree_known_widgets () +static void tree_known_widgets (void) { register int i; register XmuWidgetNode *wn; @@ -136,10 +134,8 @@ static void tree_known_widgets () * print_classname - print out the superclass-to-subclass hierchy of names * in the form super\sub\sub.... */ -static int print_classname (node, topnode, level, showvar) - XmuWidgetNode *node, *topnode; - int level; - Bool showvar; +static int print_classname (XmuWidgetNode *node, XmuWidgetNode *topnode, + int level, Bool showvar) { int retval; @@ -156,7 +152,7 @@ static int print_classname (node, topnode, level, showvar) return retval; } -static void list_known_widgets () +static void list_known_widgets (void) { int i; XmuWidgetNode *wn; @@ -176,12 +172,9 @@ static void list_known_widgets () } /* ARGSUSED */ -static void print_resources (node, format, topnode, showsuper, showvar) - XmuWidgetNode *node; - const char *format; - XmuWidgetNode *topnode; - Bool showsuper; - Bool showvar; +static void print_resources (XmuWidgetNode *node, const char *format, + XmuWidgetNode *topnode, Bool showsuper, + Bool showvar) { int i; XtResourceList res = node->resources; @@ -214,13 +207,9 @@ static void print_resources (node, format, topnode, showsuper, showvar) * which they come */ static void -list_resources (node, format, topnode, toplevel, showsuper, showvar) - XmuWidgetNode *node; - const char *format; - XmuWidgetNode *topnode; - Widget toplevel; - Bool showsuper; - Bool showvar; +list_resources (XmuWidgetNode *node, const char *format, + XmuWidgetNode *topnode, Widget toplevel, + Bool showsuper, Bool showvar) { static Bool first = True; @@ -243,9 +232,7 @@ list_resources (node, format, topnode, toplevel, showsuper, showvar) int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int i; XtAppContext appcon; |