From: Robert Spalek Date: Tue, 25 Apr 2006 22:23:49 +0000 (+0200) Subject: conf2: include again, it's tedious to write it everywhere X-Git-Tag: holmes-import~645^2~11^2~35 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b180f11bf50558e520ba131219740be665bf0767;p=libucw.git conf2: include again, it's tedious to write it everywhere Polish a comment too. --- diff --git a/lib/conf2.h b/lib/conf2.h index 7d4ad5d3..737c285d 100644 --- a/lib/conf2.h +++ b/lib/conf2.h @@ -36,10 +36,9 @@ typedef byte *cf_parser(uns number, byte **pars, void *ptr); * cf_journal_block() on the overwritten memory block. It returns an error * message or NULL if everything is all right. */ typedef byte *cf_parser1(byte *string, void *ptr); - /* A parser function for user-defined types get one string and pointer to the - * destination variable. It can only store the value inside [ptr,ptr+size), - * where size is fixed for each type. It does not have to call - * cf_journal_block(). */ + /* A parser function for user-defined types gets a string and a pointer to + * the destination variable. It must store the value within [ptr,ptr+size), + * where size is fixed for each type. It should not call cf_journal_block(). */ typedef byte *cf_hook(void *ptr); /* An init- or commit-hook gets a pointer to the section or NULL if this * is the global section. It returns an error message or NULL if everything @@ -199,6 +198,7 @@ void cf_dump_sections(struct fastbuf *fb); "-C, --config filename\t" CF_USAGE_TAB "Override the default configuration file\n\ -S, --set sec.item=val\t" CF_USAGE_TAB "Manual setting of a configuration item\n" +#include struct option; int cf_get_opt(int argc, char * const argv[], const char *short_opts, const struct option *long_opts, int *long_index);