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

Diff for /mandoc/mdoc_validate.c between version 1.228 and 1.231

version 1.228, 2014/07/05 12:34:17 version 1.231, 2014/07/29 13:58:18
Line 551  check_text(struct mdoc *mdoc, int ln, int pos, char *p
Line 551  check_text(struct mdoc *mdoc, int ln, int pos, char *p
                 return;                  return;
   
         for (cp = p; NULL != (p = strchr(p, '\t')); p++)          for (cp = p; NULL != (p = strchr(p, '\t')); p++)
                 mdoc_pmsg(mdoc, ln, pos + (int)(p - cp), MANDOCERR_BADTAB);                  mandoc_msg(MANDOCERR_FI_TAB, mdoc->parse,
                       ln, pos + (int)(p - cp), NULL);
 }  }
   
 static int  static int
Line 801  pre_bd(PRE_ARGS)
Line 802  pre_bd(PRE_ARGS)
   
                 switch (argv->arg) {                  switch (argv->arg) {
                 case MDOC_Centred:                  case MDOC_Centred:
                         dt = DISP_centred;                          dt = DISP_centered;
                         break;                          break;
                 case MDOC_Ragged:                  case MDOC_Ragged:
                         dt = DISP_ragged;                          dt = DISP_ragged;
Line 1767  post_rs(POST_ARGS)
Line 1768  post_rs(POST_ARGS)
         }          }
   
         /*          /*
          * Make sure only certain types of nodes are allowed within the  
          * the `Rs' body.  Delete offending nodes and raise a warning.  
          * Do this before re-ordering for the sake of clarity.  
          */  
   
         next = NULL;  
         for (nn = mdoc->last->child; nn; nn = next) {  
                 for (i = 0; i < RSORD_MAX; i++)  
                         if (nn->tok == rsord[i])  
                                 break;  
   
                 if (i < RSORD_MAX) {  
                         if (MDOC__J == rsord[i] || MDOC__B == rsord[i])  
                                 mdoc->last->norm->Rs.quote_T++;  
                         next = nn->next;  
                         continue;  
                 }  
   
                 next = nn->next;  
                 mandoc_msg(MANDOCERR_RS_SKIP, mdoc->parse,  
                     nn->line, nn->pos, mdoc_macronames[nn->tok]);  
                 mdoc_node_delete(mdoc, nn);  
         }  
   
         /*  
          * Nothing to sort if only invalid nodes were found  
          * inside the `Rs' body.  
          */  
   
         if (NULL == mdoc->last->child)  
                 return(1);  
   
         /*  
          * The full `Rs' block needs special handling to order the           * The full `Rs' block needs special handling to order the
          * sub-elements according to `rsord'.  Pick through each element           * sub-elements according to `rsord'.  Pick through each element
          * and correctly order it.  This is a insertion sort.           * and correctly order it.  This is an insertion sort.
          */           */
   
         next = NULL;          next = NULL;
Line 1812  post_rs(POST_ARGS)
Line 1780  post_rs(POST_ARGS)
                         if (rsord[i] == nn->tok)                          if (rsord[i] == nn->tok)
                                 break;                                  break;
   
                   if (i == RSORD_MAX) {
                           mandoc_msg(MANDOCERR_RS_BAD,
                               mdoc->parse, nn->line, nn->pos,
                               mdoc_macronames[nn->tok]);
                           i = -1;
                   } else if (MDOC__J == nn->tok || MDOC__B == nn->tok)
                           mdoc->last->norm->Rs.quote_T++;
   
                 /*                  /*
                  * Remove `nn' from the chain.  This somewhat                   * Remove `nn' from the chain.  This somewhat
                  * repeats mdoc_node_unlink(), but since we're                   * repeats mdoc_node_unlink(), but since we're
Line 1837  post_rs(POST_ARGS)
Line 1813  post_rs(POST_ARGS)
                         for (j = 0; j < RSORD_MAX; j++)                          for (j = 0; j < RSORD_MAX; j++)
                                 if (rsord[j] == prev->tok)                                  if (rsord[j] == prev->tok)
                                         break;                                          break;
                           if (j == RSORD_MAX)
                                   j = -1;
   
                         if (j <= i)                          if (j <= i)
                                 break;                                  break;

Legend:
Removed from v.1.228  
changed lines
  Added in v.1.231

CVSweb