Index: ossp-pkg/cfg/AUTHORS RCS File: /v/ossp/cvs/ossp-pkg/cfg/AUTHORS,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/cfg/AUTHORS,v' | diff -u /dev/null - -L'ossp-pkg/cfg/AUTHORS' 2>/dev/null --- ossp-pkg/cfg/AUTHORS +++ - 2024-05-13 20:24:32.552764283 +0200 @@ -0,0 +1,15 @@ + _ ___ ____ ____ ____ __ + |_|_ _ / _ \/ ___/ ___|| _ \ ___ / _| __ _ + _|_||_| | | | \___ \___ \| |_) | / __| |_ / _` | + |_||_|_| | |_| |___) |__) | __/ | (__| _| (_| | + |_|_|_| \___/|____/____/|_| \___|_| \__, | + |___/ + OSSP cfg - Configuration Parsing + + AUTHORS + + This is a list of authors who have written + or edited major parts of the OSSP cfg sources. + + Ralf S. Engelschall + Index: ossp-pkg/cfg/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/cfg/ChangeLog,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/cfg/ChangeLog,v' 2>/dev/null --- ChangeLog 2002/07/30 19:33:07 1.1 +++ ChangeLog 2002/08/02 19:07:12 1.2 @@ -1,4 +1,19 @@ + _ ___ ____ ____ ____ __ + |_|_ _ / _ \/ ___/ ___|| _ \ ___ / _| __ _ + _|_||_| | | | \___ \___ \| |_) | / __| |_ / _` | + |_||_|_| | |_| |___) |__) | __/ | (__| _| (_| | + |_|_|_| \___/|____/____/|_| \___|_| \__, | + |___/ + OSSP cfg - Configuration Parsing + + CHANGELOG - ChangeLog - ========= + Changes between 0.9.0 and 0.9.1 (01-Jul-2002 to 02-Aug-2002) + + *) Switch from text-based VERSION file to C-based cfg_vers.c + and use this to provide a cfg_version(3) API function. + [Ralf S. Engelschall ] + + *) Source tree cleanups. + [Ralf S. Engelschall ] Index: ossp-pkg/cfg/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/cfg/Makefile.in,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/cfg/Makefile.in,v' 2>/dev/null --- Makefile.in 2002/07/10 12:00:23 1.2 +++ Makefile.in 2002/08/02 19:07:12 1.3 @@ -30,6 +30,7 @@ @SET_MAKE@ +# installation paths DESTDIR = prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -38,6 +39,7 @@ includedir = @includedir@ mandir = @mandir@ +# build tools CC = @CC@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @DEFS@ @CFLAGS@ @@ -52,31 +54,36 @@ FLEX = @FLEX@ BISON = @BISON@ +# build objects LIB_NAME = libcfg.la LIB_OBJS = cfg_main.lo cfg_buf.lo cfg_grid.lo cfg_data.lo cfg_node.lo cfg_fmt.lo \ - cfg_syn.lo cfg_syn_parse.lo cfg_syn_scan.lo cfg_util.lo - + cfg_syn.lo cfg_syn_parse.lo cfg_syn_scan.lo cfg_util.lo cfg_vers.lo TST_NAME = cfg_test TST_OBJS = cfg_test.o +# recognized suffixes for implicit rules .SUFFIXES: .SUFFIXES: .c .o .lo +# default target all: $(LIB_NAME) $(TST_NAME) +# implicit rules for compilation .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c $< - .c.lo: - @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< + $(LIBTOOL) --quiet --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< +# explicit rule for library linking $(LIB_NAME): $(LIB_OBJS) - @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ - -version-info `$(SHTOOL) version -l txt -d libtool VERSION` + $(LIBTOOL) --quiet --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ + -version-info `$(SHTOOL) version -l c -d libtool cfg_vers.c` +# explicit rule for test program linking $(TST_NAME): $(TST_OBJS) $(LIB_NAME) - @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS) + $(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS) +# explicit rules for compiler construction tools cfg_syn.c: cfg_syn.h cfg_syn_parse.h cfg_syn_scan.o: cfg_syn_scan.c cfg_syn_parse.h cfg_syn_scan.c: cfg_syn_scan.l @@ -84,23 +91,23 @@ cfg_syn_parse.c cfg_syn_parse.h: cfg_syn_parse.y $(BISON) -d -k -pcfg_syn_ -ocfg_syn_parse.c cfg_syn_parse.y +# explicit rule for manual page construction man: cfg.3 cfg.3: cfg.pod - V1=`$(SHTOOL) version -l txt -d short VERSION`; \ - V2=`$(SHTOOL) version -l txt -d long VERSION`; \ - D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \ + V1=`$(SHTOOL) version -l c -d short cfg_vers.c`; \ + V2=`$(SHTOOL) version -l c -d long cfg_vers.c`; \ + D=`$(SHTOOL) version -l c -d long cfg_vers.c | sed -e 's;.*(;;' -e 's;).*;;'`; \ $(POD2MAN) --quotes=none \ --section=3 --center="Configuration Parsing" \ --release="$$D" --date="OSSP cfg $$V1" cfg.pod | \ sed -e "s;CFG_VERSION_STR;$$V2;" >cfg.3 +# running the test suite +test: check check: $(TST_NAME) - @$(LIBTOOL) --mode=execute ./$(TST_NAME) -test1: - ./$(TST_NAME) sample.cfg -test2: - ./$(TST_NAME) sample2.cfg + @./$(TST_NAME) cfg_test.cfg +# perform installation procedure install: $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) @@ -110,10 +117,11 @@ $(SHTOOL) install -c -m 755 cfg-config $(DESTDIR)$(bindir)/ $(SHTOOL) install -c -m 644 cfg.h $(DESTDIR)$(includedir)/ $(SHTOOL) install -c -m 644 cfg.3 $(DESTDIR)$(mandir)/man3/ - @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libcfg.la $(DESTDIR)$(libdir)/ + $(LIBTOOL) --quiet --mode=install $(SHTOOL) install -c -m 644 libcfg.la $(DESTDIR)$(libdir)/ +# perform uninstallation procedure uninstall: - @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libcfg.la + $(LIBTOOL) --quiet --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libcfg.la -$(RM) $(DESTDIR)$(mandir)/man3/cfg.3 -$(RM) $(DESTDIR)$(includedir)/cfg.h -$(RM) $(DESTDIR)$(bindir)/cfg-config @@ -124,17 +132,20 @@ -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) +# perform build clean up procedure clean: -$(RM) $(LIB_NAME) $(LIB_OBJS) -$(RM) $(TST_NAME) $(TST_OBJS) -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE) -$(RM) *.o *.lo +# perform distribution clean up procedure distclean: clean -$(RM) config.log config.status config.cache -$(RM) Makefile config.h cfg-config -$(RM) libtool +# perform developer clean up procedure realclean: distclean -$(RM) cfg.3 -$(RM) configure config.h.in Index: ossp-pkg/cfg/README RCS File: /v/ossp/cvs/ossp-pkg/cfg/README,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/cfg/README,v' 2>/dev/null --- README 2002/07/30 19:28:37 1.2 +++ README 2002/08/02 19:07:12 1.3 @@ -1,12 +1,11 @@ - __ - ___ / _| __ _ - / __| |_ / _` | - | (__| _| (_| | - \___|_| \__, | - |___/ - + _ ___ ____ ____ ____ __ + |_|_ _ / _ \/ ___/ ___|| _ \ ___ / _| __ _ + _|_||_| | | | \___ \___ \| |_) | / __| |_ / _` | + |_||_|_| | |_| |___) |__) | __/ | (__| _| (_| | + |_|_|_| \___/|____/____/|_| \___|_| \__, | + |___/ OSSP cfg - Configuration Parsing - Version 0.9.0 (30-Jul-2002) + Version 0.9.1 (02-Aug-2002) ABSTRACT @@ -51,10 +50,9 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - HOME AND DOCUMENTATION - - The documentation and latest release can be found on + INTERNET LOCATIONS - o http://www.ossp.org/pkg/lib/cfg/ - o ftp://ftp.ossp.org/pkg/lib/cfg/ + Homepage: http://www.ossp.org/pkg/lib/cfg/ + Repository: http://cvs.ossp.org/pkg/lib/cfg/ + Distribution: ftp://ftp.ossp.org/pkg/lib/cfg/ Index: ossp-pkg/cfg/THANKS RCS File: /v/ossp/cvs/ossp-pkg/cfg/THANKS,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/cfg/THANKS,v' | diff -u /dev/null - -L'ossp-pkg/cfg/THANKS' 2>/dev/null --- ossp-pkg/cfg/THANKS +++ - 2024-05-13 20:24:32.567761778 +0200 @@ -0,0 +1,22 @@ + _ ___ ____ ____ ____ __ + |_|_ _ / _ \/ ___/ ___|| _ \ ___ / _| __ _ + _|_||_| | | | \___ \___ \| |_) | / __| |_ / _` | + |_||_|_| | |_| |___) |__) | __/ | (__| _| (_| | + |_|_|_| \___/|____/____/|_| \___|_| \__, | + |___/ + + OSSP cfg - Configuration Parsing + + THANKS + + Credit has to be given to the following sponsors for contributing + hardware, network and manpower resources (in alphabetical order): + + o Cable & Wireless Deutschland GmbH + + + Credit has to be given to the following people who contributed ideas, + bugfixes, hints, gave platform feedback, etc. (in alphabetical order): + + o Thomas Lotterer + Index: ossp-pkg/cfg/VERSION RCS File: /v/ossp/cvs/ossp-pkg/cfg/Attic/VERSION,v co -q -kk -p'1.2' '/v/ossp/cvs/ossp-pkg/cfg/Attic/VERSION,v' | diff -u - /dev/null -L'ossp-pkg/cfg/VERSION' 2>/dev/null --- ossp-pkg/cfg/VERSION +++ /dev/null 2024-05-13 20:22:10.000000000 +0200 @@ -1,6 +0,0 @@ - - VERSION -- Version Information for OSSP cfg (syntax: Text) - [automatically generated and maintained by GNU shtool] - - This is OSSP cfg, Version 0.9.0 (30-Jul-2002) - Index: ossp-pkg/cfg/cfg.h RCS File: /v/ossp/cvs/ossp-pkg/cfg/cfg.h,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/cfg/cfg.h,v' 2>/dev/null --- cfg.h 2002/07/18 15:34:55 1.11 +++ cfg.h 2002/08/02 19:07:12 1.12 @@ -119,6 +119,7 @@ cfg_rc_t cfg_create (cfg_t **cfg); cfg_rc_t cfg_destroy (cfg_t *cfg); cfg_rc_t cfg_error (cfg_t *cfg, cfg_rc_t rc, char **error); +long cfg_version (void); /* configuration import/export */ cfg_rc_t cfg_import (cfg_t *cfg, cfg_node_t *node, cfg_fmt_t fmt, const char *in_ptr, size_t in_len); Index: ossp-pkg/cfg/cfg_main.c RCS File: /v/ossp/cvs/ossp-pkg/cfg/cfg_main.c,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/cfg/cfg_main.c,v' 2>/dev/null --- cfg_main.c 2002/07/17 15:04:08 1.4 +++ cfg_main.c 2002/08/02 19:07:12 1.5 @@ -39,6 +39,14 @@ #include "cfg_data.h" #include "cfg_node.h" #include "cfg_syn.h" +#define _CFG_VERS_C_AS_HEADER_ +#include "cfg_vers.c" +#undef _CFG_VERS_C_AS_HEADER_ + +long cfg_version(void) +{ + return __cfg_version.v_hex; +} cfg_rc_t cfg_create(cfg_t **cfg) { Index: ossp-pkg/cfg/cfg_test.cfg RCS File: /v/ossp/cvs/ossp-pkg/cfg/cfg_test.cfg,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/cfg/cfg_test.cfg,v' | diff -u /dev/null - -L'ossp-pkg/cfg/cfg_test.cfg' 2>/dev/null --- ossp-pkg/cfg/cfg_test.cfg +++ - 2024-05-13 20:24:32.582042661 +0200 @@ -0,0 +1,49 @@ +## +## cfg_test.cfg -- Test Suite Feature Testing Configuration +## + +"==== Shell-style EOL comments ===="; +#bar + #bar +foo1; #bar +foo2;#bar +foo3#bar # fails +"foo4"#bar # works again +; + +"==== C++-style EOL comments ===="; +//bar + //bar +foo1; //bar +foo2;//bar +foo3//bar # fails +"foo4"//bar # works again +; + +"==== C-style block comments ===="; +/*bar*/ + /*bar*/ +foo1; /*bar*/ +foo2;/*bar*/ +foo3/*bar*/ # fails +"foo4"/*bar*/ # works again +; +/* a C/C++ style block comment which + goes over multiple lines and even includes + some special / * ** * / characters and + a nested /* co/**/mment */, too. */ + +"==== Single-Quoted Strings ===="; +'foo'; +'foo bar'; +'foo\\bar\'baz'; +'\''; + +"==== Double-Quoted Strings ===="; +"foo\r\nbar\r\n"; +"foo\x1bbar\x{011b}baz"; + +"==== Flexible-Quoted Strings ===="; +foo q{foo{bar{baz}bar}quux} bar; +foo q{foo{bar{baz}\}bar}quux} bar; + Index: ossp-pkg/cfg/cfg_vers.c RCS File: /v/ossp/cvs/ossp-pkg/cfg/cfg_vers.c,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/cfg/cfg_vers.c,v' | diff -u /dev/null - -L'ossp-pkg/cfg/cfg_vers.c' 2>/dev/null --- ossp-pkg/cfg/cfg_vers.c +++ - 2024-05-13 20:24:32.584639491 +0200 @@ -0,0 +1,46 @@ +/* +** cfg_vers.c -- Version Information for OSSP cfg (syntax: C/C++) +** [automatically generated and maintained by GNU shtool] +*/ + +#ifdef _CFG_VERS_C_AS_HEADER_ + +#ifndef _CFG_VERS_C_ +#define _CFG_VERS_C_ + +#define __CFG_VERSION 0x009201 + +typedef struct { + const int v_hex; + const char *v_short; + const char *v_long; + const char *v_tex; + const char *v_gnu; + const char *v_web; + const char *v_sccs; + const char *v_rcs; +} __cfg_version_t; + +extern __cfg_version_t __cfg_version; + +#endif /* _CFG_VERS_C_ */ + +#else /* _CFG_VERS_C_AS_HEADER_ */ + +#define _CFG_VERS_C_AS_HEADER_ +#include "cfg_vers.c" +#undef _CFG_VERS_C_AS_HEADER_ + +__cfg_version_t __cfg_version = { + 0x009201, + "0.9.1", + "0.9.1 (02-Aug-2002)", + "This is OSSP cfg, Version 0.9.1 (02-Aug-2002)", + "OSSP cfg 0.9.1 (02-Aug-2002)", + "OSSP cfg/0.9.1", + "@(#)OSSP cfg 0.9.1 (02-Aug-2002)", + "$Id$" +}; + +#endif /* _CFG_VERS_C_AS_HEADER_ */ + Index: ossp-pkg/cfg/configure.ac RCS File: /v/ossp/cvs/ossp-pkg/cfg/configure.ac,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/cfg/configure.ac,v' 2>/dev/null --- configure.ac 2002/07/25 07:49:55 1.2 +++ configure.ac 2002/08/02 19:07:12 1.3 @@ -30,7 +30,7 @@ AC_PREREQ(2.53) AC_INIT -CFG_VERSION_STR=`./shtool version -l txt -d long VERSION` +CFG_VERSION_STR=`./shtool version -l c -d long cfg_vers.c` ./shtool echo -e "Configuring %BOSSP cfg%b (Configuration Parsing), version %B${CFG_VERSION_STR}%b" AC_SUBST(CFG_VERSION_STR) Index: ossp-pkg/cfg/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/cfg/devtool.conf,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/cfg/devtool.conf,v' 2>/dev/null --- devtool.conf 2002/07/30 19:45:22 1.3 +++ devtool.conf 2002/08/02 19:07:12 1.4 @@ -20,18 +20,30 @@ --enable-debug \ "$@" +%release + ./devtool version + ./devtool tag + ./devtool dist + ./devtool upload + %version - ./shtool version -l txt -n "OSSP cfg" -e VERSION - V=`./shtool version -l txt -d long VERSION` - sed -e "s/Version .*(.*)/Version $V/g" README.n - mv README.n README + ./shtool version -l c -n "OSSP cfg" -p "__cfg_" -e cfg_vers.c + V=`./shtool version -lc -dlong cfg_vers.c` + sed -e "s/Version .*(.*)/Version $V/g" README.n && mv README.n README + +%tag + V=`./shtool version -lc -dshort cfg_vers.c | sed -e 's;\.;_;g'` + echo "+++ tagging CVS sources as CFG_${V}" + cvs tag CFG_${V} %dist + echo "+++ removing old tarballs" + rm -f cfg-*.tar.gz echo "+++ generating" ./devtool autoclean ./devtool autogen echo "+++ configuring" - ./devtool configure + ./configure echo "+++ building" make clean all man echo "+++ cleaning" @@ -39,14 +51,17 @@ echo "+++ fixing" ./shtool fixperm -v . echo "+++ rolling" - V=`./shtool version -l txt -d short VERSION` + V=`./shtool version -lc -dshort cfg_vers.c` ./shtool tarball -o cfg-${V}.tar.gz -d cfg-${V} -u ossp -g ossp \ - -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz' -c 'gzip --best' . + -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz,^#.*,.*~$' -c 'gzip --best' . ls -l cfg-${V}.tar.gz echo "+++ testing" - gunzip /dev/null --- ossp-pkg/cfg/sample.cfg +++ /dev/null 2024-05-13 20:22:10.000000000 +0200 @@ -1,49 +0,0 @@ -## -## sample.cfg -- Example Feature Testing Configuration -## - -"==== Shell-style EOL comments ===="; -#bar - #bar -foo1; #bar -foo2;#bar -foo3#bar # fails -"foo4"#bar # works again -; - -"==== C++-style EOL comments ===="; -//bar - //bar -foo1; //bar -foo2;//bar -foo3//bar # fails -"foo4"//bar # works again -; - -"==== C-style block comments ===="; -/*bar*/ - /*bar*/ -foo1; /*bar*/ -foo2;/*bar*/ -foo3/*bar*/ # fails -"foo4"/*bar*/ # works again -; -/* a C/C++ style block comment which - goes over multiple lines and even includes - some special / * ** * / characters and - a nested /* co/**/mment */, too. */ - -"==== Single-Quoted Strings ===="; -'foo'; -'foo bar'; -'foo\\bar\'baz'; -'\''; - -"==== Double-Quoted Strings ===="; -"foo\r\nbar\r\n"; -"foo\x1bbar\x{011b}baz"; - -"==== Flexible-Quoted Strings ===="; -foo q{foo{bar{baz}bar}quux} bar; -foo q{foo{bar{baz}\}bar}quux} bar; - Index: ossp-pkg/cfg/sample2.cfg RCS File: /v/ossp/cvs/ossp-pkg/cfg/Attic/sample2.cfg,v co -q -kk -p'1.4' '/v/ossp/cvs/ossp-pkg/cfg/Attic/sample2.cfg,v' | diff -u - /dev/null -L'ossp-pkg/cfg/sample2.cfg' 2>/dev/null --- ossp-pkg/cfg/sample2.cfg +++ /dev/null 2024-05-13 20:22:10.000000000 +0200 @@ -1,14 +0,0 @@ - -foo "<\x40\x41\x42>" "<\x{1404142}>" abd; -bar1 q{ f{o}o } 'foo;' "bar2 bar2b" "foo\nbar" q(foo -bar -quux) "foo\n\r bar"; -quux1 { - quux1a; - quux1b; -} quux2 { - q(quu\ - x2a); - quux2b; -}; -