Robert Spalek [Wed, 19 Apr 2006 10:02:37 +0000 (12:02 +0200)]
implemented a few functions of the new configuration mechanism:
- memory allocation
- skeleton of future journal functions
- parsers of all basic types and arrays of these types
Robert Spalek [Tue, 18 Apr 2006 12:37:31 +0000 (14:37 +0200)]
significant simplifications of the interface
- instead of letting the user to set cf_section.{size,init,commit}
directly, macros CF_{TYPE,INIT,COMMIT} should be used
- another macro CF_ITEMS creates a CT_END-delimited list of cf_items
- all these macros automatically add commas so that declaring a list of
cf_items behaves similarly to other preprocessor-made lists
- removed parameter name from parser hooks, because either the parser
doesn't care and only uses *ptr, or it does and then it should be set up
to pass the name in ptr
- no need to define hooks using _void_ *ptr; one can use any pointers
according to his taste and the hook-function is automatically retyped
- renamed (to make it shorter) some enumerations and macros
- CHECK_VAR_TYPE and CF_FIELD renamed to CHECK_PTR_TYPE and PTR_TO, and
moved to lib/lib.h
Robert Spalek [Tue, 18 Apr 2006 09:57:57 +0000 (11:57 +0200)]
interface simplified and a few bugs removed
- array macros renamed and extended
- CF_FUNCTION renamed to CF_PARSER, and a number of parameters and a
pointer to the target variable are passed into the parser function
- init-, commit-, and parser-hooks only get parameters that they need and
they get it in a nice way so that they don't have to work much
- fixed CHECK_VAR_TYPE and a few other thingies
Robert Spalek [Mon, 17 Apr 2006 18:15:39 +0000 (20:15 +0200)]
designed the interface of the new configuration reader. no code has been
written yet, because I better wait for an opinion first. a tester app that
currently just checks compilability of all messy cf-declaration macros is
included. don't worry about filenames; they will be eventually renamed.
Martin Mares [Wed, 12 Apr 2006 10:44:51 +0000 (12:44 +0200)]
Cleaned up CONFIG_CENTRUM_xxx switches:
o Everything related to the catalog is controlled by
CONFIG_CENTRUM_CATALOG.
o Paid weights are implied by the catalog and the PL customization,
which doesn't use them, just defines empty {get,set}_paid_weight().
o Nothing depends on CONFIG_CENTRUM_{CZ,SK,PL} now, but I am keeping
them, because it's likely that it will be needed for some exceptions
or experiments again soon.
All customizations compile except for centrum/* with shared libraries,
but the dependencies for that are already fixed in the dev-analyser branch.
Martin Mares [Tue, 11 Apr 2006 08:57:37 +0000 (10:57 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#v3.8
The image weighting backports in v3.8 have created some conflicts due to
formatting changes, so I have kept the mainline versions everywhere.
Weights were inherited from v3.8 except for IP and CK[WP]A.
Martin Mares [Fri, 20 Jan 2006 19:47:21 +0000 (19:47 +0000)]
It seems that signal safety of time-related functions is even more subtle
than I thought -- strftime() and localtime_r() can deadlock each other,
probably due to access to time zone information. Replaced strftime() by
a mere sprintf.
Martin Mares [Mon, 16 Jan 2006 20:02:42 +0000 (20:02 +0000)]
xfree() macro has been turned into a regular function. This is much cleaner,
allows for easy memory allocation tracking and also avoids including
<stdlib.h> at random places.
Martin Mares [Mon, 16 Jan 2006 14:00:03 +0000 (14:00 +0000)]
Instead of adding HEAP_INCREASE_POS as Tom requested, I've modified
HEAP_INCREASE. I think this is a better solution, because increasing
the value of the root element is too special and knowing that doesn't
enable us to do any special optimizations anyway.
Martin Mares [Wed, 16 Nov 2005 13:54:55 +0000 (13:54 +0000)]
More work on the multiplexer:
o Changed configuration of search servers and groups, added stand-alone
declarations of groups, merging groups and the default route.
o Search servers now have identifiers to avoid cluttering logs and
parameters by hostnames and ports.
o MUXSS can refer to a search server, group or merging group.
o Bug fix in pinging.
o mux -s now uses the screen width to list databases, not groups.
o Added mux --testconfig, which also dumps all known route objects.
Martin Mares [Tue, 15 Nov 2005 18:42:41 +0000 (18:42 +0000)]
Mux pings now monitor which versions of which databases are offered
by which search servers. Live search servers are also pinged ocassionally
to check that the versions still match.