diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-29 19:52:34 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-29 19:52:34 -0200 |
commit | d17cd6e80f1ec78b69ba11ee55465420e6d7e9a9 (patch) | |
tree | 828a229ae9d48fb22ed17f7a127c99864c369e3e | |
parent | dd9514fe714d81b881a1bd6bd88d4287adc5fc7e (diff) |
Janitor: distcheck, compiler warnings, .gitignore.
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | include/X11/.gitignore | 1 | ||||
-rw-r--r-- | src/.gitignore | 6 | ||||
-rw-r--r-- | src/xkbatom.c | 4 | ||||
-rw-r--r-- | src/xkbconfig.c | 2 | ||||
-rw-r--r-- | src/xkberrs.c | 7 | ||||
-rw-r--r-- | src/xkmread.c | 4 |
9 files changed, 28 insertions, 17 deletions
@@ -1,3 +1,5 @@ +.deps +.libs aclocal.m4 autom4te.cache compile @@ -20,3 +22,9 @@ mkinstalldirs stamp-h1 xkbfile.pc *~ +*.o +*.la +*.lo +libxkbfile-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 14028f2..0f095e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,14 +24,12 @@ SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xkbfile.pc -EXTRA_DIST = xkbfile.pc.in autogen.sh - -EXTRA_DIST += ChangeLog +EXTRA_DIST = xkbfile.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 fc8b8c3..df2c072 100644 --- a/configure.ac +++ b/configure.ac @@ -27,22 +27,27 @@ AC_INIT(libxkbfile, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=x 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 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1, [Do not have `strcasecmp'.])) # Check for dependencies PKG_CHECK_MODULES(XKBFILE, x11 kbproto) - +XKBFILE_CFLAGS="$CWARNFLAGS $XKBFILE_CFLAGS" AC_SUBST(XKBFILE_CFLAGS) AC_SUBST(XKBFILE_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 f427429..0000000 --- a/include/X11/.gitignore +++ /dev/null @@ -1 +0,0 @@ -extensions diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index fc50197..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -libxkbfile.la -*.lo -Makefile -Makefile.in diff --git a/src/xkbatom.c b/src/xkbatom.c index 24bdcd7..4fca90c 100644 --- a/src/xkbatom.c +++ b/src/xkbatom.c @@ -178,8 +178,8 @@ static char * _XkbNameForAtom(Atom atom) { NodePtr node; - if (atom > lastAtom) return 0; - if ((node = nodeTable[atom]) == (NodePtr)NULL) return 0; + if (atom > lastAtom) return NULL; + if ((node = nodeTable[atom]) == (NodePtr)NULL) return NULL; return strdup(node->string); } diff --git a/src/xkbconfig.c b/src/xkbconfig.c index 7930979..37272ce 100644 --- a/src/xkbconfig.c +++ b/src/xkbconfig.c @@ -340,7 +340,7 @@ XkbCFAddModByName( XkbConfigRtrnPtr rtrn, XkbConfigUnboundModRec); if (rtrn->unbound_mods==NULL) { rtrn->error= XkbCF_BadAlloc; - return False; + return NULL; } } if (last==NULL) { diff --git a/src/xkberrs.c b/src/xkberrs.c index 1b856bc..a3ad52d 100644 --- a/src/xkberrs.c +++ b/src/xkberrs.c @@ -36,6 +36,13 @@ #include <ctype.h> #include <stdlib.h> +#include <X11/Xproto.h> +#include <X11/Xlib.h> +#include <X11/Xos.h> +#include <X11/Xfuncs.h> +#include <X11/XKBlib.h> +#include <X11/extensions/XKBfile.h> + char * _XkbErrMessages[] = { "success", /* _XkbSuccess */ "key names not defined", /* _XkbErrMissingNames */ diff --git a/src/xkmread.c b/src/xkmread.c index f22941f..91bfa7b 100644 --- a/src/xkmread.c +++ b/src/xkmread.c @@ -1208,7 +1208,7 @@ xkmSectionInfo tmpTOC; char name[100]; if ((!file)||(!toc)) - return 0; + return NULL; switch (toc->type) { case XkmVirtualModsIndex: case XkmIndicatorsIndex: @@ -1223,7 +1223,7 @@ char name[100]; if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)|| (tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) { _XkbLibError(_XkbErrIllegalContents,"XkmReadFileSectionName",0); - return 0; + return NULL; } if (XkmGetCountedString(file,name,100)>0) return _XkbDupString(name); |