summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-30 15:22:57 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-30 15:22:57 -0200
commitd61a81c97b91627620297487815d53a482098875 (patch)
tree0171cd2c5609cecd8d2de120ab9f983498b79001
parent5af30b0b5e957978eb52fb7354465c0bef35ace5 (diff)
downloadxorg-lib-libXp-d61a81c97b91627620297487815d53a482098875.tar.gz
Janitor: make distcheck, compiler warnings, .gitignore.
-rw-r--r--.gitignore9
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac7
-rw-r--r--man/.gitignore3
-rw-r--r--src/.gitignore6
-rw-r--r--src/XpContext.c2
-rw-r--r--src/XpExtUtil.c35
-rw-r--r--src/XpExtUtil.h13
-rw-r--r--src/XpGetData.c8
-rw-r--r--src/XpLocale.c6
-rw-r--r--src/XpNotifyPdm.c2
-rw-r--r--src/XpPrinter.c4
12 files changed, 52 insertions, 49 deletions
diff --git a/.gitignore b/.gitignore
index e4081d1..5d17261 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
aclocal.m4
autom4te.cache
compile
@@ -20,3 +22,10 @@ mkinstalldirs
stamp-h1
xp.pc
*~
+*.3
+*.o
+*.la
+*.lo
+libXp-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 02e366b..63112ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,14 +26,12 @@ SUBDIRS = src man
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xp.pc
-EXTRA_DIST = xp.pc.in autogen.sh
-
-EXTRA_DIST += ChangeLog
+EXTRA_DIST = xp.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 57f1985..74ef108 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,21 +27,26 @@ AC_INIT(libXp, 1.0.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
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)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
+XORG_CWARNFLAGS
# Check for X and print proto
PKG_CHECK_MODULES(XPRINT, x11 xext xextproto xau printproto)
-
+XPRINT_CFLAGS="$CWARNFLAGS $XPRINT_CFLAGS"
AC_SUBST(XPRINT_CFLAGS)
AC_SUBST(XPRINT_LIBS)
XORG_CHECK_MALLOC_ZERO
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile
src/Makefile
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 2d0f344..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-*.3*
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 2fa44f4..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-libXp.la
-*.lo
-Makefile
-Makefile.in
diff --git a/src/XpContext.c b/src/XpContext.c
index fc3da9c..3462259 100644
--- a/src/XpContext.c
+++ b/src/XpContext.c
@@ -79,7 +79,7 @@ XpCreateContext (
if ( locale == (char *) NULL )
req->localeLen = 0;
- else if ( *locale == (char) NULL )
+ else if ( *locale == '\0' )
req->localeLen = 0;
else {
locale_len = strlen( locale );
diff --git a/src/XpExtUtil.c b/src/XpExtUtil.c
index dac8028..c5a2af3 100644
--- a/src/XpExtUtil.c
+++ b/src/XpExtUtil.c
@@ -54,10 +54,10 @@ static XExtensionInfo xp_info_data;
static XExtensionInfo *xp_info = &xp_info_data;
static /* const */ char *xp_extension_name = XP_PRINTNAME;
-static int XpClose();
-static char *XpError();
-static Bool XpWireToEvent();
-static Status XpEventToWire();
+static int XpClose(Display *, XExtCodes *);
+static char *XpError(Display *, int, XExtCodes *, char *, int);
+static Bool XpWireToEvent(Display *, XEvent *, xEvent *);
+static Status XpEventToWire(Display *, XEvent *, xEvent **, int *);
#define XpCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, xp_extension_name, val)
@@ -117,9 +117,7 @@ static XPrintLocalExtensionVersion xpprintversions[] = {{XP_ABSENT,0,0},
* xpprintversions[version_index] shows which version *this* library is.
*/
-int XpCheckExtInitUnlocked(dpy, version_index)
- register Display *dpy;
- register int version_index;
+int XpCheckExtInitUnlocked(Display *dpy, int version_index)
{
XExtDisplayInfo *info = xp_find_display (dpy);
@@ -175,9 +173,7 @@ int XpCheckExtInitUnlocked(dpy, version_index)
return (0);
}
-int XpCheckExtInit(dpy, version_index)
- register Display *dpy;
- register int version_index;
+int XpCheckExtInit(Display *dpy, int version_index)
{
int retval;
@@ -197,9 +193,7 @@ int XpCheckExtInit(dpy, version_index)
*/
static int
-XpClose (dpy, codes)
- Display *dpy;
- XExtCodes *codes;
+XpClose (Display *dpy, XExtCodes *codes)
{
XExtDisplayInfo *info = xp_find_display (dpy);
@@ -227,10 +221,7 @@ XpClose (dpy, codes)
* Reformat a wire event into an XEvent structure of the right type.
*/
static Bool
-XpWireToEvent (dpy, re, event)
- Display *dpy;
- XEvent *re;
- xEvent *event;
+XpWireToEvent (Display *dpy, XEvent *re, xEvent *event)
{
XExtDisplayInfo *info = xp_find_display (dpy);
@@ -290,11 +281,11 @@ XpWireToEvent (dpy, re, event)
* Reformat an XEvent into a wire event.
*/
static Status
-XpEventToWire(dpy, re, event, count)
- register Display *dpy; /* pointer to display structure */
- register XEvent *re; /* pointer to client event */
- register xEvent **event; /* wire protocol event */
- register int *count;
+XpEventToWire(
+ Display *dpy, /* pointer to display structure */
+ XEvent *re, /* pointer to client event */
+ xEvent **event, /* wire protocol event */
+ int *count)
{
XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy);
diff --git a/src/XpExtUtil.h b/src/XpExtUtil.h
index 81b5ce3..ec34702 100644
--- a/src/XpExtUtil.h
+++ b/src/XpExtUtil.h
@@ -31,6 +31,8 @@
#include <X11/Xfuncproto.h>
#include <X11/extensions/extutil.h>
+_XFUNCPROTOBEGIN
+
extern XEXT_FIND_DISPLAY_PROTO(xp_find_display);
extern int XpCheckExtInit(
@@ -38,4 +40,15 @@ extern int XpCheckExtInit(
int /* version_index */
);
+extern int XpCheckExtInitUnlocked(
+ Display * /* dpy */,
+ int /* version_index */
+);
+
+extern char *_xpstrdup(
+ char * /* str */
+);
+
+_XFUNCPROTOEND
+
#endif /* _XPEXTUTIL_H */
diff --git a/src/XpGetData.c b/src/XpGetData.c
index b495021..245988e 100644
--- a/src/XpGetData.c
+++ b/src/XpGetData.c
@@ -66,12 +66,8 @@ typedef struct {
* XpGetDocumentData().
*/
static Bool
-_XpGetDocDataHandler(dpy, rep, buf, len, adata)
- register Display *dpy;
- register xReply *rep;
- char *buf;
- int len;
- XPointer adata;
+_XpGetDocDataHandler(Display *dpy, xReply *rep,
+ char *buf, int len, XPointer adata)
{
register _XpState *state;
xPrintGetDocumentDataReply replbuf;
diff --git a/src/XpLocale.c b/src/XpLocale.c
index ef7c5fb..254aba8 100644
--- a/src/XpLocale.c
+++ b/src/XpLocale.c
@@ -54,8 +54,6 @@ char *_xp_hinter_desc = NULL;
int _xp_hinter_init = 1; /* need to init */
-extern char *_xpstrdup();
-
/******************************************************************************
*
@@ -63,7 +61,7 @@ extern char *_xpstrdup();
*
* Make changes here only.
*/
-static char *_XpLocaleHinter()
+static char *_XpLocaleHinter(void)
{
#ifdef hpux
char lbuf[ LC_BUFSIZ ];
@@ -180,7 +178,7 @@ XpGetLocaleHinter (
*
* If neither a hint or description exists, a NULL is returned.
*/
-char *XpGetLocaleNetString()
+char *XpGetLocaleNetString(void)
{
XPHinterProc locale_hinter;
diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c
index feb62f0..7cbad09 100644
--- a/src/XpNotifyPdm.c
+++ b/src/XpNotifyPdm.c
@@ -54,6 +54,8 @@
#include <stdlib.h>
#include <X11/Xos.h>
+#include "XpExtUtil.h"
+
/*
* Alternate selection environment variables.
*/
diff --git a/src/XpPrinter.c b/src/XpPrinter.c
index 7ed33b7..5899c61 100644
--- a/src/XpPrinter.c
+++ b/src/XpPrinter.c
@@ -92,7 +92,7 @@ XpGetPrinterList (
*/
if ( printer_name == (char *) NULL )
req->printerNameLen = 0;
- else if ( *printer_name == (char) NULL )
+ else if ( *printer_name == '\0' )
req->printerNameLen = 0;
else {
printer_name_len = strlen( printer_name );
@@ -102,7 +102,7 @@ XpGetPrinterList (
if ( locale == (char *) NULL )
req->localeLen = 0;
- else if ( *locale == (char) NULL )
+ else if ( *locale == '\0' )
req->localeLen = 0;
else {
locale_len = strlen( locale );