From f9a4c0556641ef6c4137e3b06cf137bb9f8e7dab Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 26 Mar 2009 14:44:41 +0000 Subject: Fixed after-NLINE-error assertion. Scanned over all manuals with valgrind. Version up. --- Makefile | 2 +- man.c | 6 +++--- man_term.c | 7 ++++++- mdoc_term.c | 7 ++++++- terminal.c | 7 +------ 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index d588637a..cfa6400c 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ INSTALL_DATA = install -m 0444 INSTALL_LIB = install -m 0644 INSTALL_MAN = $(INSTALL_DATA) -VERSION = 1.7.4 +VERSION = 1.7.5 VDATE = 26 March 2009 VFLAGS = -DVERSION=\"$(VERSION)\" diff --git a/man.c b/man.c index eab8e400..f0f5b83c 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.11 2009/03/26 14:38:11 kristaps Exp $ */ +/* $Id: man.c,v 1.12 2009/03/26 14:44:41 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -343,7 +343,7 @@ man_pmacro(struct man *m, int ln, char *buf) if ( ! man_vwarn(m, ln, ppos, "ill-formed macro: %s", mac)) goto err; - goto out; + return(1); } if (MAN_MAX == (c = man_hash_find(m->htab, mac))) { @@ -355,7 +355,7 @@ man_pmacro(struct man *m, int ln, char *buf) if ( ! man_vwarn(m, ln, ppos, "unknown macro: %s", mac)) goto err; - goto out; + return(1); } /* The macro is sane. Jump to the next word. */ diff --git a/man_term.c b/man_term.c index d5d95edc..7d1ff159 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.1 2009/03/26 14:38:11 kristaps Exp $ */ +/* $Id: man_term.c,v 1.2 2009/03/26 14:44:41 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -25,6 +25,11 @@ #include "term.h" #include "man.h" +#ifdef __linux__ +extern size_t strlcpy(char *, const char *, size_t); +extern size_t strlcat(char *, const char *, size_t); +#endif + #define DECL_ARGS struct termp *p, \ const struct man_node *n, \ const struct man_meta *m diff --git a/mdoc_term.c b/mdoc_term.c index 091c79ce..ad0e3b2f 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.1 2009/03/26 14:38:11 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.2 2009/03/26 14:44:41 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -306,6 +306,11 @@ static const struct termact termacts[MDOC_MAX] = { { NULL, NULL }, /* %Q */ }; +#ifdef __linux__ +extern size_t strlcpy(char *, const char *, size_t); +extern size_t strlcat(char *, const char *, size_t); +#endif + static int arg_hasattr(int, const struct mdoc_node *); static int arg_getattrs(const int *, int *, size_t, const struct mdoc_node *); diff --git a/terminal.c b/terminal.c index 315625d2..2c991534 100644 --- a/terminal.c +++ b/terminal.c @@ -1,4 +1,4 @@ -/* $Id: terminal.c,v 1.9 2009/03/26 14:38:11 kristaps Exp $ */ +/* $Id: terminal.c,v 1.10 2009/03/26 14:44:41 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -26,11 +26,6 @@ #include "man.h" #include "mdoc.h" -#ifdef __linux__ -extern size_t strlcpy(char *, const char *, size_t); -extern size_t strlcat(char *, const char *, size_t); -#endif - extern int man_run(struct termp *, const struct man *); extern int mdoc_run(struct termp *, -- cgit v1.2.3-56-ge451