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

Diff for /src/usr.bin/mandoc/mdoc.c between version 1.24 and 1.25

version 1.24, 2009/08/22 19:43:33 version 1.25, 2009/08/22 21:55:06
Line 455 
Line 455 
         p = node_alloc(m, line, pos, tok, MDOC_TAIL);          p = node_alloc(m, line, pos, tok, MDOC_TAIL);
         if (NULL == p)          if (NULL == p)
                 return(0);                  return(0);
         return(node_append(m, p));          if ( ! node_append(m, p))
                   return(0);
           m->next = MDOC_NEXT_CHILD;
           return(1);
 }  }
   
   
Line 470 
Line 473 
         p = node_alloc(m, line, pos, tok, MDOC_HEAD);          p = node_alloc(m, line, pos, tok, MDOC_HEAD);
         if (NULL == p)          if (NULL == p)
                 return(0);                  return(0);
         return(node_append(m, p));          if ( ! node_append(m, p))
                   return(0);
           m->next = MDOC_NEXT_CHILD;
           return(1);
 }  }
   
   
Line 482 
Line 488 
         p = node_alloc(m, line, pos, tok, MDOC_BODY);          p = node_alloc(m, line, pos, tok, MDOC_BODY);
         if (NULL == p)          if (NULL == p)
                 return(0);                  return(0);
         return(node_append(m, p));          if ( ! node_append(m, p))
                   return(0);
           m->next = MDOC_NEXT_CHILD;
           return(1);
 }  }
   
   
Line 498 
Line 507 
         p->args = args;          p->args = args;
         if (p->args)          if (p->args)
                 (args->refcnt)++;                  (args->refcnt)++;
         return(node_append(m, p));          if ( ! node_append(m, p))
                   return(0);
           m->next = MDOC_NEXT_CHILD;
           return(1);
 }  }
   
   
Line 514 
Line 526 
         p->args = args;          p->args = args;
         if (p->args)          if (p->args)
                 (args->refcnt)++;                  (args->refcnt)++;
         return(node_append(m, p));          if ( ! node_append(m, p))
                   return(0);
           m->next = MDOC_NEXT_CHILD;
           return(1);
 }  }
   
   
Line 539 
Line 554 
         /* Prohibit truncation. */          /* Prohibit truncation. */
         assert(sv < len + 1);          assert(sv < len + 1);
   
         return(node_append(m, n));          if ( ! node_append(m, n))
                   return(0);
           m->next = MDOC_NEXT_SIBLING;
           return(1);
 }  }
   
   
Line 596 
Line 614 
          * back-end, as it should be preserved as a single term.           * back-end, as it should be preserved as a single term.
          */           */
   
         if (MDOC_LITERAL & m->flags) {          if (MDOC_LITERAL & m->flags)
                 if ( ! mdoc_word_alloc(m, line, 0, buf))                  return(mdoc_word_alloc(m, line, 0, buf));
                         return(0);  
                 m->next = MDOC_NEXT_SIBLING;  
                 return(1);  
         }  
   
         /* Disallow blank/white-space lines in non-literal mode. */          /* Disallow blank/white-space lines in non-literal mode. */
   
Line 626 
Line 640 
                 buf[i++] = 0;                  buf[i++] = 0;
                 if ( ! pstring(m, line, j, &buf[j], (size_t)(i - j)))                  if ( ! pstring(m, line, j, &buf[j], (size_t)(i - j)))
                         return(0);                          return(0);
                 m->next = MDOC_NEXT_SIBLING;  
   
                 for ( ; ' ' == buf[i]; i++)                  for ( ; ' ' == buf[i]; i++)
                         /* Skip trailing whitespace. */ ;                          /* Skip trailing whitespace. */ ;
Line 665 
Line 678 
 int  int
 parsemacro(struct mdoc *m, int ln, char *buf)  parsemacro(struct mdoc *m, int ln, char *buf)
 {  {
         int               i, j, c, ppos;          int               i, j, c;
         char              mac[5];          char              mac[5];
   
         /* Empty lines are ignored. */          /* Empty lines are ignored. */
Line 685 
Line 698 
                         return(1);                          return(1);
         }          }
   
         ppos = i;  
   
         /* Copy the first word into a nil-terminated buffer. */          /* Copy the first word into a nil-terminated buffer. */
   
         for (j = 0; j < 4; j++, i++) {          for (j = 0; j < 4; j++, i++) {
Line 719 
Line 730 
          * Begin recursive parse sequence.  Since we're at the start of           * Begin recursive parse sequence.  Since we're at the start of
          * the line, we don't need to do callable/parseable checks.           * the line, we don't need to do callable/parseable checks.
          */           */
         if ( ! mdoc_macro(m, c, ln, ppos, &i, buf))          if ( ! mdoc_macro(m, c, ln, 1, &i, buf))
                 goto err;                  goto err;
   
         return(1);          return(1);

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25