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

Diff for /mandoc/tbl_opts.c between version 1.18 and 1.22

version 1.18, 2015/01/26 13:03:48 version 1.22, 2018/12/12 21:54:35
Line 25 
Line 25 
 #include <string.h>  #include <string.h>
   
 #include "mandoc.h"  #include "mandoc.h"
   #include "tbl.h"
 #include "libmandoc.h"  #include "libmandoc.h"
 #include "libroff.h"  #include "libroff.h"
   
Line 80  arg(struct tbl_node *tbl, int ln, const char *p, int *
Line 81  arg(struct tbl_node *tbl, int ln, const char *p, int *
   
         switch (key) {          switch (key) {
         case KEY_DELIM:          case KEY_DELIM:
                 mandoc_msg(MANDOCERR_TBLEQN, tbl->parse, ln, *pos, NULL);                  mandoc_vmsg(MANDOCERR_TBLOPT_EQN, tbl->parse,
                       ln, *pos, "%.*s", len, p + *pos);
                 want = 2;                  want = 2;
                 break;                  break;
         case KEY_TAB:          case KEY_TAB:
Line 98  arg(struct tbl_node *tbl, int ln, const char *p, int *
Line 100  arg(struct tbl_node *tbl, int ln, const char *p, int *
                 break;                  break;
         default:          default:
                 abort();                  abort();
                 /* NOTREACHED */  
         }          }
   
         if (len == 0)          if (len == 0)
Line 120  arg(struct tbl_node *tbl, int ln, const char *p, int *
Line 121  arg(struct tbl_node *tbl, int ln, const char *p, int *
  * and some options are followed by arguments.   * and some options are followed by arguments.
  */   */
 void  void
 tbl_option(struct tbl_node *tbl, int ln, const char *p)  tbl_option(struct tbl_node *tbl, int ln, const char *p, int *offs)
 {  {
         int              i, pos, len;          int              i, pos, len;
   
         pos = 0;          pos = *offs;
         for (;;) {          for (;;) {
                 while (p[pos] == ' ' || p[pos] == '\t' || p[pos] == ',')                  while (p[pos] == ' ' || p[pos] == '\t' || p[pos] == ',')
                         pos++;                          pos++;
   
                 if (p[pos] == ';')                  if (p[pos] == ';') {
                           *offs = pos + 1;
                         return;                          return;
                   }
   
                 /* Parse one option name. */                  /* Parse one option name. */
   

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.22

CVSweb