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

Diff for /mandoc/mdoc_term.c between version 1.2 and 1.3

version 1.2, 2009/03/26 14:44:41 version 1.3, 2009/03/26 16:23:22
Line 321  static int   arg_listtype(const struct mdoc_node *);
Line 321  static int   arg_listtype(const struct mdoc_node *);
 static  int       fmt_block_vspace(struct termp *,  static  int       fmt_block_vspace(struct termp *,
                         const struct mdoc_node *,                          const struct mdoc_node *,
                         const struct mdoc_node *);                          const struct mdoc_node *);
 static  int       print_node(DECL_ARGS);  static  void      print_node(DECL_ARGS);
 static  int       print_head(struct termp *,  static  void      print_head(struct termp *,
                         const struct mdoc_meta *);                          const struct mdoc_meta *);
 static  int       print_body(DECL_ARGS);  static  void      print_body(DECL_ARGS);
 static  int       print_foot(struct termp *,  static  void      print_foot(struct termp *,
                         const struct mdoc_meta *);                          const struct mdoc_meta *);
 static  void      sanity(const struct mdoc_node *);  static  void      sanity(const struct mdoc_node *);
   
Line 334  int
Line 334  int
 mdoc_run(struct termp *p, const struct mdoc *m)  mdoc_run(struct termp *p, const struct mdoc *m)
 {  {
   
         if ( ! print_head(p, mdoc_meta(m)))          print_head(p, mdoc_meta(m));
                 return(0);          print_body(p, NULL, mdoc_meta(m), mdoc_node(m));
         if ( ! print_body(p, NULL, mdoc_meta(m), mdoc_node(m)))          print_foot(p, mdoc_meta(m));
                 return(0);          return(1);
         return(print_foot(p, mdoc_meta(m)));  
 }  }
   
   
 static int  static void
 print_body(DECL_ARGS)  print_body(DECL_ARGS)
 {  {
   
         if ( ! print_node(p, pair, meta, node))          print_node(p, pair, meta, node);
                 return(0);  
         if ( ! node->next)          if ( ! node->next)
                 return(1);                  return;
         return(print_body(p, pair, meta, node->next));          print_body(p, pair, meta, node->next);
 }  }
   
   
 static int  static void
 print_node(DECL_ARGS)  print_node(DECL_ARGS)
 {  {
         int              dochild;          int              dochild;
Line 396  print_node(DECL_ARGS)
Line 394  print_node(DECL_ARGS)
         if (MDOC_TEXT != node->type)          if (MDOC_TEXT != node->type)
                 if (termacts[node->tok].post)                  if (termacts[node->tok].post)
                         (*termacts[node->tok].post)(p, &npair, meta, node);                          (*termacts[node->tok].post)(p, &npair, meta, node);
   
         return(1);  
 }  }
   
   
 static int  static void
 print_foot(struct termp *p, const struct mdoc_meta *meta)  print_foot(struct termp *p, const struct mdoc_meta *meta)
 {  {
         struct tm       *tm;          struct tm       *tm;
Line 449  print_foot(struct termp *p, const struct mdoc_meta *me
Line 445  print_foot(struct termp *p, const struct mdoc_meta *me
   
         free(buf);          free(buf);
         free(os);          free(os);
   
         return(1);  
 }  }
   
   
 static int  static void
 print_head(struct termp *p, const struct mdoc_meta *meta)  print_head(struct termp *p, const struct mdoc_meta *meta)
 {  {
         char            *buf, *title;          char            *buf, *title;
Line 520  print_head(struct termp *p, const struct mdoc_meta *me
Line 514  print_head(struct termp *p, const struct mdoc_meta *me
   
         free(title);          free(title);
         free(buf);          free(buf);
   
         return(1);  
 }  }
   
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVSweb