[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.70 and 1.73

version 1.70, 2010/05/29 18:47:54 version 1.73, 2010/05/30 21:50:23
Line 1005  blk_full(MACRO_PROT_ARGS)
Line 1005  blk_full(MACRO_PROT_ARGS)
   
         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 1013  blk_full(MACRO_PROT_ARGS)
Line 1014  blk_full(MACRO_PROT_ARGS)
                 if (ARGS_EOLN == ac)                  if (ARGS_EOLN == ac)
                         break;                          break;
   
                 if (ARGS_PEND == ac) {                  /*
                         if (ARGS_PPHRASE == lac)                   * Emit leading punctuation (i.e., punctuation before
                                 ac = ARGS_PPHRASE;                   * the MDOC_HEAD) for non-phrase types.
                         else                   */
                                 ac = ARGS_PHRASE;  
                 }  
   
                 /* Don't emit leading punct. for phrases. */  
   
                 if (NULL == head &&                  if (NULL == head &&
                                   ARGS_PEND != ac &&
                                 ARGS_PHRASE != ac &&                                  ARGS_PHRASE != ac &&
                                 ARGS_PPHRASE != ac &&                                  ARGS_PPHRASE != ac &&
                                 ARGS_QWORD != ac &&                                  ARGS_QWORD != ac &&
Line 1032  blk_full(MACRO_PROT_ARGS)
Line 1030  blk_full(MACRO_PROT_ARGS)
                         continue;                          continue;
                 }                  }
   
                 /* Always re-open head for phrases. */                  /*
                    * Open a head if one hasn't been opened. Re-open head
                    * for phrases.
                    */
   
                 if (NULL == head ||                  if (NULL == head ||
                                   ARGS_PEND == ac ||
                                 ARGS_PHRASE == ac ||                                  ARGS_PHRASE == ac ||
                                 ARGS_PPHRASE == ac) {                                  ARGS_PPHRASE == ac) {
                         if ( ! mdoc_head_alloc(m, line, ppos, tok))                          if ( ! mdoc_head_alloc(m, line, ppos, tok))
Line 1042  blk_full(MACRO_PROT_ARGS)
Line 1044  blk_full(MACRO_PROT_ARGS)
                         head = m->last;                          head = m->last;
                 }                  }
   
                 if (ARGS_PHRASE == ac || ARGS_PPHRASE == ac) {                  if (ARGS_PHRASE == ac ||
                                   ARGS_PEND == ac ||
                                   ARGS_PPHRASE == ac) {
                           /*
                            * 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 ( ! phrase(m, line, la, buf, ac))                          if (ARGS_PEND == ac && ARGS_PPHRASE == lac)
                                   m->flags |= MDOC_PPHRASE;
   
                           if (ARGS_PEND == ac) {
                                   if ( ! phrase(m, line, la, buf, lac))
                                           return(0);
                           } else if ( ! phrase(m, line, la, buf, ac))
                                 return(0);                                  return(0);
   
                         m->flags &= ~MDOC_PPHRASE;                          m->flags &= ~MDOC_PPHRASE;
   
                           /* Close out active phrase. */
   
                         if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos))                          if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos))
                                 return(0);                                  return(0);
                         continue;                          continue;

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

CVSweb