diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-09-21 21:11:38 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-09-21 21:11:38 +0000 |
commit | 2a1b4b314d3ac327c46f7aba65e67bf92b4b7e60 (patch) | |
tree | 3250ca9bc4a8c16ebbb57abdb90f9f1bd9ce84e4 /usr.bin/mandoc/mdoc_action.c | |
parent | f80ca1f01053a477123e46378108aca2f4371a5e (diff) |
sync to 1.9.5: lookup hashes are now static tables
shortening the code, and, according to kristaps@, speeding it up
Diffstat (limited to 'usr.bin/mandoc/mdoc_action.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_action.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_action.c b/usr.bin/mandoc/mdoc_action.c index 258b8bb059c..b19180a3936 100644 --- a/usr.bin/mandoc/mdoc_action.c +++ b/usr.bin/mandoc/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.20 2009/08/22 22:50:17 schwarze Exp $ */ +/* $Id: mdoc_action.c,v 1.21 2009/09/21 21:11:37 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -53,7 +53,7 @@ static int post_tilde(POST_ARGS); static int pre_bd(PRE_ARGS); static int pre_dl(PRE_ARGS); -const struct actions mdoc_actions[MDOC_MAX] = { +static const struct actions mdoc_actions[MDOC_MAX] = { { NULL, NULL }, /* Ap */ { NULL, post_dd }, /* Dd */ { NULL, post_dt }, /* Dt */ @@ -613,7 +613,7 @@ post_bl_width(POST_ARGS) if (0 == strcmp(p, "Ds")) width = 6; - else if (MDOC_MAX == (tok = mdoc_hash_find(m->htab, p))) + else if (MDOC_MAX == (tok = mdoc_hash_find(p))) return(1); else if (0 == (width = mdoc_macro2len(tok))) return(mdoc_nwarn(m, n, ENOWIDTH)); |