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

Diff for /mandoc/mansearch.c between version 1.40 and 1.42

version 1.40, 2014/08/05 12:34:08 version 1.42, 2014/08/09 14:24:53
Line 123  mansearch_setup(int start)
Line 123  mansearch_setup(int start)
                 }                  }
   
                 pagecache = mmap(NULL, PC_PAGESIZE * PC_NUMPAGES,                  pagecache = mmap(NULL, PC_PAGESIZE * PC_NUMPAGES,
                     PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);                      PROT_READ | PROT_WRITE,
                       MAP_SHARED | MAP_ANON, -1, 0);
   
                 if (MAP_FAILED == pagecache) {                  if (MAP_FAILED == pagecache) {
                         perror("mmap");                          perror("mmap");
Line 302  mansearch(const struct mansearch *search,
Line 303  mansearch(const struct mansearch *search,
                         mp->pageid = pageid;                          mp->pageid = pageid;
                         mp->form = sqlite3_column_int(s, 1);                          mp->form = sqlite3_column_int(s, 1);
                         if (TYPE_Nd == outbit)                          if (TYPE_Nd == outbit)
                                 mp->desc = mandoc_strdup(                                  mp->desc = mandoc_strdup((const char *)
                                     sqlite3_column_text(s, 0));                                      sqlite3_column_text(s, 0));
                         ohash_insert(&htab, idx, mp);                          ohash_insert(&htab, idx, mp);
                 }                  }
Line 406  buildnames(struct manpage *mpage, sqlite3 *db, sqlite3
Line 407  buildnames(struct manpage *mpage, sqlite3 *db, sqlite3
   
                 /* Fetch the next name. */                  /* Fetch the next name. */
   
                 sec = sqlite3_column_text(s, 0);                  sec = (const char *)sqlite3_column_text(s, 0);
                 arch = sqlite3_column_text(s, 1);                  arch = (const char *)sqlite3_column_text(s, 1);
                 name = sqlite3_column_text(s, 2);                  name = (const char *)sqlite3_column_text(s, 2);
   
                 /* Remember the first section found. */                  /* Remember the first section found. */
   
Line 497  buildoutput(sqlite3 *db, sqlite3_stmt *s, uint64_t pag
Line 498  buildoutput(sqlite3 *db, sqlite3_stmt *s, uint64_t pag
                         oldoutput = output;                          oldoutput = output;
                         sep1 = " # ";                          sep1 = " # ";
                 }                  }
                 data = sqlite3_column_text(s, 1);                  data = (const char *)sqlite3_column_text(s, 1);
                 mandoc_asprintf(&newoutput, "%s%s%s",                  mandoc_asprintf(&newoutput, "%s%s%s",
                     oldoutput, sep1, data);                      oldoutput, sep1, data);
                 free(output);                  free(output);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.42

CVSweb