[BACK]Return to validate.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/Attic/validate.c between version 1.73 and 1.81

version 1.73, 2009/03/08 12:40:27 version 1.81, 2009/03/12 06:32:17
Line 16 
Line 16 
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR   * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.   * PERFORMANCE OF THIS SOFTWARE.
  */   */
   #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <stdarg.h>  #include <stdarg.h>
Line 135  static int bwarn_ge1(POST_ARGS);
Line 137  static int bwarn_ge1(POST_ARGS);
 static  int     hwarn_eq1(POST_ARGS);  static  int     hwarn_eq1(POST_ARGS);
 static  int     ewarn_ge1(POST_ARGS);  static  int     ewarn_ge1(POST_ARGS);
 static  int     ebool(POST_ARGS);  static  int     ebool(POST_ARGS);
   
 static  int     post_an(POST_ARGS);  static  int     post_an(POST_ARGS);
 static  int     post_at(POST_ARGS);  static  int     post_at(POST_ARGS);
 static  int     post_bf(POST_ARGS);  static  int     post_bf(POST_ARGS);
Line 177  static v_post posts_in[] = { ewarn_eq1, NULL };
Line 180  static v_post posts_in[] = { ewarn_eq1, NULL };
 static  v_post  posts_ss[] = { herr_ge1, NULL };  static  v_post  posts_ss[] = { herr_ge1, NULL };
 static  v_post  posts_pf[] = { eerr_eq1, NULL };  static  v_post  posts_pf[] = { eerr_eq1, NULL };
 static  v_post  posts_lb[] = { eerr_eq1, NULL };  static  v_post  posts_lb[] = { eerr_eq1, NULL };
   static  v_post  posts_mt[] = { eerr_ge1, NULL };
 static  v_post  posts_st[] = { eerr_eq1, post_st, NULL };  static  v_post  posts_st[] = { eerr_eq1, post_st, NULL };
 static  v_post  posts_pp[] = { ewarn_eq0, NULL };  static  v_post  posts_pp[] = { ewarn_eq0, NULL };
 static  v_post  posts_ex[] = { eerr_eq0, post_ex, NULL };  static  v_post  posts_ex[] = { eerr_eq0, post_ex, NULL };
 static  v_post  posts_an[] = { post_an, NULL };  static  v_post  posts_an[] = { post_an, NULL };
 static  v_post  posts_at[] = { post_at, NULL };  static  v_post  posts_at[] = { post_at, NULL };
 static  v_post  posts_xr[] = { eerr_ge1, eerr_le2, NULL };  static  v_post  posts_xr[] = { eerr_ge1, eerr_le2, NULL };
   static  v_post  posts_lk[] = { eerr_ge1, NULL };
 static  v_post  posts_nm[] = { post_nm, NULL };  static  v_post  posts_nm[] = { post_nm, NULL };
 static  v_post  posts_bf[] = { hwarn_le1, post_bf, NULL };  static  v_post  posts_bf[] = { hwarn_le1, post_bf, NULL };
 static  v_post  posts_rs[] = { herr_eq0, bwarn_ge1, NULL };  static  v_post  posts_rs[] = { herr_eq0, bwarn_ge1, NULL };
Line 298  const struct valids mdoc_valids[MDOC_MAX] = {
Line 303  const struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, NULL },                         /* Fr */          { NULL, NULL },                         /* Fr */
         { NULL, posts_notext },                 /* Ud */          { NULL, posts_notext },                 /* Ud */
         { pres_lb, posts_lb },                  /* Lb */          { pres_lb, posts_lb },                  /* Lb */
           { NULL, NULL },                         /* Lb */
           { NULL, posts_pp },                     /* Pp */
           { NULL, posts_lk },                     /* Lk */
           { NULL, posts_mt },                     /* Mt */
           { NULL, posts_wline },                  /* Brq */
           { NULL, NULL },                         /* Bro */
           { NULL, NULL },                         /* Brc */
 };  };
   
   
Line 685  check_text(struct mdoc *mdoc, int line, int pos, const
Line 697  check_text(struct mdoc *mdoc, int line, int pos, const
                         p += (int)c - 1;                          p += (int)c - 1;
                         continue;                          continue;
                 }                  }
                 return(mdoc_perr(mdoc, line, pos, "invalid escape"));                  if ( ! (MDOC_IGN_ESCAPE & mdoc->pflags))
                           return(mdoc_perr(mdoc, line, pos,
                                           "invalid escape sequence"));
                   if ( ! mdoc_pwarn(mdoc, line, pos, WARN_SYNTAX,
                                           "invalid escape sequence"))
                           return(0);
         }          }
   
         return(1);          return(1);
Line 1170  post_it(POST_ARGS)
Line 1187  post_it(POST_ARGS)
                 if (mdoc->last->body->child)                  if (mdoc->last->body->child)
                         if ( ! mwarn(mdoc, WNOMULTILINE))                          if ( ! mwarn(mdoc, WNOMULTILINE))
                                 return(0);                                  return(0);
                 c = mdoc->last->head->child;                  c = mdoc->last->child;
                 for (i = 0; c; c = c->next)                  for (i = 0; c && MDOC_HEAD == c->type; c = c->next)
                         i++;                          i++;
                 if (i == cols)                  if (i == cols)
                         break;                          break;
                 if ( ! mdoc_warn(mdoc, WARN_SYNTAX,                  return(mdoc_err(mdoc, "column mismatch (have "
                                         "column mismatch (have %d, want %d)", i, cols))                                          "%d, want %d)", i, cols));
                         return(0);  
                 break;  
         default:          default:
                 break;                  break;
         }          }

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.81

CVSweb