[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.152 and 1.156

version 1.152, 2011/01/22 14:00:52 version 1.156, 2011/02/06 21:44:36
Line 95  static int  post_bl_block(POST_ARGS);
Line 95  static int  post_bl_block(POST_ARGS);
 static  int      post_bl_block_width(POST_ARGS);  static  int      post_bl_block_width(POST_ARGS);
 static  int      post_bl_block_tag(POST_ARGS);  static  int      post_bl_block_tag(POST_ARGS);
 static  int      post_bl_head(POST_ARGS);  static  int      post_bl_head(POST_ARGS);
   static  int      post_bx(POST_ARGS);
 static  int      post_dd(POST_ARGS);  static  int      post_dd(POST_ARGS);
 static  int      post_dt(POST_ARGS);  static  int      post_dt(POST_ARGS);
 static  int      post_defaults(POST_ARGS);  static  int      post_defaults(POST_ARGS);
Line 103  static int  post_eoln(POST_ARGS);
Line 104  static int  post_eoln(POST_ARGS);
 static  int      post_it(POST_ARGS);  static  int      post_it(POST_ARGS);
 static  int      post_lb(POST_ARGS);  static  int      post_lb(POST_ARGS);
 static  int      post_nm(POST_ARGS);  static  int      post_nm(POST_ARGS);
   static  int      post_ns(POST_ARGS);
 static  int      post_os(POST_ARGS);  static  int      post_os(POST_ARGS);
 static  int      post_ignpar(POST_ARGS);  static  int      post_ignpar(POST_ARGS);
 static  int      post_prol(POST_ARGS);  static  int      post_prol(POST_ARGS);
Line 134  static v_post  posts_bd[] = { post_literal, hwarn_eq0,
Line 136  static v_post  posts_bd[] = { post_literal, hwarn_eq0,
 static  v_post   posts_bf[] = { hwarn_le1, post_bf, NULL };  static  v_post   posts_bf[] = { hwarn_le1, post_bf, NULL };
 static  v_post   posts_bk[] = { hwarn_eq0, bwarn_ge1, NULL };  static  v_post   posts_bk[] = { hwarn_eq0, bwarn_ge1, NULL };
 static  v_post   posts_bl[] = { bwarn_ge1, post_bl, NULL };  static  v_post   posts_bl[] = { bwarn_ge1, post_bl, NULL };
   static  v_post   posts_bx[] = { post_bx, NULL };
 static  v_post   posts_bool[] = { ebool, NULL };  static  v_post   posts_bool[] = { ebool, NULL };
 static  v_post   posts_eoln[] = { post_eoln, NULL };  static  v_post   posts_eoln[] = { post_eoln, NULL };
 static  v_post   posts_defaults[] = { post_defaults, NULL };  static  v_post   posts_defaults[] = { post_defaults, NULL };
Line 146  static v_post  posts_lb[] = { post_lb, NULL };
Line 149  static v_post  posts_lb[] = { post_lb, NULL };
 static  v_post   posts_nd[] = { berr_ge1, NULL };  static  v_post   posts_nd[] = { berr_ge1, NULL };
 static  v_post   posts_nm[] = { post_nm, NULL };  static  v_post   posts_nm[] = { post_nm, NULL };
 static  v_post   posts_notext[] = { ewarn_eq0, NULL };  static  v_post   posts_notext[] = { ewarn_eq0, NULL };
   static  v_post   posts_ns[] = { post_ns, NULL };
 static  v_post   posts_os[] = { post_os, post_prol, NULL };  static  v_post   posts_os[] = { post_os, post_prol, NULL };
 static  v_post   posts_rs[] = { post_rs, NULL };  static  v_post   posts_rs[] = { post_rs, NULL };
 static  v_post   posts_sh[] = { post_ignpar, hwarn_ge1, bwarn_ge1, post_sh, NULL };  static  v_post   posts_sh[] = { post_ignpar, hwarn_ge1, bwarn_ge1, post_sh, NULL };
Line 235  const struct valids mdoc_valids[MDOC_MAX] = {
Line 239  const struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, NULL },                         /* Bo */          { NULL, NULL },                         /* Bo */
         { NULL, NULL },                         /* Bq */          { NULL, NULL },                         /* Bq */
         { NULL, NULL },                         /* Bsx */          { NULL, NULL },                         /* Bsx */
         { NULL, NULL },                         /* Bx */          { NULL, posts_bx },                     /* Bx */
         { NULL, posts_bool },                   /* Db */          { NULL, posts_bool },                   /* Db */
         { NULL, NULL },                         /* Dc */          { NULL, NULL },                         /* Dc */
         { NULL, NULL },                         /* Do */          { NULL, NULL },                         /* Do */
Line 247  const struct valids mdoc_valids[MDOC_MAX] = {
Line 251  const struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, NULL },                         /* Fx */          { NULL, NULL },                         /* Fx */
         { NULL, NULL },                         /* Ms */          { NULL, NULL },                         /* Ms */
         { NULL, posts_notext },                 /* No */          { NULL, posts_notext },                 /* No */
         { NULL, posts_notext },                 /* Ns */          { NULL, posts_ns },                     /* Ns */
         { NULL, NULL },                         /* Nx */          { NULL, NULL },                         /* Nx */
         { NULL, NULL },                         /* Ox */          { NULL, NULL },                         /* Ox */
         { NULL, NULL },                         /* Pc */          { NULL, NULL },                         /* Pc */
Line 334  mdoc_valid_pre(struct mdoc *mdoc, struct mdoc_node *n)
Line 338  mdoc_valid_pre(struct mdoc *mdoc, struct mdoc_node *n)
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_TBL):          case (MDOC_TBL):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
           case (MDOC_EQN):
                   /* FALLTHROUGH */
         case (MDOC_ROOT):          case (MDOC_ROOT):
                 return(1);                  return(1);
         default:          default:
Line 1665  post_rs(POST_ARGS)
Line 1671  post_rs(POST_ARGS)
                                 break;                                  break;
   
                 if (i < RSORD_MAX) {                  if (i < RSORD_MAX) {
                         if (MDOC__J == rsord[i])                          if (MDOC__J == rsord[i] || MDOC__B == rsord[i])
                                 mdoc->last->norm->Rs.child_J = nn;                                  mdoc->last->norm->Rs.quote_T++;
                         next = nn->next;                          next = nn->next;
                         continue;                          continue;
                 }                  }
Line 1742  post_rs(POST_ARGS)
Line 1748  post_rs(POST_ARGS)
 }  }
   
 static int  static int
   post_ns(POST_ARGS)
   {
   
           if (MDOC_LINE & mdoc->last->flags)
                   mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_IGNNS);
           return(1);
   }
   
   static int
 post_sh(POST_ARGS)  post_sh(POST_ARGS)
 {  {
   
Line 2095  post_prol(POST_ARGS)
Line 2110  post_prol(POST_ARGS)
         mdoc_node_delete(mdoc, mdoc->last);          mdoc_node_delete(mdoc, mdoc->last);
         if (mdoc->meta.title && mdoc->meta.date && mdoc->meta.os)          if (mdoc->meta.title && mdoc->meta.date && mdoc->meta.os)
                 mdoc->flags |= MDOC_PBODY;                  mdoc->flags |= MDOC_PBODY;
   
           return(1);
   }
   
   static int
   post_bx(POST_ARGS)
   {
           struct mdoc_node        *n;
   
           /*
            * Make `Bx's second argument always start with an uppercase
            * letter.  Groff checks if it's an "accepted" term, but we just
            * uppercase blindly.
            */
   
           n = mdoc->last->child;
           if (n && NULL != (n = n->next))
                   *n->string = toupper((unsigned char)*n->string);
   
         return(1);          return(1);
 }  }

Legend:
Removed from v.1.152  
changed lines
  Added in v.1.156

CVSweb