]> mj.ucw.cz Git - libucw.git/log
libucw.git
19 years agoMade DEFAULT_CONFIG optional.
Martin Mares [Sat, 11 Dec 2004 10:47:49 +0000 (10:47 +0000)]
Made DEFAULT_CONFIG optional.

19 years agofb-charconv now not closing wrapped stream, only flushing it
Tomas Holusa [Wed, 8 Dec 2004 10:44:14 +0000 (10:44 +0000)]
fb-charconv now not closing wrapped stream, only flushing it
updated all places, when used this wrapper and close wrapped stream manually

19 years agoA minor bug fix to the installer (when installing `dict/cs', `dict'
Martin Mares [Fri, 3 Dec 2004 21:07:35 +0000 (21:07 +0000)]
A minor bug fix to the installer (when installing `dict/cs', `dict'
needn't exist).

19 years agoAdded the `extras' target (initially empty) and INSTALL_RUNDIRS.
Martin Mares [Fri, 3 Dec 2004 20:52:22 +0000 (20:52 +0000)]
Added the `extras' target (initially empty) and INSTALL_RUNDIRS.
`lib' and `bin' are now handled as INSTALL_RUNDIRS.

19 years agoPartial inlining of bskip().
Martin Mares [Sat, 20 Nov 2004 15:14:39 +0000 (15:14 +0000)]
Partial inlining of bskip().

19 years agoIntroduced COMPARE_LT and COMPARE_GT for comparison functions for arraysort.
Martin Mares [Sat, 20 Nov 2004 12:55:12 +0000 (12:55 +0000)]
Introduced COMPARE_LT and COMPARE_GT for comparison functions for arraysort.

19 years agoIncrease CARD_POS_SHIFT on Centrum.
Martin Mares [Sat, 20 Nov 2004 11:38:06 +0000 (11:38 +0000)]
Increase CARD_POS_SHIFT on Centrum.

19 years agoIf "Run" is omitted from a test, keep the value from the previous test.
Martin Mares [Fri, 19 Nov 2004 22:30:12 +0000 (22:30 +0000)]
If "Run" is omitted from a test, keep the value from the previous test.

19 years agoenlarge MAX_ATTR_SIZE
Robert Spalek [Mon, 15 Nov 2004 16:38:34 +0000 (16:38 +0000)]
enlarge MAX_ATTR_SIZE

19 years agoMove all explicit extern declarations of logf() [which is apparently missing
Martin Mares [Sun, 14 Nov 2004 12:12:29 +0000 (12:12 +0000)]
Move all explicit extern declarations of logf() [which is apparently missing
from system includes while present in the library; does anybody know, why?]
to lib/math.h.

19 years agoUpdated test rules.
Martin Mares [Sun, 14 Nov 2004 11:57:25 +0000 (11:57 +0000)]
Updated test rules.

19 years agoAdded tests for the hash table module.
Martin Mares [Sun, 14 Nov 2004 11:57:07 +0000 (11:57 +0000)]
Added tests for the hash table module.

19 years agoAdded support for dynamically allocated hash tables. Closes Bug #250.
Martin Mares [Sun, 14 Nov 2004 11:56:42 +0000 (11:56 +0000)]
Added support for dynamically allocated hash tables. Closes Bug #250.

19 years agoFinally I decided to change the syntax of INDEX_VERSION to better distinguish
Martin Mares [Sun, 14 Nov 2004 11:54:27 +0000 (11:54 +0000)]
Finally I decided to change the syntax of INDEX_VERSION to better distinguish
between different customizations.

19 years agoCorrected INDEX_VERSION, documented the rules and added CUSTOM_INDEX_VERSION.
Martin Mares [Sun, 14 Nov 2004 11:45:15 +0000 (11:45 +0000)]
Corrected INDEX_VERSION, documented the rules and added CUSTOM_INDEX_VERSION.

19 years agoif SORT_PRESORT and SORT_UP_TO are both on, compute the initial number of
Robert Spalek [Tue, 9 Nov 2004 17:48:52 +0000 (17:48 +0000)]
if SORT_PRESORT and SORT_UP_TO are both on, compute the initial number of
runs properly so that we do not run a superfluous pass of sorting

19 years agojust a bit more funny initialization for the SORT_UP_TO loop
Robert Spalek [Tue, 9 Nov 2004 15:46:39 +0000 (15:46 +0000)]
just a bit more funny initialization for the SORT_UP_TO loop

19 years agoactually, the number of runs is halved during each pass, so take it into
Robert Spalek [Tue, 9 Nov 2004 15:39:39 +0000 (15:39 +0000)]
actually, the number of runs is halved during each pass, so take it into
account in the stopping condition

19 years agoFixed a bug in parsing of replies -- the parse tree of each card was trimmed
Martin Mares [Tue, 9 Nov 2004 14:09:00 +0000 (14:09 +0000)]
Fixed a bug in parsing of replies -- the parse tree of each card was trimmed
at the first ")". Affected only the free front-end.

19 years agobfilesize() returns sh_off_t
Robert Spalek [Tue, 9 Nov 2004 13:16:20 +0000 (13:16 +0000)]
bfilesize() returns sh_off_t

19 years agoSORT_ONLY_PRESORT feature improved into SORT_UP_TO (stop when average run
Robert Spalek [Mon, 8 Nov 2004 17:36:48 +0000 (17:36 +0000)]
SORT_ONLY_PRESORT feature improved into SORT_UP_TO (stop when average run
length reaches a given limit), which is independent on presorting

19 years agoSplit type_flags to 4/4 bits for FILETYPE and LANG
Tomas Holusa [Fri, 5 Nov 2004 15:07:26 +0000 (15:07 +0000)]
Split type_flags to 4/4 bits for FILETYPE and LANG

19 years agoRemember that DEBUG has been renamed.
Martin Mares [Thu, 4 Nov 2004 22:22:59 +0000 (22:22 +0000)]
Remember that DEBUG has been renamed.

19 years agoAdded "pre-sort only" mode as Robert suggested.
Martin Mares [Thu, 4 Nov 2004 22:22:21 +0000 (22:22 +0000)]
Added "pre-sort only" mode as Robert suggested.

19 years agoOne more round of changes to the assert code -- I didn't realize that CONFIG_DEBUG
Martin Mares [Fri, 29 Oct 2004 15:10:21 +0000 (15:10 +0000)]
One more round of changes to the assert code -- I didn't realize that CONFIG_DEBUG
is already used to control compilation of debugging utilities. Introduced
DEBUG_ASSERTS as a separate switch and as a bonus, you can use assertions
selectively (previously, if you have built the library without assertions,
ASSERT couldn't work anywhere, because assert_failed() was incompatible).

19 years agoAlways define the memory allocation primitives with the `sh_' prefix,
Martin Mares [Fri, 29 Oct 2004 08:56:06 +0000 (08:56 +0000)]
Always define the memory allocation primitives with the `sh_' prefix,
so that the basic names (xmalloc etc.) can be modified when needed.

19 years agoChanged DEBUG to CONFIG_DEBUG to avoid conflicts with various libraries.
Martin Mares [Fri, 29 Oct 2004 08:41:04 +0000 (08:41 +0000)]
Changed DEBUG to CONFIG_DEBUG to avoid conflicts with various libraries.
(BTW we were probably slowing down the regex code by defining DEBUG.)

19 years agoTagged current sources as rel-3-3 (bug fixes only)
Martin Mares [Mon, 25 Oct 2004 14:32:34 +0000 (14:32 +0000)]
Tagged current sources as rel-3-3 (bug fixes only)
and moved mainline to v3.4.

19 years agoDouble oops.
Martin Mares [Mon, 4 Oct 2004 16:45:56 +0000 (16:45 +0000)]
Double oops.

19 years agoOops.
Martin Mares [Mon, 4 Oct 2004 16:45:24 +0000 (16:45 +0000)]
Oops.

19 years agoAdded sh_file_size() (stat() isn't reliable on large files on some systems).
Martin Mares [Mon, 4 Oct 2004 16:43:14 +0000 (16:43 +0000)]
Added sh_file_size()  (stat() isn't reliable on large files on some systems).

19 years agoIntroduced relative counterparts of url_canon_split() and url_auto_canonicalize().
Martin Mares [Sat, 2 Oct 2004 10:52:59 +0000 (10:52 +0000)]
Introduced relative counterparts of url_canon_split() and url_auto_canonicalize().

Also added parameter names to all prototypes.

19 years agoLet bskip() return success.
Martin Mares [Mon, 27 Sep 2004 19:49:00 +0000 (19:49 +0000)]
Let bskip() return success.

19 years agoobuck_slurp_pool() is now able to skip unwanted buckets. Some day we can
Martin Mares [Sun, 26 Sep 2004 16:09:18 +0000 (16:09 +0000)]
obuck_slurp_pool() is now able to skip unwanted buckets. Some day we can
improve it by sizing the buffer adaptively, but not now.

19 years agoA couple of minor improvements to the generic hash tables:
Martin Mares [Mon, 20 Sep 2004 10:03:23 +0000 (10:03 +0000)]
A couple of minor improvements to the generic hash tables:

o  Comment on HASH_GIVE_ALLOC corrected, the automatic choice between
   normal and pooled allocation was never implemented, because we don't
   have enough information to decide the right pool size. HASH_AUTO_POOL
   has been implemented instead.
o  Pooled allocation no longer conflicts with remove/delete, it just
   produces memory leaks within the pool, which are usually harmless.
o  Added HASH_TABLE_ALLOC switch.
o  Internal decisions to enable HASH_CONSERVE_SPACE were made too late
   and didn't influence hash node layout. Fixed.

19 years agoThoroughly tested and fixed a couple of bugs.
Martin Mares [Thu, 9 Sep 2004 11:52:09 +0000 (11:52 +0000)]
Thoroughly tested and fixed a couple of bugs.

19 years agoFixed a couple of bugs.
Martin Mares [Thu, 9 Sep 2004 10:47:05 +0000 (10:47 +0000)]
Fixed a couple of bugs.

19 years agoNo exceptions for url-equiv.
Martin Mares [Thu, 9 Sep 2004 10:46:12 +0000 (10:46 +0000)]
No exceptions for url-equiv.

19 years agotested MJ's patches on charconv. they successfully converted everything
Robert Spalek [Thu, 26 Aug 2004 12:52:15 +0000 (12:52 +0000)]
tested MJ's patches on charconv.  they successfully converted everything
I tried, including the tests that failed before

19 years ago- bugfix: when disabling compression, change bucket_type
Robert Spalek [Sat, 21 Aug 2004 16:30:02 +0000 (16:30 +0000)]
- bugfix: when disabling compression, change bucket_type
- lizard_bwrite() returns the final bucket_type instead of the number of
  written bytes

19 years agoadded sepsplit() in wordsplit.c
Robert Spalek [Sat, 21 Aug 2004 16:29:06 +0000 (16:29 +0000)]
added sepsplit() in wordsplit.c

19 years agoAdded initial support for areas to the indexer. Merging not restricted yet,
Martin Mares [Fri, 20 Aug 2004 19:38:31 +0000 (19:38 +0000)]
Added initial support for areas to the indexer. Merging not restricted yet,
but propagation of area ID's works.

19 years agoPut debug/custom last, so that one more manual recompile won't be needed after
Martin Mares [Fri, 20 Aug 2004 19:05:14 +0000 (19:05 +0000)]
Put debug/custom last, so that one more manual recompile won't be needed after
check-customs when debugging.

19 years agoCheck more configurations.
Martin Mares [Fri, 20 Aug 2004 19:04:17 +0000 (19:04 +0000)]
Check more configurations.

19 years agoif b?get_attr() returns 0, it clears attr->attr too
Robert Spalek [Fri, 20 Aug 2004 13:17:49 +0000 (13:17 +0000)]
if b?get_attr() returns 0, it clears attr->attr too

19 years agoa really essential bugfix
Robert Spalek [Fri, 20 Aug 2004 12:38:28 +0000 (12:38 +0000)]
a really essential bugfix

19 years agoUse GET_UTF8 instead of GET_UTF8_CHAR (this costs us an extra unnecessary
Martin Mares [Fri, 20 Aug 2004 11:44:08 +0000 (11:44 +0000)]
Use GET_UTF8 instead of GET_UTF8_CHAR (this costs us an extra unnecessary
test for character < 0x80, but it is worth the simplification).

19 years agoAdded unit tests for UTF8 macros.
Martin Mares [Fri, 20 Aug 2004 11:43:10 +0000 (11:43 +0000)]
Added unit tests for UTF8 macros.

19 years agoOptimized and simplified UTF8 macros. In fact, turned most of them
Martin Mares [Fri, 20 Aug 2004 11:42:43 +0000 (11:42 +0000)]
Optimized and simplified UTF8 macros. In fact, turned most of them
to inline functions.

This resulted in a couple of const/non-const problems, hence the casts
in GET_UTF8{,_32}.

19 years agorenamed attr_set_type() to put_attr_set_type()
Robert Spalek [Fri, 20 Aug 2004 09:41:00 +0000 (09:41 +0000)]
renamed attr_set_type() to put_attr_set_type()

19 years ago- added b?get_attr()
Robert Spalek [Fri, 20 Aug 2004 09:39:00 +0000 (09:39 +0000)]
- added b?get_attr()
- added {get,put}_attr_set_type()

19 years ago- added get_attr() and bget_attr() with get_attr_set_type()
Robert Spalek [Fri, 20 Aug 2004 09:36:53 +0000 (09:36 +0000)]
- added get_attr() and bget_attr() with get_attr_set_type()
- use get_utf8_32()

19 years ago- use put_utf8_32()
Robert Spalek [Fri, 20 Aug 2004 09:35:55 +0000 (09:35 +0000)]
- use put_utf8_32()
- attr_set_type() renamed to put_attr_set_type()

19 years ago- added {get,put}_utf8_32() for all full 6-byte codes
Robert Spalek [Fri, 20 Aug 2004 09:34:02 +0000 (09:34 +0000)]
- added {get,put}_utf8_32() for all full 6-byte codes
- fixed UTF8_SKIP_BWD(); it is never used
- upgraded utf8_space() and utf8_encoding_len()

19 years ago- do not try to compress when liz_min_compr == 0
Robert Spalek [Thu, 19 Aug 2004 18:32:24 +0000 (18:32 +0000)]
- do not try to compress when liz_min_compr == 0
- renamed function
- lizard_*read() tests EOF and invalid bucket_type

19 years agotypo
Robert Spalek [Thu, 19 Aug 2004 18:30:52 +0000 (18:30 +0000)]
typo

19 years agorenamed function
Robert Spalek [Thu, 19 Aug 2004 18:30:43 +0000 (18:30 +0000)]
renamed function

19 years agoA better implementation of vbprintf() which avoids copying if there is enough
Martin Mares [Thu, 19 Aug 2004 13:47:23 +0000 (13:47 +0000)]
A better implementation of vbprintf() which avoids copying if there is enough
room in the fastbuf's buffer.

19 years agoComparisons of type `if (f->bptr + length > f->bstop)' could overflow
Martin Mares [Thu, 19 Aug 2004 13:37:08 +0000 (13:37 +0000)]
Comparisons of type `if (f->bptr + length > f->bstop)' could overflow
if `length' was much larger than the buffer size and the buffer was situated
at the end of the address space. Solved by introducing bavail{r,w}() and
using it systematically.

19 years agobugfix in obuck_slurp_refill
Robert Spalek [Wed, 18 Aug 2004 10:28:40 +0000 (10:28 +0000)]
bugfix in obuck_slurp_refill

19 years agocards format has changed, do upgrade the version of the index
Robert Spalek [Tue, 17 Aug 2004 20:17:37 +0000 (20:17 +0000)]
cards format has changed, do upgrade the version of the index

19 years agoadded a module that supports transparent compression of data streamed into
Robert Spalek [Tue, 17 Aug 2004 20:12:05 +0000 (20:12 +0000)]
added a module that supports transparent compression of data streamed into
an output fastbuf.  on the other side, reading from the stream is also
transparent

* will be used for cards
* untested

19 years agoAccept V33_LIZARD buckets without body -- such buckets can legally
Martin Mares [Sun, 15 Aug 2004 14:14:55 +0000 (14:14 +0000)]
Accept V33_LIZARD buckets without body -- such buckets can legally
arise when shep-cleanup trims an inactive bucket.

Also added debugging messages which helped to verify that zero-copy
is really invoked where it should.

19 years agoAdded sync_dir().
Martin Mares [Sun, 15 Aug 2004 12:09:57 +0000 (12:09 +0000)]
Added sync_dir().

19 years agoAdded bfilesync().
Martin Mares [Sun, 15 Aug 2004 12:09:45 +0000 (12:09 +0000)]
Added bfilesync().

19 years agoMade `buckettool -x' show the header if in verbose mode.
Martin Mares [Sun, 15 Aug 2004 10:16:03 +0000 (10:16 +0000)]
Made `buckettool -x' show the header if in verbose mode.
Also use bbcopy_slow() for copying bucket contents.

19 years agoAdded obj_find_anum() which is obj_find_aval() combined with atol() and
Martin Mares [Sat, 14 Aug 2004 15:15:53 +0000 (15:15 +0000)]
Added obj_find_anum() which is obj_find_aval() combined with atol() and
a default value (this is a very common idiom at many places).

Added size_attr() which calculates size of a given attribute in the
current bucket format.

19 years agoUTF8_SPACE turned to an inline function.
Martin Mares [Sat, 14 Aug 2004 15:14:36 +0000 (15:14 +0000)]
UTF8_SPACE turned to an inline function.
Added utf8_encoding_length() which measures expected length of an UTF-8
sequence according to its first byte.

19 years agoobj_add_attr_ref() with an on-stack buffer is not advisable, better
Martin Mares [Thu, 5 Aug 2004 22:33:19 +0000 (22:33 +0000)]
obj_add_attr_ref() with an on-stack buffer is not advisable, better
allocate the buffer in the object pool.

19 years agoWhen reading, the data end at b->bstop, not b->bufend.
Martin Mares [Thu, 5 Aug 2004 22:32:30 +0000 (22:32 +0000)]
When reading, the data end at b->bstop, not b->bufend.

19 years agoBucket fastbuf's have to be seekable, since shep-reap seeks on them
Martin Mares [Thu, 5 Aug 2004 22:28:58 +0000 (22:28 +0000)]
Bucket fastbuf's have to be seekable, since shep-reap seeks on them
(although the seek will be inside the buffer [and thence optimized out
by bseek()] under all reasonable circumstances [it was triggered by
a bug in buck2obj]).

19 years agodo not read the whole bucket into memory if only header is needed
Robert Spalek [Thu, 5 Aug 2004 14:13:56 +0000 (14:13 +0000)]
do not read the whole bucket into memory if only header is needed

19 years agoNew attributes are now added at the end of the list.
Martin Mares [Thu, 5 Aug 2004 12:13:41 +0000 (12:13 +0000)]
New attributes are now added at the end of the list.

19 years agotiny bugfix :))
Robert Spalek [Tue, 20 Jul 2004 15:16:26 +0000 (15:16 +0000)]
tiny bugfix :))

19 years agotiny optimization: do not make 2 function calls in adler32()
Robert Spalek [Tue, 20 Jul 2004 10:15:31 +0000 (10:15 +0000)]
tiny optimization: do not make 2 function calls in adler32()

19 years agoFixed two bugs in parsing of buckets (one of them introduced by me a couple
Martin Mares [Fri, 16 Jul 2004 21:56:11 +0000 (21:56 +0000)]
Fixed two bugs in parsing of buckets (one of them introduced by me a couple
of hours ago, the other aged).

19 years agoBuckets of unknown format should be skipped properly, otherwise
Martin Mares [Fri, 16 Jul 2004 20:22:53 +0000 (20:22 +0000)]
Buckets of unknown format should be skipped properly, otherwise
bucket fetching can become confused.

19 years ago`buckettool -c' (cat) now separates buckets by an empty line.
Martin Mares [Fri, 16 Jul 2004 19:08:23 +0000 (19:08 +0000)]
`buckettool -c' (cat) now separates buckets by an empty line.

19 years agoParsing of PLAIN type buckets also ends after buck_len bytes.
Martin Mares [Fri, 16 Jul 2004 18:32:35 +0000 (18:32 +0000)]
Parsing of PLAIN type buckets also ends after buck_len bytes.
obj_read_multi() is gone.

19 years agoReading of V30 buckets was broken (for example it didn't work when a bucket
Martin Mares [Fri, 16 Jul 2004 18:18:02 +0000 (18:18 +0000)]
Reading of V30 buckets was broken (for example it didn't work when a bucket
had only header and no body). When fixing it, I've modified it to terminate
after buck_len bytes, so the terminating NUL character is no longer needed.

19 years agoprune the original source code yet more
Robert Spalek [Fri, 16 Jul 2004 11:46:06 +0000 (11:46 +0000)]
prune the original source code yet more

19 years agotiny bugfix
Robert Spalek [Fri, 16 Jul 2004 10:50:14 +0000 (10:50 +0000)]
tiny bugfix

19 years agotaken much faster implementation of Adler32 and put into a separate source-code
Robert Spalek [Fri, 16 Jul 2004 10:47:37 +0000 (10:47 +0000)]
taken much faster implementation of Adler32 and put into a separate source-code

19 years agoadd Adler32 checksum to compressed V33 buckets
Robert Spalek [Fri, 16 Jul 2004 10:39:04 +0000 (10:39 +0000)]
add Adler32 checksum to compressed V33 buckets

19 years agoadded adler32 functions
Robert Spalek [Fri, 16 Jul 2004 10:25:49 +0000 (10:25 +0000)]
added adler32 functions

19 years agoautomatically add 0x80000000 to bucket-type specified on the command-line
Robert Spalek [Fri, 16 Jul 2004 10:12:33 +0000 (10:12 +0000)]
automatically add 0x80000000 to bucket-type specified on the command-line

19 years agoimproved an error message to catch an error
Robert Spalek [Fri, 16 Jul 2004 09:07:50 +0000 (09:07 +0000)]
improved an error message to catch an error

19 years agoAdded {b,}put_attr_separator().
Martin Mares [Thu, 15 Jul 2004 21:52:29 +0000 (21:52 +0000)]
Added {b,}put_attr_separator().

19 years agoIntroduced late matchers and custom statistics [see Bug #860]. Converted
Martin Mares [Mon, 12 Jul 2004 14:13:23 +0000 (14:13 +0000)]
Introduced late matchers and custom statistics [see Bug #860]. Converted
FILETYPE to this mechanism, it's no longer an exception.

19 years agopools.h -> mempool.h
Martin Mares [Sat, 10 Jul 2004 21:05:27 +0000 (21:05 +0000)]
pools.h -> mempool.h

19 years agoI always wanted to rename the rather inconsistent memory pool modules.
Martin Mares [Sat, 10 Jul 2004 21:04:23 +0000 (21:04 +0000)]
I always wanted to rename the rather inconsistent memory pool modules.
After the big library earthquake I caused with my unicode.h changes,
this is the small fish, so let's go.

19 years agoArranged the module list.
Martin Mares [Sat, 10 Jul 2004 20:56:56 +0000 (20:56 +0000)]
Arranged the module list.

19 years agoMoved object reading and writing functions where they belong.
Martin Mares [Sat, 10 Jul 2004 20:46:55 +0000 (20:46 +0000)]
Moved object reading and writing functions where they belong.

19 years agoMany programs now don't need to link with libcharset.
Martin Mares [Sat, 10 Jul 2004 20:43:22 +0000 (20:43 +0000)]
Many programs now don't need to link with libcharset.

19 years agoRenamed fb-printf to ff-printf to keep fastbuf front-ends and back-ends apart.
Martin Mares [Sat, 10 Jul 2004 20:39:31 +0000 (20:39 +0000)]
Renamed fb-printf to ff-printf to keep fastbuf front-ends and back-ends apart.

19 years agoAdapted to new unicode includes.
Martin Mares [Sat, 10 Jul 2004 20:38:38 +0000 (20:38 +0000)]
Adapted to new unicode includes.

19 years agoAdjust includes.
Martin Mares [Sat, 10 Jul 2004 20:37:05 +0000 (20:37 +0000)]
Adjust includes.

19 years agoUnicode character type functions moved to charset/unicat.h
Martin Mares [Sat, 10 Jul 2004 20:36:55 +0000 (20:36 +0000)]
Unicode character type functions moved to charset/unicat.h
charset/unicode.h removed, because it's now empty.

19 years agoGone (some functions moved to the main lib, some were unused).
Martin Mares [Sat, 10 Jul 2004 20:36:06 +0000 (20:36 +0000)]
Gone (some functions moved to the main lib, some were unused).

19 years agoMoved the basic Unicode and UTF-8 functions to the main library.
Martin Mares [Sat, 10 Jul 2004 20:35:31 +0000 (20:35 +0000)]
Moved the basic Unicode and UTF-8 functions to the main library.