From 5e45134c9566cf3440a55a1a9b74b6c82df0a714 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 17 Feb 2017 14:50:13 +0000 Subject: merge small style improvements from christos@ to the 1.13 branch --- configure | 7 +++++-- main.c | 4 ++-- mandocdb.c | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 5bfc013a..2ba9ff61 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: configure,v 1.43.2.9 2017/02/16 16:21:04 schwarze Exp $ +# $Id: configure,v 1.43.2.10 2017/02/17 14:50:13 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze # @@ -33,6 +33,8 @@ echo "config.log: writing..." # Initialize all variables here, # such that nothing can leak in from the environment. +SOURCEDIR=`dirname "$0"` + MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" OSNAME= UTF8_LOCALE= @@ -151,7 +153,8 @@ ${1}${3}: testing... ${COMP} -o test-${1} test-${1}.c ${3} __HEREDOC__ - if ${COMP} -o "test-${1}" "test-${1}.c" ${3} 1>&3 2>&3; then + if ${COMP} -o "test-${1}" "${SOURCEDIR}/test-${1}.c" ${3} 1>&3 2>&3 + then echo "${1}${3}: ${CC} succeeded" 1>&3 else echo "${1}${3}: ${CC} failed with $?" 1>&3 diff --git a/main.c b/main.c index edfa6089..6c568c69 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.273.2.7 2017/02/16 16:19:16 schwarze Exp $ */ +/* $Id: main.c,v 1.273.2.8 2017/02/17 14:50:13 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze @@ -102,7 +102,7 @@ static void parse(struct curparse *, int, const char *); static void passthrough(const char *, int, int); static pid_t spawn_pager(struct tag_files *); static int toptions(struct curparse *, char *); -static void usage(enum argmode) __attribute__((noreturn)); +static void usage(enum argmode) __attribute__((__noreturn__)); static int woptions(struct curparse *, char *); static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9}; diff --git a/mandocdb.c b/mandocdb.c index 964f23c6..8fbffeb0 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.220.2.11 2017/01/27 14:32:54 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.220.2.12 2017/02/17 14:50:13 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2017 Ingo Schwarze @@ -194,7 +194,7 @@ static void putmdockey(const struct mpage *, const struct roff_node *, uint64_t, int); static int render_string(char **, size_t *); static void say(const char *, const char *, ...) - __attribute__((__format__ (printf, 2, 3))); + __attribute__((__format__ (__printf__, 2, 3))); static int set_basedir(const char *, int); static int treescan(void); static size_t utf8(unsigned int, char [7]); @@ -625,7 +625,7 @@ treescan(void) const char *argv[2]; argv[0] = "."; - argv[1] = (char *)NULL; + argv[1] = NULL; f = fts_open((char * const *)argv, FTS_PHYSICAL | FTS_NOCHDIR, fts_compare); -- cgit v1.2.3-56-ge451