[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.290 and 1.293

version 1.290, 2015/04/20 09:48:53 version 1.293, 2015/09/26 00:54:04
Line 107  static void  post_sh_see_also(POST_ARGS);
Line 107  static void  post_sh_see_also(POST_ARGS);
 static  void     post_sh_authors(POST_ARGS);  static  void     post_sh_authors(POST_ARGS);
 static  void     post_sm(POST_ARGS);  static  void     post_sm(POST_ARGS);
 static  void     post_st(POST_ARGS);  static  void     post_st(POST_ARGS);
 static  void     post_vt(POST_ARGS);  
   
 static  void     pre_an(PRE_ARGS);  static  void     pre_an(PRE_ARGS);
 static  void     pre_bd(PRE_ARGS);  static  void     pre_bd(PRE_ARGS);
Line 161  static const struct valids mdoc_valids[MDOC_MAX] = {
Line 160  static const struct valids mdoc_valids[MDOC_MAX] = {
         { pre_std, NULL },                      /* Rv */          { pre_std, NULL },                      /* Rv */
         { NULL, post_st },                      /* St */          { NULL, post_st },                      /* St */
         { NULL, NULL },                         /* Va */          { NULL, NULL },                         /* Va */
         { NULL, post_vt },                      /* Vt */          { NULL, NULL },                         /* Vt */
         { NULL, NULL },                         /* Xr */          { NULL, NULL },                         /* Xr */
         { NULL, NULL },                         /* %A */          { NULL, NULL },                         /* %A */
         { NULL, post_hyph },                    /* %B */ /* FIXME: can be used outside Rs/Re. */          { NULL, post_hyph },                    /* %B */ /* FIXME: can be used outside Rs/Re. */
Line 658  pre_bd(PRE_ARGS)
Line 657  pre_bd(PRE_ARGS)
                         break;                          break;
                 default:                  default:
                         abort();                          abort();
                         /* NOTREACHED */  
                 }                  }
                 if (DISP__NONE == dt)                  if (DISP__NONE == dt)
                         continue;                          continue;
Line 933  post_fa(POST_ARGS)
Line 931  post_fa(POST_ARGS)
 }  }
   
 static void  static void
 post_vt(POST_ARGS)  
 {  
         const struct roff_node *n;  
   
         /*  
          * The Vt macro comes in both ELEM and BLOCK form, both of which  
          * have different syntaxes (yet more context-sensitive  
          * behaviour).  ELEM types must have a child, which is already  
          * guaranteed by the in_line parsing routine; BLOCK types,  
          * specifically the BODY, should only have TEXT children.  
          */  
   
         if (mdoc->last->type != ROFFT_BODY)  
                 return;  
   
         for (n = mdoc->last->child; n; n = n->next)  
                 if (n->type != ROFFT_TEXT)  
                         mandoc_msg(MANDOCERR_VT_CHILD, mdoc->parse,  
                             n->line, n->pos, mdoc_macronames[n->tok]);  
 }  
   
 static void  
 post_nm(POST_ARGS)  post_nm(POST_ARGS)
 {  {
         struct roff_node        *n;          struct roff_node        *n;
Line 969  post_nm(POST_ARGS)
Line 945  post_nm(POST_ARGS)
         if (NULL != mdoc->meta.name)          if (NULL != mdoc->meta.name)
                 return;                  return;
   
         mdoc_deroff(&mdoc->meta.name, n);          deroff(&mdoc->meta.name, n);
   
         if (NULL == mdoc->meta.name)          if (NULL == mdoc->meta.name)
                 mandoc_msg(MANDOCERR_NM_NONAME, mdoc->parse,                  mandoc_msg(MANDOCERR_NM_NONAME, mdoc->parse,
Line 1061  post_defaults(POST_ARGS)
Line 1037  post_defaults(POST_ARGS)
                 break;                  break;
         default:          default:
                 abort();                  abort();
                 /* NOTREACHED */  
         }          }
         mdoc->last = nn;          mdoc->last = nn;
 }  }
Line 1883  post_sh_head(POST_ARGS)
Line 1858  post_sh_head(POST_ARGS)
   
         secname = NULL;          secname = NULL;
         sec = SEC_CUSTOM;          sec = SEC_CUSTOM;
         mdoc_deroff(&secname, mdoc->last);          deroff(&secname, mdoc->last);
         sec = NULL == secname ? SEC_CUSTOM : a2sec(secname);          sec = NULL == secname ? SEC_CUSTOM : a2sec(secname);
   
         /* The NAME should be first. */          /* The NAME should be first. */
Line 2111  pre_literal(PRE_ARGS)
Line 2086  pre_literal(PRE_ARGS)
                 break;                  break;
         default:          default:
                 abort();                  abort();
                 /* NOTREACHED */  
         }          }
 }  }
   
Line 2132  post_dd(POST_ARGS)
Line 2106  post_dd(POST_ARGS)
         }          }
   
         datestr = NULL;          datestr = NULL;
         mdoc_deroff(&datestr, n);          deroff(&datestr, n);
         if (mdoc->quick)          if (mdoc->quick)
                 mdoc->meta.date = datestr;                  mdoc->meta.date = datestr;
         else {          else {
Line 2267  post_os(POST_ARGS)
Line 2241  post_os(POST_ARGS)
   
         free(mdoc->meta.os);          free(mdoc->meta.os);
         mdoc->meta.os = NULL;          mdoc->meta.os = NULL;
         mdoc_deroff(&mdoc->meta.os, n);          deroff(&mdoc->meta.os, n);
         if (mdoc->meta.os)          if (mdoc->meta.os)
                 goto out;                  goto out;
   

Legend:
Removed from v.1.290  
changed lines
  Added in v.1.293

CVSweb