[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.330 and 1.331

version 1.330, 2017/06/01 15:25:39 version 1.331, 2017/06/07 23:29:48
Line 1479  post_bl(POST_ARGS)
Line 1479  post_bl(POST_ARGS)
         struct roff_node        *nparent, *nprev; /* of the Bl block */          struct roff_node        *nparent, *nprev; /* of the Bl block */
         struct roff_node        *nblock, *nbody;  /* of the Bl */          struct roff_node        *nblock, *nbody;  /* of the Bl */
         struct roff_node        *nchild, *nnext;  /* of the Bl body */          struct roff_node        *nchild, *nnext;  /* of the Bl body */
           const char              *prev_Er;
           int                      order;
   
         nbody = mdoc->last;          nbody = mdoc->last;
         switch (nbody->type) {          switch (nbody->type) {
Line 1579  post_bl(POST_ARGS)
Line 1581  post_bl(POST_ARGS)
   
                 nchild = nnext;                  nchild = nnext;
         }          }
   
           if (mdoc->meta.os_e != MDOC_OS_NETBSD)
                   return;
   
           prev_Er = NULL;
           for (nchild = nbody->child; nchild != NULL; nchild = nchild->next) {
                   if (nchild->tok != MDOC_It)
                           continue;
                   if ((nnext = nchild->head->child) == NULL)
                           continue;
                   if (nnext->type == ROFFT_BLOCK)
                           nnext = nnext->body->child;
                   if (nnext == NULL || nnext->tok != MDOC_Er)
                           continue;
                   nnext = nnext->child;
                   if (prev_Er != NULL) {
                           order = strcmp(prev_Er, nnext->string);
                           if (order > 0)
                                   mandoc_vmsg(MANDOCERR_ER_ORDER,
                                       mdoc->parse, nnext->line, nnext->pos,
                                       "Er %s %s", prev_Er, nnext->string);
                           else if (order == 0)
                                   mandoc_vmsg(MANDOCERR_ER_REP,
                                       mdoc->parse, nnext->line, nnext->pos,
                                       "Er %s", prev_Er);
                   }
                   prev_Er = nnext->string;
           }
 }  }
   
 static void  static void
Line 2385  post_os(POST_ARGS)
Line 2415  post_os(POST_ARGS)
         mdoc->meta.os = NULL;          mdoc->meta.os = NULL;
         deroff(&mdoc->meta.os, n);          deroff(&mdoc->meta.os, n);
         if (mdoc->meta.os)          if (mdoc->meta.os)
                 return;                  goto out;
   
         if (mdoc->defos) {          if (mdoc->defos) {
                 mdoc->meta.os = mandoc_strdup(mdoc->defos);                  mdoc->meta.os = mandoc_strdup(mdoc->defos);
                 return;                  goto out;
         }          }
   
 #ifdef OSNAME  #ifdef OSNAME
Line 2406  post_os(POST_ARGS)
Line 2436  post_os(POST_ARGS)
         }          }
         mdoc->meta.os = mandoc_strdup(defbuf);          mdoc->meta.os = mandoc_strdup(defbuf);
 #endif /*!OSNAME*/  #endif /*!OSNAME*/
   
   out:    mdoc->meta.os_e = strstr(mdoc->meta.os, "OpenBSD") != NULL ?
               MDOC_OS_OPENBSD : strstr(mdoc->meta.os, "NetBSD") != NULL ?
               MDOC_OS_NETBSD : MDOC_OS_OTHER;
 }  }
   
 enum roff_sec  enum roff_sec

Legend:
Removed from v.1.330  
changed lines
  Added in v.1.331

CVSweb