summaryrefslogtreecommitdiffstats
path: root/roff.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-04-29 12:45:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-04-29 12:45:41 +0000
commit59d32b6b6f099db4e98d14846f92c95838026d6d (patch)
tree63c63032b5f693739f4b67978ba829797d59256c /roff.h
parent68e287f8a84e78c626e8440ced37035bd5359eff (diff)
downloadmandoc-59d32b6b6f099db4e98d14846f92c95838026d6d.tar.gz
Parser unification: use nice ohashes for all three request and macro tables;
no functional change, minus two source files, minus 200 lines of code.
Diffstat (limited to 'roff.h')
-rw-r--r--roff.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/roff.h b/roff.h
index 0450dc10..f0d43e7f 100644
--- a/roff.h
+++ b/roff.h
@@ -16,6 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+struct ohash;
struct mdoc_arg;
union mdoc_data;
@@ -538,6 +539,8 @@ struct roff_man {
struct roff_meta meta; /* Document meta-data. */
struct mparse *parse; /* Parse pointer. */
struct roff *roff; /* Roff parser state data. */
+ struct ohash *mdocmac; /* Mdoc macro lookup table. */
+ struct ohash *manmac; /* Man macro lookup table. */
const char *defos; /* Default operating system. */
struct roff_node *first; /* The first node parsed. */
struct roff_node *last; /* The last node parsed. */
@@ -569,4 +572,8 @@ struct roff_man {
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 *);