[BACK]Return to mansearch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mansearch.c between version 1.26 and 1.27

version 1.26, 2014/04/23 21:06:33 version 1.27, 2014/05/12 19:11:20
Line 77 
Line 77 
 static  char            *buildoutput(sqlite3 *, sqlite3_stmt *,  static  char            *buildoutput(sqlite3 *, sqlite3_stmt *,
                                  uint64_t, uint64_t);                                   uint64_t, uint64_t);
 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  struct expr     *exprcomp(const struct mansearch *,  static  struct expr     *exprcomp(const struct mansearch *,
                                 int, char *[]);                                  int, char *[]);
 static  void             exprfree(struct expr *);  static  void             exprfree(struct expr *);
Line 163 
Line 163 
         unsigned int     idx;          unsigned int     idx;
         size_t           i, j, cur, maxres;          size_t           i, j, cur, maxres;
   
         memset(&info, 0, sizeof(struct ohash_info));          info.calloc = hash_calloc;
   
         info.halloc = hash_halloc;  
         info.alloc = hash_alloc;          info.alloc = hash_alloc;
         info.hfree = hash_free;          info.free = hash_free;
         info.key_offset = offsetof(struct match, pageid);          info.key_offset = offsetof(struct match, pageid);
   
         *sz = cur = maxres = 0;          *sz = cur = maxres = 0;
Line 782 
Line 780 
 }  }
   
 static void *  static void *
 hash_halloc(size_t sz, void *arg)  hash_calloc(size_t nmemb, size_t sz, void *arg)
 {  {
   
         return(mandoc_calloc(1, sz));          return(mandoc_calloc(nmemb, sz));
 }  }
   
 static void *  static void *
Line 796 
Line 794 
 }  }
   
 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.26  
changed lines
  Added in v.1.27