[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.72 and 1.74

version 1.72, 2010/05/30 21:41:46 version 1.74, 2010/05/30 22:56:02
Line 937  blk_full(MACRO_PROT_ARGS)
Line 937  blk_full(MACRO_PROT_ARGS)
 #ifdef  UGLY  #ifdef  UGLY
         struct mdoc_node *n;          struct mdoc_node *n;
 #endif  #endif
           enum mdoc_type    mtt;
         enum mdoct        ntok;          enum mdoct        ntok;
         enum margserr     ac, lac;          enum margserr     ac, lac;
         enum margverr     av;          enum margverr     av;
Line 1002  blk_full(MACRO_PROT_ARGS)
Line 1003  blk_full(MACRO_PROT_ARGS)
         }          }
   
         ac = ARGS_ERROR;          ac = ARGS_ERROR;
         lac = ARGS_PHRASE;  
   
         for ( ; ; ) {          for ( ; ; ) {
                 la = *pos;                  la = *pos;
                 lac = ac;                  /* Initialise last-phrase-type with ARGS_PHRASE. */
                   lac = ARGS_ERROR == ac ? ARGS_PHRASE : ac;
                 ac = mdoc_args(m, line, pos, buf, tok, &p);                  ac = mdoc_args(m, line, pos, buf, tok, &p);
   
                 if (ARGS_ERROR == ac)                  if (ARGS_ERROR == ac)
Line 1014  blk_full(MACRO_PROT_ARGS)
Line 1015  blk_full(MACRO_PROT_ARGS)
                 if (ARGS_EOLN == ac)                  if (ARGS_EOLN == ac)
                         break;                          break;
   
                 /* Don't emit leading punct. for phrases. */                  /*
                    * Emit leading punctuation (i.e., punctuation before
                    * the MDOC_HEAD) for non-phrase types.
                    */
   
                 if (NULL == head &&                  if (NULL == head &&
                                 ARGS_PEND != ac &&                                  ARGS_PEND != ac &&
Line 1027  blk_full(MACRO_PROT_ARGS)
Line 1031  blk_full(MACRO_PROT_ARGS)
                         continue;                          continue;
                 }                  }
   
                 /* Always re-open head for phrases. */                  /* Open a head if one hasn't been opened. */
   
                 if (NULL == head ||                  if (NULL == head) {
                                 ARGS_PEND == ac ||  
                                 ARGS_PHRASE == ac ||  
                                 ARGS_PPHRASE == ac) {  
                         if ( ! mdoc_head_alloc(m, line, ppos, tok))                          if ( ! mdoc_head_alloc(m, line, ppos, tok))
                                 return(0);                                  return(0);
                         head = m->last;                          head = m->last;
Line 1041  blk_full(MACRO_PROT_ARGS)
Line 1042  blk_full(MACRO_PROT_ARGS)
                 if (ARGS_PHRASE == ac ||                  if (ARGS_PHRASE == ac ||
                                 ARGS_PEND == ac ||                                  ARGS_PEND == ac ||
                                 ARGS_PPHRASE == ac) {                                  ARGS_PPHRASE == ac) {
                           /*
                            * If we haven't opened a body yet, rewind the
                            * head; if we have, rewind that instead.
                            */
   
                           mtt = body ? MDOC_BODY : MDOC_HEAD;
                           if ( ! rew_sub(mtt, m, tok, line, ppos))
                                   return(0);
   
                           /* Then allocate our body context. */
   
                           if ( ! mdoc_body_alloc(m, line, ppos, tok))
                                   return(0);
                           body = m->last;
   
                           /*
                            * Process phrases: set whether we're in a
                            * partial-phrase (this effects line handling)
                            * then call down into the phrase parser.
                            */
   
                         if (ARGS_PPHRASE == ac)                          if (ARGS_PPHRASE == ac)
                                 m->flags |= MDOC_PPHRASE;                                  m->flags |= MDOC_PPHRASE;
                         if (ARGS_PEND == ac && ARGS_PPHRASE == lac)                          if (ARGS_PEND == ac && ARGS_PPHRASE == lac)
Line 1053  blk_full(MACRO_PROT_ARGS)
Line 1075  blk_full(MACRO_PROT_ARGS)
                                 return(0);                                  return(0);
   
                         m->flags &= ~MDOC_PPHRASE;                          m->flags &= ~MDOC_PPHRASE;
   
                         if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos))  
                                 return(0);  
                         continue;                          continue;
                 }                  }
   

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.74

CVSweb