[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.8 and 1.9

version 1.8, 2014/01/05 04:13:46 version 1.9, 2014/01/06 03:02:40
Line 62 
Line 62 
   
 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 271 
Line 270 
                  * 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 281 
Line 280 
   
                         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 313 
Line 310 
                                         (*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.8  
changed lines
  Added in v.1.9