summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-30 16:14:42 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-30 16:14:42 -0200
commit63235dce0d20d77d425d48f7d1662f691c1c4ff3 (patch)
tree157414c835a5b84e96551c2cf93f0f205d58575e
parent7a69f1395508e0cb80615e3cb2acdaaf4541d31f (diff)
Janitor: make distcheck, compiler warnings, .gitignore.
-rw-r--r--.gitignore8
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac7
-rw-r--r--include/X11/.gitignore1
-rw-r--r--src/.gitignore6
-rw-r--r--src/xprintutil.c9
6 files changed, 19 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
index e602966..aa0ec96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
aclocal.m4
autom4te.cache
compile
@@ -19,3 +21,9 @@ mkinstalldirs
stamp-h1
xprintutil.pc
*~
+*.o
+*.la
+*.lo
+libXprintUtil-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 70bc3af..b4e9e09 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,15 +24,12 @@ SUBDIRS = src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xprintutil.pc
-EXTRA_DIST = xprintutil.pc.in autogen.sh
-
-
-EXTRA_DIST += ChangeLog
+EXTRA_DIST = xprintutil.pc.in ChangeLog
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 d70aa46..d3ea9d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,11 @@ AC_INIT(libXprintUtil, 1.0.1, [https://bugs.freedesktop.org/enter_bug.cgi?produc
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)
+XORG_CWARNFLAGS
# Check for progs
AC_PROG_CC
@@ -35,11 +39,12 @@ AC_PROG_LIBTOOL
# Check for dependencies
PKG_CHECK_MODULES(XPRINTUTIL, x11 xp xt printproto xau)
-
+XPRINTUTIL_CFLAGS="$CWARNFLAGS $XPRINTUTIL_CFLAGS"
AC_SUBST(XPRINTUTIL_CFLAGS)
AC_SUBST(XPRINTUTIL_LIBS)
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile
src/Makefile
diff --git a/include/X11/.gitignore b/include/X11/.gitignore
deleted file mode 100644
index 8446729..0000000
--- a/include/X11/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-XprintUtil
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 990c418..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-libXprintUtil.la
-*.lo
-Makefile
-Makefile.in
diff --git a/src/xprintutil.c b/src/xprintutil.c
index 58fe138..02fc4e0 100644
--- a/src/xprintutil.c
+++ b/src/xprintutil.c
@@ -52,7 +52,7 @@ static const char XPServerListSeparators[] = " \t\v\n\r\f";
* If Xlib API gets fixed these macros can be turned into empty
* placeholders... (|#define MAKE_STRING_WRITABLE(x)|) :-)
*/
-#define MAKE_STRING_WRITABLE(str) (((str)?((str) = strdup(str)):0))
+#define MAKE_STRING_WRITABLE(str) (((str)?((str) = strdup(str)): NULL))
#define FREE_WRITABLE_STRING(str) free((void *)(str))
#define STRING_AS_WRITABLE(str) ((char *)(str))
@@ -76,7 +76,9 @@ static void XpuDisposeEnumerateMediumSourceSizes( void **vc );
int XpuCheckExtension( Display *pdpy )
{
+#ifdef DEBUG
char *display = XDisplayString(pdpy);
+#endif
short major = 0,
minor = 0;
@@ -214,8 +216,6 @@ int XpuGetPrinter2( char *printer, char *display, Display **pdpyptr, XPContext *
/* acceps "printer" or "printer@display" */
int XpuGetPrinter( const char *arg_printername, Display **pdpyptr, XPContext *pcontextptr )
{
- Display *pdpy;
- XPContext pcontext;
char *printername;
char *s;
char *tok_lasts;
@@ -490,7 +490,6 @@ static
const char *search_next_space(const char *start)
{
const char *s = start;
- int level = 0;
if( !start )
return(NULL);
@@ -669,7 +668,6 @@ Bool XpuParseMediumSourceSize( const char *value,
char *boolbuf;
size_t value_len;
int num_input_items;
- const char *cur_locale;
if( value && value[0]!='{' && value[0]!='\0' )
return(False);
@@ -969,7 +967,6 @@ XpuMediumSourceSizeList XpuGetMediumSourceSizeList( Display *pdpy, XPContext pco
ma2,
ma3,
ma4;
- char *value;
void *tok_lasts;
const char *tray_name,
*medium_name;