diff -ubNr dotconf-1.0.8/ChangeLog dotconf-1.0.8a/ChangeLog --- dotconf-1.0.8/ChangeLog Tue Jan 15 10:43:54 2002 +++ dotconf-1.0.8a/ChangeLog Tue Jan 22 12:58:02 2002 @@ -1,7 +1,13 @@ +[2002 01 21] [v1.0.8a] + - in v1.0.7 we fixed the inline comment handling. someone used this bug as + a feature. we give them a new flag "NO_INLINE_COMMENT", to make this bug + a feature on demand + + [2002 01 15] [v1.0.8] - Benjamin Lee sent in a dotconf.spec to create RPMs. -[2001 12 29] +[2001 12 29] [v1.0.7] - win32 cleanups, by Robert Buck [2001 12 05] diff -ubNr dotconf-1.0.8/configure dotconf-1.0.8a/configure --- dotconf-1.0.8/configure Tue Jan 15 10:18:39 2002 +++ dotconf-1.0.8a/configure Tue Jan 22 12:58:10 2002 @@ -1108,9 +1108,9 @@ # DOTCONF_MAJOR_VERSION=1 DOTCONF_MINOR_VERSION=0 -DOTCONF_MICRO_VERSION=8 -DOTCONF_INTERFACE_AGE=8 -DOTCONF_BINARY_AGE=8 +DOTCONF_MICRO_VERSION=9 +DOTCONF_INTERFACE_AGE=9 +DOTCONF_BINARY_AGE=9 DOTCONF_VERSION=$DOTCONF_MAJOR_VERSION.$DOTCONF_MINOR_VERSION.$DOTCONF_MICRO_VERSION # libtool versioning @@ -1305,7 +1305,7 @@ PACKAGE=dotconf -VERSION=1.0.8 +VERSION=1.0.8a if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:1311: error: source directory already configured; run \"make distclean\" there first" >&5 diff -ubNr dotconf-1.0.8/configure.in dotconf-1.0.8a/configure.in --- dotconf-1.0.8/configure.in Tue Jan 15 10:18:10 2002 +++ dotconf-1.0.8a/configure.in Tue Jan 22 12:47:26 2002 @@ -10,9 +10,9 @@ # DOTCONF_MAJOR_VERSION=1 DOTCONF_MINOR_VERSION=0 -DOTCONF_MICRO_VERSION=8 -DOTCONF_INTERFACE_AGE=8 -DOTCONF_BINARY_AGE=8 +DOTCONF_MICRO_VERSION=9 +DOTCONF_INTERFACE_AGE=9 +DOTCONF_BINARY_AGE=9 DOTCONF_VERSION=$DOTCONF_MAJOR_VERSION.$DOTCONF_MINOR_VERSION.$DOTCONF_MICRO_VERSION AC_SUBST(DOTCONF_MAJOR_VERSION) @@ -32,7 +32,7 @@ AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) -AM_INIT_AUTOMAKE(dotconf, 1.0.8) +AM_INIT_AUTOMAKE(dotconf, 1.0.8a) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST diff -ubNr dotconf-1.0.8/dotconf.spec dotconf-1.0.8a/dotconf.spec --- dotconf-1.0.8/dotconf.spec Tue Jan 15 11:11:19 2002 +++ dotconf-1.0.8a/dotconf.spec Tue Jan 22 14:44:29 2002 @@ -1,6 +1,6 @@ Summary: dot.conf Name: dotconf -Version: 1.0.8 +Version: 1.0.8a Release: 1dwap Copyright: LGPL Group: Development/Libraries diff -ubNr dotconf-1.0.8/src/dotconf.c dotconf-1.0.8a/src/dotconf.c --- dotconf-1.0.8/src/dotconf.c Sat Dec 29 18:43:46 2001 +++ dotconf-1.0.8a/src/dotconf.c Tue Jan 22 14:44:09 2002 @@ -429,7 +429,23 @@ else if (*cp1 == '#' && !dq && !sq) { *cp2 = '\0'; + cp1++; + if ((configfile->flags & NO_INLINE_COMMENTS) == 0) break; + else + { + /* fast forward */ + + /* just skip the current parameter */ + while(*cp1 != '\0' && !isspace((int)*cp1)) + cp1++; + + /* skip all whitespace between 2 arguments */ + while ( isspace((int)cp1[0]) && (*cp1 != '\0')) + cp1++; + + continue; + } } /* not space or quoted:eat it; dont take quote if quoting */ else if ( (!isspace((int)*cp1) && !dq && !sq && *cp1 != '"' && *cp1 != '\'') diff -ubNr dotconf-1.0.8/src/dotconf.h dotconf-1.0.8a/src/dotconf.h --- dotconf-1.0.8/src/dotconf.h Sat Dec 29 18:43:29 2001 +++ dotconf-1.0.8a/src/dotconf.h Tue Jan 22 12:46:27 2002 @@ -51,6 +51,7 @@ #define NONE 0 #define CASE_INSENSITIVE 1<<0 /* match option names case insensitive */ #define DONT_SUBSTITUTE 1<<1 /* do not call substitute_env after read_arg */ +#define NO_INLINE_COMMENTS 1<<2 /* do not allow inline comments */ /* syslog style errors as suggested by Sander Steffann */ #ifdef HAVE_SYSLOG