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

Diff for /mandoc/mandocdb.c between version 1.60 and 1.61

version 1.60, 2013/06/05 20:27:11 version 1.61, 2013/06/05 21:21:08
Line 140  static void  ofadd(int, const char *, const char *, co
Line 140  static void  ofadd(int, const char *, const char *, co
 static  void     offree(void);  static  void     offree(void);
 static  void     ofmerge(struct mchars *, struct mparse *);  static  void     ofmerge(struct mchars *, struct mparse *);
 static  void     parse_catpage(struct of *);  static  void     parse_catpage(struct of *);
 static  int      parse_man(struct of *,  static  void     parse_man(struct of *, const struct man_node *);
                         const struct man_node *);  
 static  void     parse_mdoc(struct of *, const struct mdoc_node *);  static  void     parse_mdoc(struct of *, const struct mdoc_node *);
 static  int      parse_mdoc_body(struct of *, const struct mdoc_node *);  static  int      parse_mdoc_body(struct of *, const struct mdoc_node *);
 static  int      parse_mdoc_head(struct of *, const struct mdoc_node *);  static  int      parse_mdoc_head(struct of *, const struct mdoc_node *);
Line 1181  putmdockey(const struct of *of, const struct mdoc_node
Line 1180  putmdockey(const struct of *of, const struct mdoc_node
         }          }
 }  }
   
 static int  static void
 parse_man(struct of *of, const struct man_node *n)  parse_man(struct of *of, const struct man_node *n)
 {  {
         const struct man_node *head, *body;          const struct man_node *head, *body;
Line 1190  parse_man(struct of *of, const struct man_node *n)
Line 1189  parse_man(struct of *of, const struct man_node *n)
         size_t           sz, titlesz;          size_t           sz, titlesz;
   
         if (NULL == n)          if (NULL == n)
                 return(0);                  return;
   
         /*          /*
          * We're only searching for one thing: the first text child in           * We're only searching for one thing: the first text child in
Line 1232  parse_man(struct of *of, const struct man_node *n)
Line 1231  parse_man(struct of *of, const struct man_node *n)
                                 title[titlesz - 1] = ' ';                                  title[titlesz - 1] = ' ';
                         }                          }
                         if (NULL == title)                          if (NULL == title)
                                 return(1);                                  return;
   
                         title = mandoc_realloc(title, titlesz + 1);                          title = mandoc_realloc(title, titlesz + 1);
                         title[titlesz] = '\0';                          title[titlesz] = '\0';
Line 1245  parse_man(struct of *of, const struct man_node *n)
Line 1244  parse_man(struct of *of, const struct man_node *n)
   
                         if (0 == (sz = strlen(sv))) {                          if (0 == (sz = strlen(sv))) {
                                 free(title);                                  free(title);
                                 return(1);                                  return;
                         }                          }
   
                         /* Erase trailing space. */                          /* Erase trailing space. */
Line 1256  parse_man(struct of *of, const struct man_node *n)
Line 1255  parse_man(struct of *of, const struct man_node *n)
   
                         if (start == sv) {                          if (start == sv) {
                                 free(title);                                  free(title);
                                 return(1);                                  return;
                         }                          }
   
                         start = sv;                          start = sv;
Line 1293  parse_man(struct of *of, const struct man_node *n)
Line 1292  parse_man(struct of *of, const struct man_node *n)
                         if (sv == start) {                          if (sv == start) {
                                 putkey(of, start, TYPE_Nm);                                  putkey(of, start, TYPE_Nm);
                                 free(title);                                  free(title);
                                 return(1);                                  return;
                         }                          }
   
                         while (isspace((unsigned char)*start))                          while (isspace((unsigned char)*start))
Line 1317  parse_man(struct of *of, const struct man_node *n)
Line 1316  parse_man(struct of *of, const struct man_node *n)
                         of->desc = stradd(start);                          of->desc = stradd(start);
                         putkey(of, start, TYPE_Nd);                          putkey(of, start, TYPE_Nd);
                         free(title);                          free(title);
                         return(1);                          return;
                 }                  }
         }          }
   
         for (n = n->child; n; n = n->next)          for (n = n->child; n; n = n->next)
                 if (parse_man(of, n))                  parse_man(of, n);
                         return(1);  
   
         return(0);  
 }  }
   
 static void  static void

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

CVSweb