X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fshell%2Fconfig.c;h=ba60f0350980861c1ee24a21456e7425744efe4f;hb=d5e8872563f6fde8299db971ffb6494c2438c590;hp=f0fd32c858097ee2e8eaf6856c6c2680290db6cc;hpb=2a64fd8ad0419220eccfcde539ed1791138ef942;p=libucw.git diff --git a/lib/shell/config.c b/lib/shell/config.c index f0fd32c8..ba60f035 100644 --- a/lib/shell/config.c +++ b/lib/shell/config.c @@ -1,7 +1,9 @@ /* - * Sherlock Library -- Shell Interface to Configuration Files + * UCW Library -- Shell Interface to Configuration Files * - * (c) 2002 Martin Mares + * (c) 2002--2005 Martin Mares + * (c) 2006 Robert Spalek + * (c) 2006 Pavel Charvat * * Once we were using this beautiful Shell version, but it turned out * that it doesn't work with nested config files: @@ -10,69 +12,423 @@ * h;s@[^ ]*@@;x;s@[ ].*@@;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;G;s/\n//; * /^\[SECTION\]/,/^\[/ {; /^[A-Z]/ { s/^\([^ ]\+\)[ ]*\(.*\)$/SH_\1="\2"/; p; }; }; * d;'` + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #include "lib/lib.h" #include "lib/conf.h" +#include "lib/getopt.h" +#include "lib/conf-internal.h" +#include "lib/clists.h" +#include "lib/mempool.h" +#include "lib/chartype.h" +#include "lib/bbuf.h" #include #include #include +#include static void help(void) { - die("Usage: config [-C] [-S
.