summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/mandoc/libman.h3
-rw-r--r--usr.bin/mandoc/man.c21
-rw-r--r--usr.bin/mandoc/man_macro.c4
-rw-r--r--usr.bin/mandoc/man_validate.c5
4 files changed, 6 insertions, 27 deletions
diff --git a/usr.bin/mandoc/libman.h b/usr.bin/mandoc/libman.h
index 21794972124..daffd76a0c3 100644
--- a/usr.bin/mandoc/libman.h
+++ b/usr.bin/mandoc/libman.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libman.h,v 1.60 2018/12/31 04:55:42 schwarze Exp $ */
+/* $OpenBSD: libman.h,v 1.61 2018/12/31 10:03:38 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -39,5 +39,4 @@ struct man_macro {
const struct man_macro *man_macro(enum roff_tok);
void man_descope(struct roff_man *, int, int, char *);
-void man_state(struct roff_man *, struct roff_node *);
void man_unscope(struct roff_man *, const struct roff_node *);
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index bfc6b6e5b3b..2112012e717 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.c,v 1.133 2018/12/31 08:38:17 schwarze Exp $ */
+/* $OpenBSD: man.c,v 1.134 2018/12/31 10:03:38 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -341,22 +341,3 @@ man_breakscope(struct roff_man *man, int tok)
man->flags &= ~MAN_BLINE;
}
}
-
-void
-man_state(struct roff_man *man, struct roff_node *n)
-{
-
- switch(n->tok) {
- case ROFF_nf:
- case MAN_EX:
- man->flags |= ROFF_NOFILL;
- break;
- case ROFF_fi:
- case MAN_EE:
- man->flags &= ~ROFF_NOFILL;
- break;
- default:
- break;
- }
- man->last->flags |= NODE_VALID;
-}
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c
index 009fe26bf2d..d6e2f393720 100644
--- a/usr.bin/mandoc/man_macro.c
+++ b/usr.bin/mandoc/man_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_macro.c,v 1.103 2018/12/31 08:03:34 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.104 2018/12/31 10:03:38 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -427,7 +427,7 @@ in_line_eoln(MACRO_PROT_ARGS)
/* Rewind our element scope. */
for ( ; man->last; man->last = man->last->parent) {
- man_state(man, man->last);
+ man->last->flags |= NODE_VALID;
if (man->last == n)
break;
}
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c
index 7523d0404c8..f2d4c203184 100644
--- a/usr.bin/mandoc/man_validate.c
+++ b/usr.bin/mandoc/man_validate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_validate.c,v 1.115 2018/12/31 08:38:17 schwarze Exp $ */
+/* $OpenBSD: man_validate.c,v 1.116 2018/12/31 10:03:38 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -151,7 +151,6 @@ man_validate(struct roff_man *man)
default:
if (n->tok < ROFF_MAX) {
roff_validate(man);
- man_state(man, n);
break;
}
assert(n->tok >= MAN_TH && n->tok < MAN_MAX);
@@ -159,7 +158,7 @@ man_validate(struct roff_man *man)
if (*cp)
(*cp)(man, n);
if (man->last == n)
- man_state(man, n);
+ n->flags |= NODE_VALID;
break;
}
}