OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc_opt.c versions 1.1 and 1.2
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc_opt.c 1.1 -> 1.2

--- rc_opt.c     2002/04/09 17:01:29     1.1
+++ rc_opt.c     2002/04/09 17:06:17     1.2
@@ -35,79 +35,12 @@
 
 
 /***************************************
-* optConstruct(void)                   *
-* Construct an option                  *
+* optGetXXXX(void)                     *
+* Option accessors                     *
 ***************************************/
-rc_return_t clioptConstruct(void)
+short optGetvers(void)
 {
-    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 cliopt instance        */
-            return(RC_THROW(RC_ERR_MEM));
-        s_pInst->nLocks = 0;
-
-        ex_try {
-                                            /* Make a cliopt instance   */
-        }
-        ex_catch(Except) {
-            rethrow;
-        }
-    }
-    s_pInst->nLocks++;                      /* FIXME not threadsafe     */
-
-    return(RC_THROW(RC_OK));
-}
-
-/***************************************
-* clioptGetXXXX(void)                  *
-* Command line option accessors        *
-***************************************/
-short clioptGetvers(void)
-{
-    ex_t Except;
     short nVer = 0;
 
-    if (s_pInst != NULL) {
-        ex_try {
-
-        }
-        ex_catch(Except) {
-            rethrow;
-        }
-    }
-    else {
-        RC_THROW(RC_ERR_USE);
-        return(NULL);
-    }
-
     return(nVer);
 }
-
-/***************************************
-* clioptDestruct(void)                 *
-* Destruct a command line option       *
-***************************************/
-rc_return_t clioptDestruct(void)
-{
-    ex_t Except;
-
-    if (s_pInst) {
-        if (!(--s_pInst->nLocks)) {         /* If nLocks is 0, dealloc  */
-            ex_try {                        /* FIXME, not thread-safe   */
-
-            }
-            ex_catch(Except) {
-                rethrow;
-            }
-
-            free(s_pInst);                  /* Deallocate cliopt and    */
-            s_pInst = NULL;                 /* clear its reference      */
-        }
-    }
-    else
-        return(RC_THROW(RC_ERR_USE));
-
-    return(RC_THROW(RC_OK));
-}

CVSTrac 2.0.1