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

Diff for /mandoc/mandocdb.c between version 1.151 and 1.152

version 1.151, 2014/06/20 01:21:48 version 1.152, 2014/06/20 02:24:40
Line 145  static int  dbopen(int);
Line 145  static int  dbopen(int);
 static  void     dbprune(void);  static  void     dbprune(void);
 static  void     filescan(const char *);  static  void     filescan(const char *);
 static  void    *hash_alloc(size_t, void *);  static  void    *hash_alloc(size_t, void *);
 static  void     hash_free(void *, size_t, void *);  static  void     hash_free(void *, void *);
 static  void    *hash_halloc(size_t, void *);  static  void    *hash_calloc(size_t, size_t, void *);
 static  void     mlink_add(struct mlink *, const struct stat *);  static  void     mlink_add(struct mlink *, const struct stat *);
 static  void     mlink_check(struct mpage *, struct mlink *);  static  void     mlink_check(struct mpage *, struct mlink *);
 static  void     mlink_free(struct mlink *);  static  void     mlink_free(struct mlink *);
Line 336  main(int argc, char *argv[])
Line 336  main(int argc, char *argv[])
         memset(&dirs, 0, sizeof(struct manpaths));          memset(&dirs, 0, sizeof(struct manpaths));
   
         mpages_info.alloc  = mlinks_info.alloc  = hash_alloc;          mpages_info.alloc  = mlinks_info.alloc  = hash_alloc;
         mpages_info.halloc = mlinks_info.halloc = hash_halloc;          mpages_info.calloc = mlinks_info.calloc = hash_calloc;
         mpages_info.hfree  = mlinks_info.hfree  = hash_free;          mpages_info.free  = mlinks_info.free  = hash_free;
   
         mpages_info.key_offset = offsetof(struct mpage, inodev);          mpages_info.key_offset = offsetof(struct mpage, inodev);
         mlinks_info.key_offset = offsetof(struct mlink, file);          mlinks_info.key_offset = offsetof(struct mlink, file);
Line 1088  mpages_merge(struct mchars *mc, struct mparse *mp)
Line 1088  mpages_merge(struct mchars *mc, struct mparse *mp)
         enum mandoclevel         lvl;          enum mandoclevel         lvl;
   
         str_info.alloc = hash_alloc;          str_info.alloc = hash_alloc;
         str_info.halloc = hash_halloc;          str_info.calloc = hash_calloc;
         str_info.hfree = hash_free;          str_info.free = hash_free;
         str_info.key_offset = offsetof(struct str, key);          str_info.key_offset = offsetof(struct str, key);
   
         if (0 == nodb)          if (0 == nodb)
Line 2348  prepare_statements:
Line 2348  prepare_statements:
 }  }
   
 static void *  static void *
 hash_halloc(size_t sz, void *arg)  hash_calloc(size_t n, size_t sz, void *arg)
 {  {
   
         return(mandoc_calloc(1, sz));          return(mandoc_calloc(n, sz));
 }  }
   
 static void *  static void *
Line 2362  hash_alloc(size_t sz, void *arg)
Line 2362  hash_alloc(size_t sz, void *arg)
 }  }
   
 static void  static void
 hash_free(void *p, size_t sz, void *arg)  hash_free(void *p, void *arg)
 {  {
   
         free(p);          free(p);

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152

CVSweb