X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Frecindex.c;h=4563fc469ec16fce847277ded74acfb0dd7b7305;hb=cc9f94a61cbd9dcc0df0cf7d0c7c41d2cec88189;hp=5fbbaed4f924092a707eb959eb5aaab4a2946aaf;hpb=120b9ad8cd0e1d1a6522582bb14fa92a3ecaed6e;p=idzebra-moved-to-github.git diff --git a/index/recindex.c b/index/recindex.c index 5fbbaed..4563fc4 100644 --- a/index/recindex.c +++ b/index/recindex.c @@ -4,7 +4,14 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: recindex.c,v $ - * Revision 1.30 2000-07-13 10:14:20 heikki + * Revision 1.32 2002-04-05 08:46:26 adam + * Zebra with full functionality + * + * Revision 1.31 2001/02/26 22:14:59 adam + * Updated for BZIP2 1.0.X. Configure script doesn't enable 64 bit LFS + * on broken glibc on Redhat 7.0. + * + * Revision 1.30 2000/07/13 10:14:20 heikki * Removed compiler warnings when making zebra * * Revision 1.29 2000/04/05 09:49:35 adam @@ -535,7 +542,12 @@ static void rec_write_multiple (Records p, int saveCount) #if HAVE_BZLIB_H csize = out_offset + (out_offset >> 6) + 620; rec_tmp_expand (p, csize); - i = bzBuffToBuffCompress (p->tmp_buf+sizeof(int)+sizeof(short)+ +#ifdef BZ_CONFIG_ERROR + i = BZ2_bzBuffToBuffCompress +#else + i = bzBuffToBuffCompress +#endif + (p->tmp_buf+sizeof(int)+sizeof(short)+ sizeof(char), &csize, out_buf, out_offset, 1, 0, 30); if (i != BZ_OK) @@ -731,7 +743,12 @@ static Record rec_get_int (Records p, int sysno) while (1) { bz_buf = (char *) xmalloc (bz_size); - i = bzBuffToBuffDecompress (bz_buf, &bz_size, in_buf, in_size, 0, 0); +#ifdef BZ_CONFIG_ERROR + i = BZ2_bzBuffToBuffDecompress +#else + i = bzBuffToBuffDecompress +#endif + (bz_buf, &bz_size, in_buf, in_size, 0, 0); logf (LOG_LOG, "decompress %5d %5d", in_size, bz_size); if (i == BZ_OK) break; @@ -827,14 +844,6 @@ static Record rec_new_int (Records p) sysno = p->head.index_free; p->head.index_free = entry.next; } -#if ZMBOL -#else - if (sysno > 100000) - { - logf (LOG_FATAL, "100,000 record limit reached"); - exit (1); - } -#endif (p->head.no_records)++; rec->sysno = sysno; for (i = 0; i < REC_NO_INFO; i++)