=================================================================== RCS file: /cvs/mandoc/man.c,v retrieving revision 1.45 retrieving revision 1.47 diff -u -p -r1.45 -r1.47 --- mandoc/man.c 2009/10/30 05:58:37 1.45 +++ mandoc/man.c 2010/01/01 17:14:27 1.47 @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.45 2009/10/30 05:58:37 kristaps Exp $ */ +/* $Id: man.c,v 1.47 2010/01/01 17:14:27 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -14,6 +14,10 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include @@ -72,11 +76,7 @@ static int pstring(struct man *, int, int, const char *, size_t); static int macrowarn(struct man *, int, const char *); -#ifdef __linux__ -extern size_t strlcpy(char *, const char *, size_t); -#endif - const struct man_node * man_node(const struct man *m) { @@ -454,8 +454,8 @@ man_pmacro(struct man *m, int ln, char *buf) fl = m->flags; - if (0 == buf[1]) - goto out; + if ('\0' == buf[1]) + return(1); i = 1; @@ -484,7 +484,7 @@ man_pmacro(struct man *m, int ln, char *buf) return(man_perr(m, ln, i, WNPRINT)); } - mac[j] = 0; + mac[j] = '\0'; if (j == 4 || j < 1) { if ( ! (MAN_IGN_MACRO & m->pflags)) {