[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.349 and 1.353

version 1.349, 2017/07/15 16:40:29 version 1.353, 2017/09/12 18:21:03
Line 1137  post_fname(POST_ARGS)
Line 1137  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 1205  post_nm(POST_ARGS)
Line 1203  post_nm(POST_ARGS)
   
         n = mdoc->last;          n = mdoc->last;
   
         if ((n->sec == SEC_NAME || n->sec == SEC_SYNOPSIS) &&          if (n->sec == SEC_NAME && n->child != NULL &&
             n->child != NULL && n->child->type == ROFFT_TEXT &&              n->child->type == ROFFT_TEXT && mdoc->meta.msec != NULL)
             mdoc->meta.msec != NULL)  
                 mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1);                  mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1);
   
         if (n->last != NULL &&          if (n->last != NULL &&
Line 1423  post_xx(POST_ARGS)
Line 1420  post_xx(POST_ARGS)
 {  {
         struct roff_node        *n;          struct roff_node        *n;
         const char              *os;          const char              *os;
           char                    *v;
   
         post_delim_nb(mdoc);          post_delim_nb(mdoc);
   
Line 1439  post_xx(POST_ARGS)
Line 1437  post_xx(POST_ARGS)
                 break;                  break;
         case MDOC_Nx:          case MDOC_Nx:
                 os = "NetBSD";                  os = "NetBSD";
                   if (n->child == NULL)
                           break;
                   v = n->child->string;
                   if ((v[0] != '0' && v[0] != '1') || v[1] != '.' ||
                       v[2] < '0' || v[2] > '9' ||
                       v[3] < 'a' || v[3] > 'z' || v[4] != '\0')
                           break;
                   n->child->flags |= NODE_NOPRT;
                   mdoc->next = ROFF_NEXT_CHILD;
                   roff_word_alloc(mdoc, n->child->line, n->child->pos, v);
                   v = mdoc->last->string;
                   v[3] = toupper((unsigned char)v[3]);
                   mdoc->last->flags |= NODE_NOSRC;
                   mdoc->last = n;
                 break;                  break;
         case MDOC_Ox:          case MDOC_Ox:
                 os = "OpenBSD";                  os = "OpenBSD";
Line 1902  post_root(POST_ARGS)
Line 1914  post_root(POST_ARGS)
                         arch++;                          arch++;
                 if (*arch == NULL) {                  if (*arch == NULL) {
                         n = mdoc->first->child;                          n = mdoc->first->child;
                         while (n->tok != MDOC_Dt)                          while (n->tok != MDOC_Dt ||
                               n->child == NULL ||
                               n->child->next == NULL ||
                               n->child->next->next == NULL)
                                 n = n->next;                                  n = n->next;
                         n = n->child->next->next;                          n = n->child->next->next;
                         mandoc_vmsg(MANDOCERR_ARCH_BAD,                          mandoc_vmsg(MANDOCERR_ARCH_BAD,
Line 1916  post_root(POST_ARGS)
Line 1931  post_root(POST_ARGS)
         /* Check that we begin with a proper `Sh'. */          /* Check that we begin with a proper `Sh'. */
   
         n = mdoc->first->child;          n = mdoc->first->child;
         while (n != NULL && n->tok != TOKEN_NONE &&          while (n != NULL && n->tok >= MDOC_Dd &&
             mdoc_macros[n->tok].flags & MDOC_PROLOGUE)              mdoc_macros[n->tok].flags & MDOC_PROLOGUE)
                 n = n->next;                  n = n->next;
   

Legend:
Removed from v.1.349  
changed lines
  Added in v.1.353

CVSweb