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

Diff for /mandoc/mansearch.c between version 1.17 and 1.18

version 1.17, 2014/01/05 04:13:52 version 1.18, 2014/01/06 03:02:46
Line 70  struct expr {
Line 70  struct expr {
   
 struct  match {  struct  match {
         uint64_t         id; /* identifier in database */          uint64_t         id; /* identifier in database */
         char            *desc; /* description of manpage */  
         int              form; /* 0 == catpage */          int              form; /* 0 == catpage */
 };  };
   
Line 279  mansearch(const struct mansearch *search,
Line 278  mansearch(const struct mansearch *search,
                  * distribution of buckets in the table.                   * distribution of buckets in the table.
                  */                   */
                 while (SQLITE_ROW == (c = sqlite3_step(s))) {                  while (SQLITE_ROW == (c = sqlite3_step(s))) {
                         id = sqlite3_column_int64(s, 2);                          id = sqlite3_column_int64(s, 1);
                         idx = ohash_lookup_memory                          idx = ohash_lookup_memory
                                 (&htab, (char *)&id,                                  (&htab, (char *)&id,
                                  sizeof(uint64_t), (uint32_t)id);                                   sizeof(uint64_t), (uint32_t)id);
Line 289  mansearch(const struct mansearch *search,
Line 288  mansearch(const struct mansearch *search,
   
                         mp = mandoc_calloc(1, sizeof(struct match));                          mp = mandoc_calloc(1, sizeof(struct match));
                         mp->id = id;                          mp->id = id;
                         mp->desc = mandoc_strdup                          mp->form = sqlite3_column_int(s, 0);
                                 ((char *)sqlite3_column_text(s, 0));  
                         mp->form = sqlite3_column_int(s, 1);  
                         ohash_insert(&htab, idx, mp);                          ohash_insert(&htab, idx, mp);
                 }                  }
   
Line 321  mansearch(const struct mansearch *search,
Line 318  mansearch(const struct mansearch *search,
                                         (*res, maxres * sizeof(struct manpage));                                          (*res, maxres * sizeof(struct manpage));
                         }                          }
                         mpage = *res + cur;                          mpage = *res + cur;
                         mpage->desc = mp->desc;  
                         mpage->form = mp->form;                          mpage->form = mp->form;
                         buildnames(mpage, db, s, mp->id, paths->paths[i]);                          buildnames(mpage, db, s, mp->id, paths->paths[i]);
                         mpage->output = outbit ?                          mpage->output = outbit ?

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

CVSweb