summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_hash.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-02 22:06:18 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-02 22:06:18 +0000
commitf68738e465e4d800ca41fee5600460ce8b80b01d (patch)
tree57b05ac5d994f7bafb61503553b0dad41b4e9c91 /usr.bin/mandoc/man_hash.c
parent3b3e2458469c3b7a54a16224bfa57e6e0c0d6b73 (diff)
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 'usr.bin/mandoc/man_hash.c')
-rw-r--r--usr.bin/mandoc/man_hash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mandoc/man_hash.c b/usr.bin/mandoc/man_hash.c
index 4618424b0d0..d80a9257879 100644
--- a/usr.bin/mandoc/man_hash.c
+++ b/usr.bin/mandoc/man_hash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_hash.c,v 1.20 2015/04/02 21:03:18 schwarze Exp $ */
+/* $OpenBSD: man_hash.c,v 1.21 2015/04/02 22:06:17 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -75,11 +75,11 @@ man_hash_init(void)
}
}
-enum mant
+int
man_hash_find(const char *tmp)
{
int x, y, i;
- enum mant tok;
+ int tok;
if ('\0' == (x = tmp[0]))
return(MAN_MAX);
@@ -92,7 +92,7 @@ man_hash_find(const char *tmp)
if (UCHAR_MAX == (y = table[x + i]))
return(MAN_MAX);
- tok = (enum mant)y;
+ tok = y;
if (0 == strcmp(tmp, man_macronames[tok]))
return(tok);
}