From 8a1e7c36cb8b9ca64c677d1ff9d786c9e46fd7b0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 2 Apr 2015 22:48:17 +0000 Subject: 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. --- man_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'man_hash.c') diff --git a/man_hash.c b/man_hash.c index d24d9ecf..8726614a 100644 --- a/man_hash.c +++ b/man_hash.c @@ -1,4 +1,4 @@ -/* $Id: man_hash.c,v 1.30 2015/04/02 21:36:49 schwarze Exp $ */ +/* $Id: man_hash.c,v 1.31 2015/04/02 22:48:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -77,11 +77,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); @@ -94,7 +94,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); } -- cgit v1.2.3-56-ge451