Index: ossp-pkg/rc/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/rc/Makefile.in,v rcsdiff -q -kk '-r1.17' '-r1.18' -u '/v/ossp/cvs/ossp-pkg/rc/Makefile.in,v' 2>/dev/null --- Makefile.in 2002/03/26 17:11:06 1.17 +++ Makefile.in 2002/04/08 15:37:09 1.18 @@ -65,7 +65,8 @@ OBJS = rc.o rc_config.o rc_optimpl.o rc_option.o\ rc_version.o rc_pcre.o rc_util.o -SUBDIRS = @SUBDIR_EX@ @SUBDIR_VAR@ @SUBDIR_VAL@ @SUBDIR_STR@ @SUBDIR_POPT@ +SUBDIRS = @SUBDIR_EX@ @SUBDIR_POPT@ +#SUBDIRS = @SUBDIR_EX@ @SUBDIR_VAR@ @SUBDIR_VAL@ @SUBDIR_STR@ @SUBDIR_POPT@ .SUFFIXES: .SUFFIXES: .c .cc .cpp .o Index: ossp-pkg/rc/configure.in RCS File: /v/ossp/cvs/ossp-pkg/rc/configure.in,v rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/rc/configure.in,v' 2>/dev/null --- configure.in 2002/03/26 17:11:06 1.15 +++ configure.in 2002/04/08 15:37:10 1.16 @@ -90,38 +90,38 @@ LIBS_EXTRA="$LIBS_EXTRA -lex"]) AC_SUBST(SUBDIR_EX) -dnl Check for OSSP str library -AC_CHECK_EXTLIB([OSSP str], - str, str_parse, str.h, - [SUBDIR_STR=""], - [SUBDIR_STR="rc_str" - CPPFLAGS="$CPPFLAGS -Irc_str" - CFLAGS="$CFLAGS -Irc_str" - LDFLAGS="$LDFLAGS -Lrc_str/.libs" - LIBS_EXTRA="$LIBS_EXTRA -lstr"]) -AC_SUBST(SUBDIR_STR) - -dnl Check for OSSP var library -AC_CHECK_EXTLIB([OSSP var], - var, var_expand, var.h, - [SUBDIR_VAR=""], - [SUBDIR_VAR="rc_var" - CPPFLAGS="$CPPFLAGS -Irc_var" - CFLAGS="$CFLAGS -Irc_var" - LDFLAGS="$LDFLAGS -Lrc_var/.libs" - LIBS_EXTRA="$LIBS_EXTRA -lvar"]) -AC_SUBST(SUBDIR_VAR) - -dnl Check for OSSP val library -AC_CHECK_EXTLIB([OSSP val], - val, val_expand, val.h, - [SUBDIR_VAL=""], - [SUBDIR_VAL="rc_val" - CPPFLAGS="$CPPFLAGS -Irc_val" - CFLAGS="$CFLAGS -Irc_val" - LDFLAGS="$LDFLAGS -Lrc_val/.libs" - LIBS_EXTRA="$LIBS_EXTRA -lval"]) -AC_SUBST(SUBDIR_VAL) +#dnl Check for OSSP str library +#AC_CHECK_EXTLIB([OSSP str], +# str, str_parse, str.h, +# [SUBDIR_STR=""], +# [SUBDIR_STR="rc_str" +# CPPFLAGS="$CPPFLAGS -Irc_str" +# CFLAGS="$CFLAGS -Irc_str" +# LDFLAGS="$LDFLAGS -Lrc_str/.libs" +# LIBS_EXTRA="$LIBS_EXTRA -lstr"]) +#AC_SUBST(SUBDIR_STR) + +#dnl Check for OSSP var library +#AC_CHECK_EXTLIB([OSSP var], +# var, var_expand, var.h, +# [SUBDIR_VAR=""], +# [SUBDIR_VAR="rc_var" +# CPPFLAGS="$CPPFLAGS -Irc_var" +# CFLAGS="$CFLAGS -Irc_var" +# LDFLAGS="$LDFLAGS -Lrc_var/.libs" +# LIBS_EXTRA="$LIBS_EXTRA -lvar"]) +#AC_SUBST(SUBDIR_VAR) + +#dnl Check for OSSP val library +#AC_CHECK_EXTLIB([OSSP val], +# val, val_expand, val.h, +# [SUBDIR_VAL=""], +# [SUBDIR_VAL="rc_val" +# CPPFLAGS="$CPPFLAGS -Irc_val" +# CFLAGS="$CFLAGS -Irc_val" +# LDFLAGS="$LDFLAGS -Lrc_val/.libs" +# LIBS_EXTRA="$LIBS_EXTRA -lval"]) +#AC_SUBST(SUBDIR_VAL) dnl Extra library handling LIBS="$LIBS $LIBS_EXTRA" @@ -131,7 +131,8 @@ enable_headline=no export enable_headline dnl Call other configure scripts -AC_CONFIG_SUBDIRS([$SUBDIR_EX $SUBDIR_STR $SUBDIR_VAR $SUBDIR_VAL $SUBDIR_POPT]) +AC_CONFIG_SUBDIRS([$SUBDIR_EX $SUBDIR_POPT]) +#AC_CONFIG_SUBDIRS([$SUBDIR_EX $SUBDIR_STR $SUBDIR_VAR $SUBDIR_VAL $SUBDIR_POPT]) dnl Make all the necessary Makefiles #AC_CONFIG_FILES(Makefile) Index: ossp-pkg/rc/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/rc/devtool.conf,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/rc/devtool.conf,v' 2>/dev/null --- devtool.conf 2002/03/26 17:11:06 1.10 +++ devtool.conf 2002/04/08 15:37:10 1.11 @@ -9,18 +9,18 @@ echo "===> rc_ex (devtool autogen)" (cd rc_ex && ./devtool autogen) echo "<=== rc_ex" - echo "===> rc_str (devtool autogen)" - (cd rc_str && ./devtool autogen) - echo "<=== rc_str" echo "===> rc_popt (devtool autogen)" (cd rc_popt && ./devtool autogen) echo "<=== rc_popt" - echo "===> rc_var (devtool autogen)" - (cd rc_var && ./devtool autogen) - echo "<=== rc_var" - echo "===> rc_val (devtool autogen)" - (cd rc_val && ./devtool autogen) - echo "<=== rc_val" +# echo "===> rc_str (devtool autogen)" +# (cd rc_str && ./devtool autogen) +# echo "<=== rc_str" +# echo "===> rc_var (devtool autogen)" +# (cd rc_var && ./devtool autogen) +# echo "<=== rc_var" +# echo "===> rc_val (devtool autogen)" +# (cd rc_val && ./devtool autogen) +# echo "<=== rc_val" %autoclean @autoclean shtool @@ -29,22 +29,23 @@ echo "===> rc_ex (devtool autoclean)" (cd rc_ex && ./devtool autoclean) echo "<=== rc_ex" - echo "===> rc_str (devtool autoclean)" - (cd rc_str && ./devtool autoclean) - echo "<=== rc_str" - echo "===> rc_var (devtool autoclean)" - (cd rc_var && ./devtool autoclean) - echo "<=== rc_var" - echo "===> rc_val (devtool autoclean)" - (cd rc_val && ./devtool autoclean) - echo "<=== rc_val" + echo "===> rc_popt (devtool autoclean)" + (cd rc_popt && ./devtool autoclean) + echo "<=== rc_popt" +# echo "===> rc_str (devtool autoclean)" +# (cd rc_str && ./devtool autoclean) +# echo "<=== rc_str" +# echo "===> rc_var (devtool autoclean)" +# (cd rc_var && ./devtool autoclean) +# echo "<=== rc_var" +# echo "===> rc_val (devtool autoclean)" +# (cd rc_val && ./devtool autoclean) +# echo "<=== rc_val" %configure ./configure \ - --cache-file=config.cache \ - --enable-maintainer \ - --disable-shared \ --prefix=/tmp/rc \ + --disable-shared \ --enable-debug "$@" Index: ossp-pkg/rc/devtool.func RCS File: /v/ossp/cvs/ossp-pkg/rc/devtool.func,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/rc/devtool.func,v' 2>/dev/null --- devtool.func 2002/03/26 17:11:06 1.6 +++ devtool.func 2002/04/08 15:37:10 1.7 @@ -32,8 +32,8 @@ autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"` echo "generating (GNU Autoconf $autoconf_version): configure ac_config.h.in" autoconf - rm -rf autom4te.cache >/dev/null 2>&1 autoheader 2>&1 | grep -v "is unchanged" + rm -rf autom4te.cache >/dev/null 2>&1 ;; libtool ) libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"` Index: ossp-pkg/rc/rc_config.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_config.c,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/rc/rc_config.c,v' 2>/dev/null --- rc_config.c 2002/03/26 17:11:06 1.6 +++ rc_config.c 2002/04/08 15:37:10 1.7 @@ -34,7 +34,6 @@ #include "rc_private.h" #include "rc_const.h" /* String constants */ #include "rc_option.h" /* Option operations rely on popt */ -#include "val.h" /* OSSP val library holds config */ static rc_config_t *s_pInst = NULL; /* Singleton configuration instance */ @@ -47,15 +46,15 @@ { ex_t Except; - if (s_pInst == NULL) { /* If we don't have one */ - s_pInst = malloc(sizeof(s_pInst)); /* yet, then allocate */ - if (!s_pInst) /* a configuration */ - return(RC_THROW(RC_ERR_MEM)); /* instance */ + if (s_pInst == NULL) { /* If we don't have one */ + s_pInst = malloc(sizeof(s_pInst)); /* yet, then allocate */ + if (!s_pInst) /* a configuration */ + return(RC_THROW(RC_ERR_MEM)); /* instance */ s_pInst->nLocks = 0; - ex_try { /* Make a val instance */ - val_create(&s_pInst->pOpt); /* to hold individual */ - } /* configuration values */ + ex_try { + /* Make a config instance */ + } ex_catch(Except) { rethrow; } @@ -76,7 +75,7 @@ if (s_pInst != NULL) { ex_try { - val_get(s_pInst->pOpt, RC_VER_NAME, &nVer); + } ex_catch(Except) { rethrow; @@ -110,10 +109,7 @@ rethrow; } - ex_try { /* Register and set configuration values */ - /* FIXME This is real bad, replace with our own */ - val_reg(s_pInst->pOpt, RC_VER_NAME, VAL_TYPE_SHORT, RC_VER_DESC, NULL); - val_set(s_pInst->pOpt, RC_VER_NAME, 1); + ex_try { } ex_catch(Except) { rethrow; @@ -133,8 +129,8 @@ if (s_pInst) { if (!(--s_pInst->nLocks)) { /* If nLocks is 0, dealloc */ ex_try { /* FIXME, not thread-safe */ - val_destroy(s_pInst->pOpt); /* Destroy val instance and */ - } /* Assume that pOpt is NULL */ + + } ex_catch(Except) { rethrow; } Index: ossp-pkg/rc/rc_optimpl.c RCS File: /v/ossp/cvs/ossp-pkg/rc/Attic/rc_optimpl.c,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/rc/Attic/rc_optimpl.c,v' 2>/dev/null --- rc_optimpl.c 2002/03/26 17:11:06 1.4 +++ rc_optimpl.c 2002/04/08 15:37:10 1.5 @@ -57,7 +57,6 @@ rc_return_t coptParse(int argc, char *argv[]) { ex_t Except; - int bCaught = 0; char cOpt = 0; /* For argument parsing */ char *szCLIBuf = NULL; popt_context optCon; /* Context for parsing options */ @@ -105,7 +104,7 @@ optCon = popt_getcontext(NULL, argc, (const char **)argv, optionsTable, 0); popt_setotheroptionhelp(optCon, "[options] "); - if (argc < 2) { + if (argc < 3) { popt_printusage(optCon, stderr, 0); return(RC_THROW(RC_ERR_USE)); } @@ -119,13 +118,11 @@ if ((rc_return_t)Except.ex_value != RC_ERR_USE) fprintf(stderr, "Nonusage exception: %d\n",\ (rc_return_t)Except.ex_value); - bCaught = 1; + fprintf(stderr, "Class '%s' threw exception %d in %s:%s():%d.\n",\ (char *)Except.ex_class, *(int *)Except.ex_value,\ Except.ex_file, Except.ex_func, Except.ex_line); } - if (!bCaught) - fprintf(stderr, "parseOpts: No exceptions caught.\n"); szCLIBuf = (char *)popt_getarg(optCon); if ((szCLIBuf == NULL)) { @@ -142,7 +139,7 @@ return(RC_THROW(RC_ERR_INT)); } - fprintf(stderr, "\nRun these commands: %s\n", szCLIBuf); + fprintf(stderr, "Run these commands: %s\n", szCLIBuf); popt_freecontext(optCon); return(RC_THROW(RC_OK)); } Index: ossp-pkg/rc/rc_private.h RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_private.h,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/rc/rc_private.h,v' 2>/dev/null --- rc_private.h 2002/03/26 17:11:06 1.7 +++ rc_private.h 2002/04/08 15:37:10 1.8 @@ -60,12 +60,10 @@ ((rv) != RC_OK && (ex_catching && !ex_shielding) \ ? (ex_throw(RC_STR_ID, NULL, (rv)), (rv)) : (rv)) -#include "val.h" - typedef struct { /* Main rc configuration storage */ - val_t *pOpt; /* Storage of configuration values */ - int nLocks; /* Server locks, not thread-safe though */ + void *pvFixme; /* Storage of configuration values */ + int nLocks; /* Server locks, not thread-safe FIXME */ } rc_config_t; #endif /* __OSSPRC_PRIVATE_H__ */