[BACK]Return to mdoc.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc.c between version 1.100 and 1.102

version 1.100, 2009/08/18 14:27:16 version 1.102, 2009/08/19 14:09:33
Line 459  mdoc_tail_alloc(struct mdoc *m, int line, int pos, int
Line 459  mdoc_tail_alloc(struct mdoc *m, int line, int pos, int
         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 474  mdoc_head_alloc(struct mdoc *m, int line, int pos, int
Line 477  mdoc_head_alloc(struct mdoc *m, int line, int pos, int
         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 486  mdoc_body_alloc(struct mdoc *m, int line, int pos, int
Line 492  mdoc_body_alloc(struct mdoc *m, int line, int pos, int
         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 502  mdoc_block_alloc(struct mdoc *m, int line, int pos, 
Line 511  mdoc_block_alloc(struct mdoc *m, int line, int pos, 
         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 518  mdoc_elem_alloc(struct mdoc *m, int line, int pos, 
Line 530  mdoc_elem_alloc(struct mdoc *m, int line, int pos, 
         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 543  pstring(struct mdoc *m, int line, int pos, const char 
Line 558  pstring(struct mdoc *m, int line, int pos, const char 
         /* 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 600  parsetext(struct mdoc *m, int line, char *buf)
Line 618  parsetext(struct mdoc *m, int line, char *buf)
          * 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 630  parsetext(struct mdoc *m, int line, char *buf)
Line 644  parsetext(struct mdoc *m, int line, char *buf)
                 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. */ ;

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.102

CVSweb