[BACK]Return to mdoc_argv.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mdoc_argv.c between version 1.71 and 1.72

version 1.71, 2017/05/30 16:21:07 version 1.72, 2018/08/17 20:31:52
Line 1 
Line 1 
 /*      $OpenBSD$ */  /*      $OpenBSD$ */
 /*  /*
  * 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 142 
Line 142 
         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 264 
Line 264 
         { 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 288 
Line 287 
         /* 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 366 
Line 365 
                 /* 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 420 
Line 419 
   
         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.71  
changed lines
  Added in v.1.72