summaryrefslogtreecommitdiffstats
path: root/mdoc_hash.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-19 14:00:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-19 14:00:19 +0000
commiteed5e7f1fb85805f1b324c5a4501ed30467ae2a0 (patch)
tree78f09c634d1cfc1b83be85f07be7ee909cbd6d30 /mdoc_hash.c
parent344327def21ee64357a9cdf57c5352f1c5575708 (diff)
downloadmandoc-eed5e7f1fb85805f1b324c5a4501ed30467ae2a0.tar.gz
Decouple the token code for "no request or macro" from the individual
high-level parsers to allow further unification of functions that only need to recognize this code, but that don't care about different high-level macrosets beyond that.
Diffstat (limited to 'mdoc_hash.c')
-rw-r--r--mdoc_hash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mdoc_hash.c b/mdoc_hash.c
index 7f7a47b1..8543e38c 100644
--- a/mdoc_hash.c
+++ b/mdoc_hash.c
@@ -67,19 +67,19 @@ mdoc_hash_find(const char *p)
int major, i, j;
if (0 == p[0])
- return(MDOC_MAX);
+ return(TOKEN_NONE);
if ( ! isalpha((unsigned char)p[0]) && '%' != p[0])
- return(MDOC_MAX);
+ return(TOKEN_NONE);
if (isalpha((unsigned char)p[1]))
major = 12 * (tolower((unsigned char)p[1]) - 97);
else if ('1' == p[1])
major = 12 * 26;
else
- return(MDOC_MAX);
+ return(TOKEN_NONE);
if (p[2] && p[3])
- return(MDOC_MAX);
+ return(TOKEN_NONE);
for (j = 0; j < 12; j++) {
if (UCHAR_MAX == (i = table[major + j]))
@@ -88,5 +88,5 @@ mdoc_hash_find(const char *p)
return(i);
}
- return(MDOC_MAX);
+ return(TOKEN_NONE);
}