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

Diff for /mandoc/mdoc.c between version 1.174 and 1.175

version 1.174, 2011/01/01 10:51:30 version 1.175, 2011/01/01 12:18:37
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 *
Line 221  mdoc_endparse(struct mdoc *m)
Line 223  mdoc_endparse(struct mdoc *m)
         return(0);          return(0);
 }  }
   
   int
   mdoc_addspan(struct mdoc *m, const struct tbl_span *sp)
   {
   
           if (MDOC_HALT & m->flags)
                   return(0);
   
           /* No text before an initial macro. */
   
           if (SEC_NONE == m->lastnamed) {
                   /* FIXME: grab from span. */
                   mdoc_pmsg(m, 0, 0, MANDOCERR_NOTEXT);
                   return(1);
           }
   
           return(mdoc_span_alloc(m, sp));
   }
   
   
 /*  /*
  * Main parse routine.  Parses a single line -- really just hands off to   * Main parse routine.  Parses a single line -- really just hands off to
  * the macro (mdoc_pmacro()) or text parser (mdoc_ptext()).   * the macro (mdoc_pmacro()) or text parser (mdoc_ptext()).
Line 522  mdoc_elem_alloc(struct mdoc *m, int line, int pos, 
Line 542  mdoc_elem_alloc(struct mdoc *m, int line, int pos, 
         if ( ! node_append(m, p))          if ( ! node_append(m, p))
                 return(0);                  return(0);
         m->next = MDOC_NEXT_CHILD;          m->next = MDOC_NEXT_CHILD;
           return(1);
   }
   
   static int
   mdoc_span_alloc(struct mdoc *m, const struct tbl_span *sp)
   {
           struct mdoc_node *n;
   
           /* FIXME: grab from tbl_span. */
           n = node_alloc(m, 0, 0, MDOC_MAX, MDOC_TBL);
           n->span = sp;
   
           if ( ! node_append(m, n))
                   return(0);
   
           m->next = MDOC_NEXT_SIBLING;
         return(1);          return(1);
 }  }
   

Legend:
Removed from v.1.174  
changed lines
  Added in v.1.175

CVSweb