From: Martin Mares Date: Sun, 14 Aug 2005 14:39:47 +0000 (+0000) Subject: Allow typed configuration items. (This is the only way to get constructs X-Git-Tag: holmes-import~755 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=149855f3744354726d12be1a15f4eb6e009e6314;p=libucw.git Allow typed configuration items. (This is the only way to get constructs like `96d' parsed properly.) --- diff --git a/lib/shell/config.c b/lib/shell/config.c index 6257fd51..95ddce11 100644 --- a/lib/shell/config.c +++ b/lib/shell/config.c @@ -1,7 +1,7 @@ /* * UCW Library -- Shell Interface to Configuration Files * - * (c) 2002 Martin Mares + * (c) 2002--2005 Martin Mares * * Once we were using this beautiful Shell version, but it turned out * that it doesn't work with nested config files: @@ -26,19 +26,74 @@ static struct cfitem *items; static byte *flags; +enum flag { + F_STRING = 0, + F_INT = 1, + F_DOUBLE = 2, + F_INT64 = 3, + F_TYPE_MASK = 7, + F_ARRAY = 0x80, +}; + static void help(void) { - die("Usage: config [-C] [-S
.