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

Diff for /mandoc/mdoc.c between version 1.179 and 1.181

version 1.179, 2011/02/06 22:05:20 version 1.181, 2011/02/09 09:05:52
Line 98  static int    node_append(struct mdoc *, 
Line 98  static int    node_append(struct mdoc *, 
                                 struct mdoc_node *);                                  struct mdoc_node *);
 static  int               mdoc_ptext(struct mdoc *, int, char *, int);  static  int               mdoc_ptext(struct mdoc *, int, char *, int);
 static  int               mdoc_pmacro(struct mdoc *, int, char *, int);  static  int               mdoc_pmacro(struct mdoc *, int, char *, int);
 static  int               mdoc_span_alloc(struct mdoc *,  
                                 const struct tbl_span *);  
   
   
 const struct mdoc_node *  const struct mdoc_node *
 mdoc_node(const struct mdoc *m)  mdoc_node(const struct mdoc *m)
 {  {
Line 225  mdoc_endparse(struct mdoc *m)
Line 222  mdoc_endparse(struct mdoc *m)
 }  }
   
 int  int
   mdoc_addeqn(struct mdoc *m, const struct eqn *ep)
   {
           struct mdoc_node *n;
   
           assert( ! (MDOC_HALT & m->flags));
   
           /* No text before an initial macro. */
   
           if (SEC_NONE == m->lastnamed) {
                   mdoc_pmsg(m, ep->line, ep->pos, MANDOCERR_NOTEXT);
                   return(1);
           }
   
           n = node_alloc(m, ep->line, ep->pos, MDOC_MAX, MDOC_EQN);
           n->eqn = ep;
   
           if ( ! node_append(m, n))
                   return(0);
   
           m->next = MDOC_NEXT_SIBLING;
           return(1);
   }
   
   int
 mdoc_addspan(struct mdoc *m, const struct tbl_span *sp)  mdoc_addspan(struct mdoc *m, const struct tbl_span *sp)
 {  {
           struct mdoc_node *n;
   
         assert( ! (MDOC_HALT & m->flags));          assert( ! (MDOC_HALT & m->flags));
   
Line 237  mdoc_addspan(struct mdoc *m, const struct tbl_span *sp
Line 259  mdoc_addspan(struct mdoc *m, const struct tbl_span *sp
                 return(1);                  return(1);
         }          }
   
         return(mdoc_span_alloc(m, sp));          n = node_alloc(m, sp->line, 0, MDOC_MAX, MDOC_TBL);
           n->span = sp;
   
           if ( ! node_append(m, n))
                   return(0);
   
           m->next = MDOC_NEXT_SIBLING;
           return(1);
 }  }
   
   
Line 544  mdoc_elem_alloc(struct mdoc *m, int line, int pos, 
Line 573  mdoc_elem_alloc(struct mdoc *m, int line, int pos, 
         m->next = MDOC_NEXT_CHILD;          m->next = MDOC_NEXT_CHILD;
         return(1);          return(1);
 }  }
   
 static int  
 mdoc_span_alloc(struct mdoc *m, const struct tbl_span *sp)  
 {  
         struct mdoc_node *n;  
   
         n = node_alloc(m, sp->line, 0, MDOC_MAX, MDOC_TBL);  
         n->span = sp;  
   
         if ( ! node_append(m, n))  
                 return(0);  
   
         m->next = MDOC_NEXT_SIBLING;  
         return(1);  
 }  
   
   
 int  int
 mdoc_word_alloc(struct mdoc *m, int line, int pos, const char *p)  mdoc_word_alloc(struct mdoc *m, int line, int pos, const char *p)

Legend:
Removed from v.1.179  
changed lines
  Added in v.1.181

CVSweb