OSSP CVS Repository

ossp - Check-in [2060]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2060
Date: 2002-Apr-08 17:37:09 (local)
2002-Apr-08 15:37:09 (UTC)
User:ms
Branch:
Comment: Bring build back to life and remove val code.
Tickets:
Inspections:
Files:
ossp-pkg/rc/Makefile.in      1.17 -> 1.18     2 inserted, 1 deleted
ossp-pkg/rc/configure.in      1.15 -> 1.16     32 inserted, 31 deleted
ossp-pkg/rc/devtool.conf      1.10 -> 1.11     22 inserted, 21 deleted
ossp-pkg/rc/devtool.func      1.6 -> 1.7     1 inserted, 1 deleted
ossp-pkg/rc/rc_config.c      1.6 -> 1.7     11 inserted, 15 deleted
ossp-pkg/rc/rc_optimpl.c      1.4 -> 1.5     3 inserted, 6 deleted
ossp-pkg/rc/rc_private.h      1.7 -> 1.8     2 inserted, 4 deleted

ossp-pkg/rc/Makefile.in 1.17 -> 1.18

--- 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


ossp-pkg/rc/configure.in 1.15 -> 1.16

--- 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)


ossp-pkg/rc/devtool.conf 1.10 -> 1.11

--- 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
         "$@"
 


ossp-pkg/rc/devtool.func 1.6 -> 1.7

--- 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"`


ossp-pkg/rc/rc_config.c 1.6 -> 1.7

--- 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;
             }


ossp-pkg/rc/rc_optimpl.c 1.4 -> 1.5

--- 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] <rcfile> <sections [args]>");
 
-    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));
 }


ossp-pkg/rc/rc_private.h 1.7 -> 1.8

--- 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__ */

CVSTrac 2.0.1