[BACK]Return to mdoc_macro.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mdoc_macro.c between version 1.39 and 1.40

version 1.39, 2010/05/15 09:20:01 version 1.40, 2010/05/15 12:30:59
Line 632 
Line 632 
                         return(0);                          return(0);
                 else if (ARGS_EOLN == ac)                  else if (ARGS_EOLN == ac)
                         break;                          break;
                 assert(mdoc_isdelim(p));                  assert(DELIM_NONE != mdoc_isdelim(p));
                 if ( ! mdoc_word_alloc(mdoc, line, lastarg, p))                  if ( ! mdoc_word_alloc(mdoc, line, lastarg, p))
                         return(0);                          return(0);
         }          }
Line 728 
Line 728 
 static int  static int
 in_line(MACRO_PROT_ARGS)  in_line(MACRO_PROT_ARGS)
 {  {
         int              la, lastpunct, cnt, d, nc, nl;          int              la, lastpunct, cnt, nc, nl;
         enum margverr    av;          enum margverr    av;
         enum mdoct       ntok;          enum mdoct       ntok;
         enum margserr    ac;          enum margserr    ac;
           enum mdelim      d;
         struct mdoc_arg *arg;          struct mdoc_arg *arg;
         char            *p;          char            *p;
   
Line 824 
Line 825 
                  * the word.                   * the word.
                  */                   */
   
                 d = ARGS_QWORD == ac ? 0 : mdoc_isdelim(p);                  d = ARGS_QWORD == ac ? DELIM_NONE : mdoc_isdelim(p);
   
                 if (ARGS_QWORD != ac && d) {                  if (ARGS_QWORD != ac && DELIM_NONE != d) {
                         if (0 == lastpunct && ! rew_elem(m, tok))                          if (0 == lastpunct && ! rew_elem(m, tok))
                                 return(0);                                  return(0);
                         lastpunct = 1;                          lastpunct = 1;
Line 836 
Line 837 
                         lastpunct = 0;                          lastpunct = 0;
                 }                  }
   
                 if ( ! d)                  if (DELIM_NONE == d)
                         cnt++;                          cnt++;
                 if ( ! mdoc_word_alloc(m, line, la, p))                  if ( ! mdoc_word_alloc(m, line, la, p))
                         return(0);                          return(0);
Line 961 
Line 962 
                 if (ARGS_EOLN == ac)                  if (ARGS_EOLN == ac)
                         break;                          break;
   
 /*  
  * XXX Temporarily disable the handling of leading punctuation.  
  *     We must investigate the fallout before enabling this.  
  */  
 #if 0  
                 /* Don't emit leading punct. for phrases. */                  /* Don't emit leading punct. for phrases. */
   
                 if (NULL == head &&                  if (NULL == head &&
Line 973 
Line 969 
                                 ARGS_PPHRASE != ac &&                                  ARGS_PPHRASE != ac &&
                                 ARGS_PEND != ac &&                                  ARGS_PEND != ac &&
                                 ARGS_QWORD != ac &&                                  ARGS_QWORD != ac &&
                                 1 == mdoc_isdelim(p)) {                                  DELIM_OPEN == mdoc_isdelim(p)) {
                         if ( ! mdoc_word_alloc(m, line, la, p))                          if ( ! mdoc_word_alloc(m, line, la, p))
                                 return(0);                                  return(0);
                         continue;                          continue;
                 }                  }
 #endif  
   
                 /* Always re-open head for phrases. */                  /* Always re-open head for phrases. */
   
Line 1112 
Line 1107 
                 if (ARGS_PUNCT == ac)                  if (ARGS_PUNCT == ac)
                         break;                          break;
   
 /*  
  * XXX Temporarily disable the handling of leading punctuation.  
  *     We must investigate the fallout before enabling this.  
  */  
 #if 0  
                 if (NULL == body && ARGS_QWORD != ac &&                  if (NULL == body && ARGS_QWORD != ac &&
                                 1 == mdoc_isdelim(p)) {                      DELIM_OPEN == mdoc_isdelim(p)) {
                         if ( ! mdoc_word_alloc(m, line, la, p))                          if ( ! mdoc_word_alloc(m, line, la, p))
                                 return(0);                                  return(0);
                         continue;                          continue;
                 }                  }
 #endif  
   
                 if (NULL == body) {                  if (NULL == body) {
                        if ( ! mdoc_body_alloc(m, line, ppos, tok))                         if ( ! mdoc_body_alloc(m, line, ppos, tok))
Line 1233 
Line 1222 
                 if (ARGS_EOLN == ac)                  if (ARGS_EOLN == ac)
                         break;                          break;
   
 /*  
  * XXX Temporarily disable the handling of leading punctuation.  
  *     We must investigate the fallout before enabling this.  
  */  
 #if 0  
                 /* Flush out leading punctuation. */                  /* Flush out leading punctuation. */
   
                 if (NULL == head && ARGS_QWORD != ac &&                  if (NULL == head && ARGS_QWORD != ac &&
                                 1 == mdoc_isdelim(p)) {                      DELIM_OPEN == mdoc_isdelim(p)) {
                         assert(NULL == body);                          assert(NULL == body);
                         if ( ! mdoc_word_alloc(m, line, la, p))                          if ( ! mdoc_word_alloc(m, line, la, p))
                                 return(0);                                  return(0);
                         continue;                          continue;
                 }                  }
 #endif  
   
                 if (NULL == head) {                  if (NULL == head) {
                         assert(NULL == body);                          assert(NULL == body);
Line 1385 
Line 1368 
                 if (ARGS_EOLN == ac)                  if (ARGS_EOLN == ac)
                         break;                          break;
   
 /*  
  * XXX Temporarily disable the handling of leading punctuation.  
  *     We must investigate the fallout before enabling this.  
  */  
 #if 0  
                 if ( ! (MDOC_IGNDELIM & mdoc_macros[tok].flags) &&                  if ( ! (MDOC_IGNDELIM & mdoc_macros[tok].flags) &&
                                 ARGS_QWORD != ac &&                                  ARGS_QWORD != ac &&
                                 0 == j && 1 == mdoc_isdelim(p)) {                                  0 == j && DELIM_OPEN == mdoc_isdelim(p)) {
                         if ( ! mdoc_word_alloc(m, line, la, p))                          if ( ! mdoc_word_alloc(m, line, la, p))
                                 return(0);                                  return(0);
                         continue;                          continue;
                 } else                  } else if (0 == j)
 #endif  
                 if (0 == j)  
                        if ( ! mdoc_elem_alloc(m, line, la, tok, arg))                         if ( ! mdoc_elem_alloc(m, line, la, tok, arg))
                                return(0);                                 return(0);
   
Line 1422 
Line 1398 
   
                 if ( ! (MDOC_IGNDELIM & mdoc_macros[tok].flags) &&                  if ( ! (MDOC_IGNDELIM & mdoc_macros[tok].flags) &&
                                 ARGS_QWORD != ac &&                                  ARGS_QWORD != ac &&
                                 ! flushed && mdoc_isdelim(p)) {                                  ! flushed &&
                                   DELIM_NONE != mdoc_isdelim(p)) {
                         if ( ! rew_elem(m, tok))                          if ( ! rew_elem(m, tok))
                                 return(0);                                  return(0);
                         flushed = 1;                          flushed = 1;

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40