Hello everybody!

Attached patches implemet:

1. Adding to and getting from Configuration class complex record
Configuration::Add(char*,char*,Configuration*);
Configuration::Add(char*,char*,Configuration*)
Configuration::[Value|Double|Boolean](char*,char*,char*);

For example. To get wait time for gate.gc.lviv.ua server

<server: gate.gc.lviv.ua>
 server_max_docs: 555555
 server_wait_time: 60
 max_hop_count: 888888
</server>

int
currentWaitTime=conf.Value("server","gate.gc.lviv.ua","server_wait_time",0);
// ==60;
If parameter isn't found it's taken from global definition;

At the moment only server_max_docs and server_max_docs are implemented.
Files: conf2.y, conf2.l should be in htdig/lib
DEBUG is defined in conf2.y (if you don't want it, undefine)

TODO: better error handling in config file parser.

Warning: you need Bison version >1.25 because 1.25 has bug. (or applay
patch to 1.25)

I want to ask:
1. about delimiter in configuration: is it necessery?
2. which parameter we need in "server"
2. which clause we need except "server" ( "<url>" ?)


Waiting for your feedback
Vadim Chekan    [EMAIL PROTECTED]

Config.tar.gz

Reply via email to