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

Diff for /mandoc/mdoc_macro.c between version 1.75 and 1.80

version 1.75, 2010/05/31 10:28:04 version 1.80, 2010/06/19 20:46:28
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>   * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 1118  blk_full(MACRO_PROT_ARGS)
Line 1118  blk_full(MACRO_PROT_ARGS)
         /* If we've already opened our body, exit now. */          /* If we've already opened our body, exit now. */
   
         if (NULL != body)          if (NULL != body)
                 return(1);                  goto out;
   
 #ifdef  UGLY  #ifdef  UGLY
         /*          /*
Line 1145  blk_full(MACRO_PROT_ARGS)
Line 1145  blk_full(MACRO_PROT_ARGS)
         if ( ! mdoc_body_alloc(m, line, ppos, tok))          if ( ! mdoc_body_alloc(m, line, ppos, tok))
                 return(0);                  return(0);
   
   out:
           if ( ! (MDOC_FREECOL & m->flags))
                   return(1);
   
           if ( ! rew_sub(MDOC_BODY, m, tok, line, ppos))
                   return(0);
           if ( ! rew_sub(MDOC_BLOCK, m, tok, line, ppos))
                   return(0);
   
           m->flags &= ~MDOC_FREECOL;
         return(1);          return(1);
 }  }
   
Line 1673  phrase(struct mdoc *m, int line, int ppos, char *buf)
Line 1683  phrase(struct mdoc *m, int line, int ppos, char *buf)
 }  }
   
   
   /* ARGSUSED */
 static int  static int
 phrase_ta(MACRO_PROT_ARGS)  phrase_ta(MACRO_PROT_ARGS)
 {  {
         int               la;          int               la;
         enum mdoct        ntok;          enum mdoct        ntok;
         enum margserr     ac;          enum margserr     ac;
         struct mdoc_node *n;  
         char             *p;          char             *p;
   
         /*          /*
Line 1687  phrase_ta(MACRO_PROT_ARGS)
Line 1697  phrase_ta(MACRO_PROT_ARGS)
          * it should simply error out with ARGSLOST.           * it should simply error out with ARGSLOST.
          */           */
   
         n = m->last;  
         if ( ! rew_sub(MDOC_BODY, m, MDOC_It, line, ppos))          if ( ! rew_sub(MDOC_BODY, m, MDOC_It, line, ppos))
                 return(0);                  return(0);
   
         /*  
          * FIXME: this is necessary in bogus constructions like  
          *  .Bl -column foo bar  
          *  .Sy foo Ta bar  
          * It is, however, an ugly way to do it.  
          *  
          * XXX; remove this when the above construct builds an implied  
          * `It' marker.  
          */  
         if (NULL == m->last ||  
                         MDOC_BODY != m->last->type ||  
                         MDOC_It != m->last->tok) {  
                 swarn(m, tok, line, ppos, n);  
                 return(0);  
         }  
   
         if ( ! mdoc_body_alloc(m, line, ppos, MDOC_It))          if ( ! mdoc_body_alloc(m, line, ppos, MDOC_It))
                 return(0);                  return(0);
   

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.80

CVSweb