--- rc_anal.c 2002/05/29 12:42:08 1.3
+++ rc_anal.c 2002/06/05 16:24:20 1.4
@@ -53,11 +53,11 @@
rc_return_t analRcs(rc_anal_t **ppInst, const char *kszName)
{
if (!kszName)
- RC_THROW(RC_WRN_NUL);
+ TRACE("Error codition, NULL passed as argument");
+/* FIXME Das ist very broken! */
+/* RC_THROW(RC_WRN_NUL);*/
else { /* Only enter block with valid string, strdup can't handle NULL */
-(*ppInst)->m_szRcs = strdup("Hello");
-/* (*ppInst)->m_szRcs = strdup(kszName);*/
- TRACE((*ppInst)->m_szRcs);
+ (*ppInst)->m_szRcs = strdup(kszName);
}
return(RC_THROW(RC_OK));
@@ -69,21 +69,15 @@
************************************************/
rc_return_t analTmp(rc_anal_t **ppInst, const char *kszName)
{
-TRACE("In analTmp 1");
if (!kszName) {
-TRACE("In analTmp 2");
- RC_THROW(RC_WRN_NUL);
-TRACE("In analTmp 2.5");
+ TRACE("Error codition, NULL passed as argument");
+/* FIXME Das ist very broken! */
+/* RC_THROW(RC_WRN_NUL);*/
}
else { /* Only enter block with valid string, strdup can't handle NULL */
-TRACE("In analTmp 3");
- (*ppInst)->m_szTmp = strdup("Hello");
-TRACE("In analTmp 4");
- TRACE((*ppInst)->m_szTmp);
-TRACE("In analTmp 5");
+ (*ppInst)->m_szTmp = strdup(kszName);
}
-TRACE("In analTmp 6");
return(RC_THROW(RC_OK));
}
@@ -94,11 +88,11 @@
rc_return_t analFuncs(rc_anal_t **ppInst, const char *kszName)
{
if (!kszName)
- RC_THROW(RC_WRN_NUL);
+ TRACE("Error codition, NULL passed as argument");
+/* FIXME Das ist very broken! */
+/* RC_THROW(RC_WRN_NUL);*/
else { /* Only enter block with valid string, strdup can't handle NULL */
-(*ppInst)->m_szFuncs = strdup("Hello");
-/* (*ppInst)->m_szFuncs = strdup(kszName);*/
- TRACE((*ppInst)->m_szFuncs);
+ (*ppInst)->m_szFuncs = strdup(kszName);
}
return(RC_THROW(RC_OK));
@@ -110,16 +104,14 @@
************************************************/
rc_return_t analLocs(rc_anal_t **ppInst, const char *kszPathexpr)
{
-TRACE("analLocs1");
- if (kszPathexpr) { /* Strdup can't handle NULL */
-TRACE("analLocs2");
-(*ppInst)->m_szLocs = strdup("Hello");
-/* (*ppInst)->m_szLocs = strdup(kszPathexpr);*/
- TRACE((*ppInst)->m_szLocs);
-TRACE("analLocs3");
+ if (!kszPathexpr)
+ TRACE("Error codition, NULL passed as argument");
+/* FIXME Das ist very broken! */
+/* RC_THROW(RC_WRN_NUL);*/
+ else { /* Only enter block with valid string, strdup can't handle NULL */
+ (*ppInst)->m_szLocs = strdup(kszPathexpr);
}
-TRACE("analLocs4");
return(RC_THROW(RC_OK));
}
@@ -131,11 +123,10 @@
{
ex_t Except;
-#if 0
-# FIXME Das ist very broken!
- if ((*ppInst)->m_pszSecs) /* Warn on overwrites */
- RC_THROW(RC_WRN_OWR);
-#endif
+ if (!pkszVector)
+ TRACE("Error codition, NULL passed as argument");
+/* FIXME Das ist very broken! */
+/* RC_THROW(RC_WRN_NUL);*/
ex_try { /* Sections are a vector, so we must copy accordingly */
(*ppInst)->m_pszSecs = vectorCopy(pkszVector);
@@ -144,7 +135,6 @@
rethrow;
}
- TRACE("Variable pkszVector is not an ANSI string.");
return(RC_THROW(RC_OK));
}
@@ -159,19 +149,13 @@
assert(pInst); /* Verify sanity */
ex_try { /* Read in data from the main configuration */
analRcs (&pInst, configGetrcfile());
-TRACE("Alles wunderbar.0");
analTmp (&pInst, configGetval(RC_TMP_VAL));
-TRACE("Alles wunderbar.1");
analFuncs(&pInst, configGetval(RC_FNC_VAL));
-TRACE("Alles wunderbar.nachFuncs");
analLocs (&pInst, configGetval(RC_LOC_VAL));
-TRACE("Alles wunderbar.nachLocs");
analSecs (&pInst, configGetsecs());
-TRACE("Alles wunderbar.2");
}
ex_catch(Except) {
-TRACE("En analParse Exception catch state!");
-/* rethrow;*/
+ rethrow;
}
return(RC_THROW(RC_OK));
@@ -183,8 +167,6 @@
************************************************/
rc_return_t analDelete(rc_anal_t *pInst)
{
-TRACE("Alles wunderbar.3delete");
-#if 0
if (pInst->m_szRcs) /* Rc file names */
free(pInst->m_szRcs);
if (pInst->m_szTmp) /* Temp file name */
@@ -197,8 +179,6 @@
vectorDel(pInst->m_pszSecs);
free(pInst);
-#endif
-TRACE("Alles wunderbar.4delete");
return(RC_THROW(RC_OK));
}
|