ossp-pkg/rc/rc_anal.c 1.13 -> 1.14
--- rc_anal.c 2003/05/15 12:49:11 1.13
+++ rc_anal.c 2003/05/20 15:06:41 1.14
@@ -65,8 +65,7 @@
(*ppInst)->m_szRcs = malloc(sizeof(char **));
if (strcmp(kszName, RC_GLOB_WILD)) {
(*ppInst)->m_szRcs = malloc(sizeof(*((*ppInst)->m_szRcs)));
- *(*ppInst)->m_szRcs = strdup("rc."); /* FIXME: Remove hardcoded */
- strcat(*(*ppInst)->m_szRcs, kszName);
+ *(*ppInst)->m_szRcs = strdup(kszName);
(*ppInst)->m_nRcs = 1; /* We handle just one rc file */
}
else { /* Wildcard rcfile indicates we must glob the locs directories */
@@ -203,8 +202,10 @@
(*ppInst)->m_szRcs = malloc(sizeof((*((*ppInst)->m_szRcs))) * (nCount + 1));
/* Loop through file index setting rc file names according to dirent */
- for (nIter = 0; nIter < nCount; ++nIter)
- (*ppInst)->m_szRcs[nIter] = strdup((*pppFiles)[nIter]->d_name);
+ for (nIter = 0; nIter < nCount; ++nIter) {
+ (*ppInst)->m_szRcs[nIter] = strdup((*pppFiles)[nIter]->d_name +\
+ strlen("rc.") * sizeof(char));
+ }
(*ppInst)->m_szRcs[nIter] = NULL; /* Terminate */
(*ppInst)->m_nRcs = nCount; /* Store how many globbed files there are */
|
|