diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-02 22:48:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-02 22:48:17 +0000 |
commit | 8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0 (patch) | |
tree | 8875174fa99d2fb62fe97ec308a53905416a4e4f /mdoc_hash.c | |
parent | 483afc5a7a52b601da9e854d5645cd4b0a140184 (diff) | |
download | mandoc-8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0.tar.gz mandoc-8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0.tar.zst mandoc-8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0.zip |
Second step towards parser unification:
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to p2k15.
Diffstat (limited to 'mdoc_hash.c')
-rw-r--r-- | mdoc_hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_hash.c b/mdoc_hash.c index 4513b026..cd576511 100644 --- a/mdoc_hash.c +++ b/mdoc_hash.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_hash.c,v 1.22 2015/04/02 21:36:50 schwarze Exp $ */ +/* $Id: mdoc_hash.c,v 1.23 2015/04/02 22:48:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -62,7 +62,7 @@ mdoc_hash_init(void) } } -enum mdoct +int mdoc_hash_find(const char *p) { int major, i, j; @@ -86,7 +86,7 @@ mdoc_hash_find(const char *p) if (UCHAR_MAX == (i = table[major + j])) break; if (0 == strcmp(p, mdoc_macronames[i])) - return((enum mdoct)i); + return(i); } return(MDOC_MAX); |