[BACK]Return to mdoc_argv.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc_argv.c between version 1.115 and 1.116

version 1.115, 2017/05/30 16:22:03 version 1.116, 2018/08/17 20:33:37
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 144  static const enum mdocargt args_Bl[] = {
Line 144  static const enum mdocargt args_Bl[] = {
         MDOC_ARG_MAX          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 }, /* Dd */
         { ARGSFL_NONE, NULL }, /* Dt */          { ARGSFL_NONE, NULL }, /* Dt */
         { ARGSFL_NONE, NULL }, /* Os */          { ARGSFL_NONE, NULL }, /* Os */
Line 266  static const struct mdocarg __mdocargs[MDOC_MAX - MDOC
Line 266  static const struct mdocarg __mdocargs[MDOC_MAX - MDOC
         { ARGSFL_NONE, NULL }, /* %U */          { ARGSFL_NONE, NULL }, /* %U */
         { ARGSFL_NONE, NULL }, /* Ta */          { ARGSFL_NONE, NULL }, /* Ta */
 };  };
 static  const struct mdocarg *const mdocargs = __mdocargs - MDOC_Dd;  
   
   
 /*  /*
Line 290  mdoc_argv(struct roff_man *mdoc, int line, enum roff_t
Line 289  mdoc_argv(struct roff_man *mdoc, int line, enum roff_t
         /* Which flags does this macro support? */          /* Which flags does this macro support? */
   
         assert(tok >= MDOC_Dd && tok < MDOC_MAX);          assert(tok >= MDOC_Dd && tok < MDOC_MAX);
         argtable = mdocargs[tok].argvs;          argtable = mdocargs[tok - MDOC_Dd].argvs;
         if (argtable == NULL)          if (argtable == NULL)
                 return;                  return;
   
Line 368  mdoc_argv(struct roff_man *mdoc, int line, enum roff_t
Line 367  mdoc_argv(struct roff_man *mdoc, int line, enum roff_t
                 /* Prepare for parsing the next flag. */                  /* Prepare for parsing the next flag. */
   
                 *pos = ipos;                  *pos = ipos;
                 argtable = mdocargs[tok].argvs;                  argtable = mdocargs[tok - MDOC_Dd].argvs;
         }          }
 }  }
   
Line 422  mdoc_args(struct roff_man *mdoc, int line, int *pos,
Line 421  mdoc_args(struct roff_man *mdoc, int line, int *pos,
   
         if (v == NULL)          if (v == NULL)
                 v = &v_local;                  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           * We know that we're in an `It', so it's reasonable to expect

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.116

CVSweb