diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-13 06:17:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-13 06:17:18 +0000 |
commit | 1c9e3a649230434b4ca0bb0b22a6e0165e048305 (patch) | |
tree | 7d3873182d1ed17369baa181956d96ef7da5ae40 /usr.bin/mandoc | |
parent | 1789e8ed4cf7e787cf02a57f980465dad6edf2b9 (diff) |
Cleanup, no functional change:
Move the roffhash_*() functions from roff.h to roff_int.h
because they are only intended for use by parsers,
neither by main programs nor by formatters.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/read.c | 3 | ||||
-rw-r--r-- | usr.bin/mandoc/roff.h | 7 | ||||
-rw-r--r-- | usr.bin/mandoc/roff_int.h | 10 |
3 files changed, 13 insertions, 7 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index e6c81ed3516..551a7971ca6 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.172 2018/08/25 16:43:52 schwarze Exp $ */ +/* $OpenBSD: read.c,v 1.173 2018/12/13 06:17:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org> @@ -37,6 +37,7 @@ #include "mdoc.h" #include "man.h" #include "libmandoc.h" +#include "roff_int.h" #define REPARSE_LIMIT 1000 diff --git a/usr.bin/mandoc/roff.h b/usr.bin/mandoc/roff.h index 361d6e1b917..151500ba3f4 100644 --- a/usr.bin/mandoc/roff.h +++ b/usr.bin/mandoc/roff.h @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.h,v 1.44 2018/12/13 02:05:57 schwarze Exp $ */ +/* $OpenBSD: roff.h,v 1.45 2018/12/13 06:17:17 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> @@ -14,6 +14,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Common data types for all syntax trees and related functions. */ struct ohash; @@ -577,7 +579,4 @@ extern const char *const *roff_name; void deroff(char **, const struct roff_node *); -struct ohash *roffhash_alloc(enum roff_tok, enum roff_tok); -enum roff_tok roffhash_find(struct ohash *, const char *, size_t); -void roffhash_free(struct ohash *); void roff_validate(struct roff_man *); diff --git a/usr.bin/mandoc/roff_int.h b/usr.bin/mandoc/roff_int.h index 8bd32eb597e..220e99e5464 100644 --- a/usr.bin/mandoc/roff_int.h +++ b/usr.bin/mandoc/roff_int.h @@ -1,7 +1,7 @@ -/* $OpenBSD: roff_int.h,v 1.10 2018/12/04 02:53:45 schwarze Exp $ */ +/* $OpenBSD: roff_int.h,v 1.11 2018/12/13 06:17:17 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2013, 2014, 2015, 2018 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -14,6 +14,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Parser internals shared by multiple parsers. */ struct roff_node *roff_node_alloc(struct roff_man *, int, int, @@ -30,6 +32,10 @@ void roff_node_relink(struct roff_man *, struct roff_node *); void roff_node_free(struct roff_node *); void roff_node_delete(struct roff_man *, struct roff_node *); +struct ohash *roffhash_alloc(enum roff_tok, enum roff_tok); +enum roff_tok roffhash_find(struct ohash *, const char *, size_t); +void roffhash_free(struct ohash *); + /* * Functions called from roff.c need to be declared here, * not in libmdoc.h or libman.h, even if they are specific |