--- rc_config.c 2002/02/28 18:24:04 1.4
+++ rc_config.c 2002/03/01 22:48:23 1.5
@@ -54,7 +54,7 @@
s_pInst->nLocks = 0;
ex_try { /* Make a val instance */
- val_create(&s_pInst->pVal); /* to hold individual */
+ val_create(&s_pInst->pOpt); /* to hold individual */
} /* configuration values */
ex_catch(Except) {
rethrow;
@@ -76,7 +76,7 @@
if (s_pInst != NULL) {
ex_try {
- val_get(s_pInst->pVal, RC_VER_NAME, &nVer);
+ val_get(s_pInst->pOpt, RC_VER_NAME, &nVer);
}
ex_catch(Except) {
rethrow;
@@ -98,10 +98,22 @@
{
ex_t Except;
+ ex_try { /* Parse through each type of option */
+/* FIXME s_pInst->pOpt will hold a copy of the command line */
+// coptParse(s_pInst->pOpt); /* First priority options */
+// eoptParse(s_pInst->pOpt); /* Medium priority options */
+// foptParse(s_pInst->pOpt); /* Low priority options */
+ coptParse(argc, argv); /* FIXME Patch for now */
+/* FIXME s_pInst->pOpt will hold a copy of the command line */
+ }
+ ex_catch(Except) {
+ rethrow;
+ }
+
ex_try { /* Register and set configuration values */
/* FIXME This is real bad, replace with our own */
- val_reg(s_pInst->pVal, RC_VER_NAME, VAL_TYPE_SHORT, RC_VER_DESC, NULL);
- val_set(s_pInst->pVal, RC_VER_NAME, 1);
+ 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_catch(Except) {
rethrow;
@@ -121,8 +133,8 @@
if (s_pInst) {
if (!(--s_pInst->nLocks)) { /* If nLocks is 0, dealloc */
ex_try { /* FIXME, not thread-safe */
- val_destroy(s_pInst->pVal); /* Destroy val instance and */
- } /* Assume that pVal is NULL */
+ val_destroy(s_pInst->pOpt); /* Destroy val instance and */
+ } /* Assume that pOpt is NULL */
ex_catch(Except) {
rethrow;
}
|