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

Diff for /mandoc/Attic/makewhatis.c between version 1.6 and 1.7

version 1.6, 2011/06/21 14:16:05 version 1.7, 2011/06/21 23:37:27
Line 416  main(int argc, char *argv[])
Line 416  main(int argc, char *argv[])
   
                 seq = R_FIRST;                  seq = R_FIRST;
                 while (0 == (ch = (*hash->seq)(hash, &key, &val, seq))) {                  while (0 == (ch = (*hash->seq)(hash, &key, &val, seq))) {
                           seq = R_NEXT;
   
                         memcpy(vbuf, val.data, sizeof(uint32_t));                          memcpy(vbuf, val.data, sizeof(uint32_t));
                         val.size = sizeof(vbuf);                          val.size = sizeof(vbuf);
                         val.data = vbuf;                          val.data = vbuf;
   
                         dbt_put(db, fbbuf, &key, &val);                          dbt_put(db, fbbuf, &key, &val);
   
                         if ((*hash->del)(hash, &key, 0) < 0) {                          ch = (*hash->del)(hash, &key, R_CURSOR);
                                 perror("hash");                          if (ch < 0)
                                 exit((int)MANDOCLEVEL_SYSERR);                                  break;
                         }  
                         seq = R_NEXT;  
                 }                  }
   
                 if (ch < 0) {                  if (ch < 0) {
Line 746  hash_put(DB *db, const struct buf *buf, int mask)
Line 747  hash_put(DB *db, const struct buf *buf, int mask)
         DBT              key, val;          DBT              key, val;
         int              rc;          int              rc;
   
         key.data = buf->cp;          if (buf->len < 2)
   
         if ((key.size = buf->len) < 2)  
                 return;                  return;
   
           key.data = buf->cp;
           key.size = buf->len;
   
         if ((rc = (*db->get)(db, &key, &val, 0)) < 0) {          if ((rc = (*db->get)(db, &key, &val, 0)) < 0) {
                 perror("hash");                  perror("hash");
                 exit((int)MANDOCLEVEL_SYSERR);                  exit((int)MANDOCLEVEL_SYSERR);
Line 759  hash_put(DB *db, const struct buf *buf, int mask)
Line 761  hash_put(DB *db, const struct buf *buf, int mask)
   
         val.data = &mask;          val.data = &mask;
         val.size = sizeof(int);          val.size = sizeof(int);
   
         /*fprintf(stderr, "Hashing: [%s] (0x%x)\n",  
                         (char *)key.data, mask);*/  
   
         if ((rc = (*db->put)(db, &key, &val, 0)) < 0) {          if ((rc = (*db->put)(db, &key, &val, 0)) < 0) {
                 perror("hash");                  perror("hash");

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

CVSweb