[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.345 and 1.347

version 1.345, 2017/06/29 15:22:17 version 1.347, 2017/07/02 15:31:59
Line 33 
Line 33 
   
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
 #include "mandoc.h"  #include "mandoc.h"
   #include "mandoc_xr.h"
 #include "roff.h"  #include "roff.h"
 #include "mdoc.h"  #include "mdoc.h"
 #include "libmandoc.h"  #include "libmandoc.h"
Line 1103  post_fname(POST_ARGS)
Line 1104  post_fname(POST_ARGS)
         if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*')))          if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*')))
                 mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse,                  mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse,
                     n->line, n->pos + pos, n->string);                      n->line, n->pos + pos, n->string);
           if (n->sec == SEC_SYNOPSIS && mdoc->meta.msec != NULL)
                   mandoc_xr_add(mdoc->meta.msec, n->string, -1, -1);
 }  }
   
 static void  static void
Line 1168  post_nm(POST_ARGS)
Line 1171  post_nm(POST_ARGS)
   
         n = mdoc->last;          n = mdoc->last;
   
           if ((n->sec == SEC_NAME || n->sec == SEC_SYNOPSIS) &&
               n->child != NULL && n->child->type == ROFFT_TEXT &&
               mdoc->meta.msec != NULL)
                   mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1);
   
         if (n->last != NULL &&          if (n->last != NULL &&
             (n->last->tok == MDOC_Pp ||              (n->last->tok == MDOC_Pp ||
              n->last->tok == MDOC_Lp))               n->last->tok == MDOC_Lp))
Line 2336  post_xr(POST_ARGS)
Line 2344  post_xr(POST_ARGS)
         if (nch->next == NULL) {          if (nch->next == NULL) {
                 mandoc_vmsg(MANDOCERR_XR_NOSEC, mdoc->parse,                  mandoc_vmsg(MANDOCERR_XR_NOSEC, mdoc->parse,
                     n->line, n->pos, "Xr %s", nch->string);                      n->line, n->pos, "Xr %s", nch->string);
         } else          } else {
                 assert(nch->next == n->last);                  assert(nch->next == n->last);
                   if(mandoc_xr_add(nch->next->string, nch->string,
                       nch->line, nch->pos))
                           mandoc_vmsg(MANDOCERR_XR_SELF, mdoc->parse,
                               nch->line, nch->pos, "Xr %s %s",
                               nch->string, nch->next->string);
           }
         post_delim(mdoc);          post_delim(mdoc);
 }  }
   

Legend:
Removed from v.1.345  
changed lines
  Added in v.1.347

CVSweb