=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mansearch.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/mandoc/mansearch.c 2014/01/05 04:13:46 1.8 --- src/usr.bin/mandoc/mansearch.c 2014/01/06 03:02:40 1.9 *************** *** 1,4 **** ! /* $Id: mansearch.c,v 1.8 2014/01/05 04:13:46 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013, 2014 Ingo Schwarze --- 1,4 ---- ! /* $Id: mansearch.c,v 1.9 2014/01/06 03:02:40 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013, 2014 Ingo Schwarze *************** *** 62,68 **** struct match { uint64_t id; /* identifier in database */ - char *desc; /* description of manpage */ int form; /* 0 == catpage */ }; --- 62,67 ---- *************** *** 271,277 **** * distribution of buckets in the table. */ while (SQLITE_ROW == (c = sqlite3_step(s))) { ! id = sqlite3_column_int64(s, 2); idx = ohash_lookup_memory (&htab, (char *)&id, sizeof(uint64_t), (uint32_t)id); --- 270,276 ---- * distribution of buckets in the table. */ while (SQLITE_ROW == (c = sqlite3_step(s))) { ! id = sqlite3_column_int64(s, 1); idx = ohash_lookup_memory (&htab, (char *)&id, sizeof(uint64_t), (uint32_t)id); *************** *** 281,289 **** mp = mandoc_calloc(1, sizeof(struct match)); mp->id = id; ! mp->desc = mandoc_strdup ! ((char *)sqlite3_column_text(s, 0)); ! mp->form = sqlite3_column_int(s, 1); ohash_insert(&htab, idx, mp); } --- 280,286 ---- mp = mandoc_calloc(1, sizeof(struct match)); mp->id = id; ! mp->form = sqlite3_column_int(s, 0); ohash_insert(&htab, idx, mp); } *************** *** 313,319 **** (*res, maxres * sizeof(struct manpage)); } mpage = *res + cur; - mpage->desc = mp->desc; mpage->form = mp->form; buildnames(mpage, db, s, mp->id, paths->paths[i]); mpage->output = outbit ? --- 310,315 ----