summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-19 16:06:40 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-19 16:06:40 -0200
commitef8d98c555f3735dc7362873b45e06a8fd4c7c2d (patch)
treece4bca57c48aa0b24f8272a0e4df6f10872290f3
parent916040fd10cd5cc1a5fe576e4ea967108d388e32 (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac8
-rw-r--r--showfont.c28
4 files changed, 27 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index e33e2e0..992f863 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ showfont
showfont.1
stamp-h1
*~
+*.o
+showfont-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 798fe2c..563b65a 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 11e5e3e..c70fd40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,18 +26,26 @@ AC_INIT(showfont,[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
AM_PROG_CC_C_O
AC_PROG_INSTALL
+XORG_CWARNFLAGS
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(SHOWFONT, libfs)
+SHOWFONT_CFLAGS="$CWARNFLAGS $SHOWFONT_CFLAGS"
AC_SUBST(SHOWFONT_CFLAGS)
AC_SUBST(SHOWFONT_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/showfont.c b/showfont.c
index e49c67f..ae260a2 100644
--- a/showfont.c
+++ b/showfont.c
@@ -68,23 +68,23 @@ from the X Consortium.
:(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \
: 0)
-int byteorder = MSBFirst; /* -LSB or -MSB */
-int bitorder = MSBFirst; /* -lsb or -msb */
-int bitmap_pad = 0; /* -bitmap_pad: ImageRect bitmap format */
-int scan_pad = 8; /* -pad: ScanlinePad */
-int scan_unit = 8; /* -unit: ScanlineUnit */
-int first_ch = 0; /* -start: first character*/
-int end_ch = ~0; /* -end: end character */
-const char *ProgramName;
-Bool no_props = False; /* -noprops: don't show font properties */
-Bool extents_only = False; /* -extents_only */
-
-FSServer *svr;
+static int byteorder = MSBFirst; /* -LSB or -MSB */
+static int bitorder = MSBFirst; /* -lsb or -msb */
+static int bitmap_pad = 0; /* -bitmap_pad: ImageRect bitmap format */
+static int scan_pad = 8; /* -pad: ScanlinePad */
+static int scan_unit = 8; /* -unit: ScanlineUnit */
+static int first_ch = 0; /* -start: first character*/
+static int end_ch = ~0; /* -end: end character */
+static const char *ProgramName;
+static Bool no_props = False; /* -noprops: don't show font properties */
+static Bool extents_only = False; /* -extents_only */
+
+static FSServer *svr;
/* set from bitmap_pad to ImageRectMin, ImageMaxWidth, or ImageMax */
-int bitmap_format;
+static int bitmap_format;
-static FSBitmapFormat
+static FSBitmapFormat
make_format(void)
{
FSBitmapFormat format;