=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_argv.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- src/usr.bin/mandoc/mdoc_argv.c 2017/05/30 16:21:07 1.71 +++ src/usr.bin/mandoc/mdoc_argv.c 2018/08/17 20:31:52 1.72 @@ -1,7 +1,7 @@ -/* $OpenBSD: mdoc_argv.c,v 1.71 2017/05/30 16:21:07 schwarze Exp $ */ +/* $OpenBSD: mdoc_argv.c,v 1.72 2018/08/17 20:31:52 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2012, 2014-2017 Ingo Schwarze + * Copyright (c) 2012, 2014-2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -142,7 +142,7 @@ MDOC_ARG_MAX }; -static const struct mdocarg __mdocargs[MDOC_MAX - MDOC_Dd] = { +static const struct mdocarg mdocargs[MDOC_MAX - MDOC_Dd] = { { ARGSFL_NONE, NULL }, /* Dd */ { ARGSFL_NONE, NULL }, /* Dt */ { ARGSFL_NONE, NULL }, /* Os */ @@ -264,7 +264,6 @@ { ARGSFL_NONE, NULL }, /* %U */ { ARGSFL_NONE, NULL }, /* Ta */ }; -static const struct mdocarg *const mdocargs = __mdocargs - MDOC_Dd; /* @@ -288,7 +287,7 @@ /* Which flags does this macro support? */ assert(tok >= MDOC_Dd && tok < MDOC_MAX); - argtable = mdocargs[tok].argvs; + argtable = mdocargs[tok - MDOC_Dd].argvs; if (argtable == NULL) return; @@ -366,7 +365,7 @@ /* Prepare for parsing the next flag. */ *pos = ipos; - argtable = mdocargs[tok].argvs; + argtable = mdocargs[tok - MDOC_Dd].argvs; } } @@ -420,7 +419,7 @@ if (v == NULL) v = &v_local; - fl = tok == TOKEN_NONE ? ARGSFL_NONE : mdocargs[tok].flags; + fl = tok == TOKEN_NONE ? ARGSFL_NONE : mdocargs[tok - MDOC_Dd].flags; /* * We know that we're in an `It', so it's reasonable to expect