summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac8
-rw-r--r--xdpyinfo.c17
4 files changed, 22 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 78c274c..796d7ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,7 @@ stamp-h1
xdpyinfo
xdpyinfo.1
*~
+*.o
+xdpyinfo-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 7284fa6..ee33b76 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,7 +67,7 @@ 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 22bae81..c787a02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,13 +26,20 @@ AC_INIT(xdpyinfo,[1.0.3], [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(XDPYINFO, xext x11 xtst)
+XDPYINFO_CFLAGS="$CWARNFLAGS $XDPYINFO_CFLAGS"
AC_SUBST(XDPYINFO_CFLAGS)
AC_SUBST(XDPYINFO_LIBS)
@@ -133,5 +140,6 @@ XORG_WITH_LINT
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xdpyinfo.c b/xdpyinfo.c
index e9717b3..014e2bb 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -132,8 +132,8 @@ in this Software without prior written authorization from The Open Group.
/* Turn a NULL pointer string into an empty string */
#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-char *ProgramName;
-Bool queryExtensions = False;
+static char *ProgramName;
+static Bool queryExtensions = False;
static int
silent_errors(Display *dpy, XErrorEvent *ev)
@@ -725,7 +725,8 @@ print_shape_info(Display *dpy, char *extname)
static int
print_dga_info(Display *dpy, char *extname)
{
- int majorrev, minorrev, width, bank, ram, offset, flags;
+ unsigned int offset;
+ int majorrev, minorrev, width, bank, ram, flags;
if (!XF86DGAQueryVersion(dpy, &majorrev, &minorrev))
return 0;
@@ -849,14 +850,14 @@ print_XF86VidMode_info(Display *dpy, char *extname)
#ifdef XF86MISC
-char *kbdtable[] = { "Unknown", "84-key", "101-key", "Other", "Xqueue" };
-char *msetable[] = { "None", "Microsoft", "MouseSystems", "MMSeries",
+static char *kbdtable[] = { "Unknown", "84-key", "101-key", "Other", "Xqueue" };
+static char *msetable[] = { "None", "Microsoft", "MouseSystems", "MMSeries",
"Logitech", "BusMouse", "Mouseman", "PS/2", "MMHitTab",
"GlidePoint", "IntelliMouse", "ThinkingMouse",
"IMPS/2", "ThinkingMousePS/2", "MouseManPlusPS/2",
"GlidePointPS/2", "NetMousePS/2", "NetScrollPS/2",
"SysMouse", "Auto" };
-char *flgtable[] = { "None", "ClearDTR", "ClearRTS",
+static char *flgtable[] = { "None", "ClearDTR", "ClearRTS",
"ClearDTR and ClearRTS" };
static int
@@ -1411,7 +1412,7 @@ typedef struct {
Bool printit;
} ExtensionPrintInfo;
-ExtensionPrintInfo known_extensions[] =
+static ExtensionPrintInfo known_extensions[] =
{
#ifdef MITSHM
{"MIT-SHM", print_mitshm_info, False},
@@ -1454,7 +1455,7 @@ ExtensionPrintInfo known_extensions[] =
/* add new extensions here */
};
-int num_known_extensions = sizeof known_extensions / sizeof known_extensions[0];
+static int num_known_extensions = sizeof known_extensions / sizeof known_extensions[0];
static void
print_known_extensions(FILE *f)