[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.64 and 1.65

version 1.64, 2010/05/14 14:09:13 version 1.65, 2010/05/15 04:47:38
Line 972  blk_full(MACRO_PROT_ARGS)
Line 972  blk_full(MACRO_PROT_ARGS)
                 if (ARGS_EOLN == ac)                  if (ARGS_EOLN == ac)
                         break;                          break;
   
                   if (ARGS_PEND == ac) {
                           if (ARGS_PPHRASE == lac)
                                   ac = ARGS_PPHRASE;
                           else
                                   ac = ARGS_PHRASE;
                   }
   
                 /* Don't emit leading punct. for phrases. */                  /* Don't emit leading punct. for phrases. */
   
                 if (NULL == head &&                  if (NULL == head &&
                                 ARGS_PHRASE != ac &&                                  ARGS_PHRASE != ac &&
                                 ARGS_PPHRASE != ac &&                                  ARGS_PPHRASE != ac &&
                                 ARGS_PEND != ac &&  
                                 ARGS_QWORD != ac &&                                  ARGS_QWORD != ac &&
                                 1 == mdoc_isdelim(p)) {                                  1 == mdoc_isdelim(p)) {
                         if ( ! mdoc_word_alloc(m, line, la, p))                          if ( ! mdoc_word_alloc(m, line, la, p))
Line 989  blk_full(MACRO_PROT_ARGS)
Line 995  blk_full(MACRO_PROT_ARGS)
   
                 if (NULL == head ||                  if (NULL == head ||
                                 ARGS_PHRASE == ac ||                                  ARGS_PHRASE == ac ||
                                 ARGS_PEND == ac ||  
                                 ARGS_PPHRASE == 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;
                 }                  }
   
                 if (ARGS_PHRASE == ac ||                  if (ARGS_PHRASE == ac || ARGS_PPHRASE == ac) {
                                 ARGS_PEND == ac ||                          if (ARGS_PPHRASE == ac)
                                 ARGS_PPHRASE == ac) {                                  m->flags |= MDOC_PPHRASE;
                         /*  
                          * Special treatment for the last phrase.  A  
                          * prior ARGS_PHRASE gets is handled as a  
                          * regular ARGS_PHRASE, but a prior ARGS_PPHRASE  
                          * has special handling.  
                          */  
                         if (ARGS_PEND == ac && ARGS_ERROR == lac)  
                                 ac = ARGS_PHRASE;  
                         else if (ARGS_PEND == ac && ARGS_PHRASE == lac)  
                                 ac = ARGS_PHRASE;  
   
                         if ( ! phrase(m, line, la, buf, ac))                          if ( ! phrase(m, line, la, buf, ac))
                                 return(0);                                  return(0);
                           m->flags &= ~MDOC_PPHRASE;
                         if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos))                          if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos))
                                 return(0);                                  return(0);
                         continue;                          continue;
Line 1569  phrase(struct mdoc *m, int line, int ppos, char *buf, 
Line 1564  phrase(struct mdoc *m, int line, int ppos, char *buf, 
         enum mdoct       ntok;          enum mdoct       ntok;
         char            *p;          char            *p;
   
         assert(ARGS_PHRASE == ac ||          assert(ARGS_PHRASE == ac || ARGS_PPHRASE == ac);
                         ARGS_PEND == ac ||  
                         ARGS_PPHRASE == ac);  
   
         for (pos = ppos; ; ) {          for (pos = ppos; ; ) {
                 la = pos;                  la = pos;
   
                 aac = mdoc_zargs(m, line, &pos, buf, ARGS_PPHRASED, &p);                  aac = mdoc_zargs(m, line, &pos, buf, 0, &p);
   
                 if (ARGS_ERROR == aac)                  if (ARGS_ERROR == aac)
                         return(0);                          return(0);
                 if (ARGS_EOLN == aac)                  if (ARGS_EOLN == aac)
                         break;                          break;
   
                 ntok = ARGS_QWORD == aac || ARGS_PEND == ac ?                  ntok = ARGS_QWORD == aac ? MDOC_MAX : lookup_raw(p);
                         MDOC_MAX : lookup_raw(p);  
   
                 if (MDOC_MAX == ntok) {                  if (MDOC_MAX == ntok) {
                         if ( ! mdoc_word_alloc(m, line, la, p))                          if ( ! mdoc_word_alloc(m, line, la, p))

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

CVSweb