diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | setxkbmap.c | 42 |
4 files changed, 34 insertions, 22 deletions
@@ -18,3 +18,7 @@ setxkbmap setxkbmap.1 stamp-h1 *~ +*.o +setxkbmap-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index df4c982..2c2bebf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,7 @@ CLEANFILES = $(appman_DATA) .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 1e9a626..2c34324 100644 --- a/configure.ac +++ b/configure.ac @@ -26,11 +26,17 @@ AC_INIT(setxkbmap,[1.0.4], [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) AC_PROG_CC AC_PROG_INSTALL +XORG_CWARNFLAGS + AC_ARG_WITH(xkb-config-root, AC_HELP_STRING([--with-xkb-config-root=<paths>], [Set default XKB config root (default: ${datadir}/X11/xkb)]), @@ -40,6 +46,7 @@ AC_SUBST([XKBCONFIGROOT]) # Checks for pkg-config packages PKG_CHECK_MODULES(SETXKBMAP, xkbfile x11) +SETXKBMAP_CFLAGS="$CWARNFLAGS $SETXKBMAP_CFLAGS" AC_SUBST(SETXKBMAP_CFLAGS) AC_SUBST(SETXKBMAP_LIBS) @@ -48,5 +55,6 @@ XORG_WITH_LINT XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/setxkbmap.c b/setxkbmap.c index 5e906cd..7156344 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -84,17 +84,17 @@ #define NUM_STRING_VALS 13 /***====================================================================***/ -Bool print = False; -Bool synch = False; -int verbose = 5; +static Bool print = False; +static Bool synch = False; +static int verbose = 5; -Display *dpy; +static Display *dpy; /** * human-readable versions of FROM_CONFIG, FROM_SERVER, etc. Used for error * reporting. */ -char *srcName[NUM_SOURCES] = { +static char *srcName[NUM_SOURCES] = { "undefined", "X server", "rules file", "config file", "command line" }; @@ -102,7 +102,7 @@ char *srcName[NUM_SOURCES] = { * human-readable versions for RULES_NDX, CONFIG_NDX, etc. Used for error * reporting. */ -char *svName[NUM_STRING_VALS] = { +static char *svName[NUM_STRING_VALS] = { "rules file", "config file", "X display", "locale", "keyboard model", "keyboard layout", "layout variant", "keycodes", "types", "compatibility map", "symbols", "geometry", @@ -113,29 +113,29 @@ char *svName[NUM_STRING_VALS] = { * i.e. if svSrc[LAYOUT_NDX] == FROM_SERVER, then the layout has been fetched * from the server. */ -int svSrc[NUM_STRING_VALS]; +static int svSrc[NUM_STRING_VALS]; /** * Holds the value for each of RULES, CONFIG, DISPLAY, etc. */ -char *svValue[NUM_STRING_VALS]; +static char *svValue[NUM_STRING_VALS]; -XkbConfigRtrnRec cfgResult; +static XkbConfigRtrnRec cfgResult; -XkbRF_RulesPtr rules = NULL; -XkbRF_VarDefsRec rdefs; +static XkbRF_RulesPtr rules = NULL; +static XkbRF_VarDefsRec rdefs; -Bool clearOptions = False; -int szOptions = 0; -int numOptions = 0; -char **options = NULL; +static Bool clearOptions = False; +static int szOptions = 0; +static int numOptions = 0; +static char **options = NULL; -int szInclPath = 0; -int numInclPath = 0; -char **inclPath = NULL; +static int szInclPath = 0; +static int numInclPath = 0; +static char **inclPath = NULL; -XkbDescPtr xkb = NULL; +static XkbDescPtr xkb = NULL; -int deviceSpec = XkbUseCoreKbd; +static int deviceSpec = XkbUseCoreKbd; /***====================================================================***/ @@ -886,7 +886,7 @@ applyRules(void) /* Primitive sanity check - filter out 'map names' (inside parenthesis) */ /* that can confuse xkbcomp parser */ -Bool +static Bool checkName(char *name, char *string) { char *i = name, *opar = NULL; |