--- rc_proc.c 2003/06/26 18:45:14 1.48
+++ rc_proc.c 2003/06/27 10:15:19 1.49
@@ -53,7 +53,7 @@
pNewrc->m_pList = listNew(); /* Construct a rcfile list */
listPopulate(pNewrc->m_pList, configGetrcfile()); /* Prepopulate list */
pNewrc->m_pScriptfunc = scriptNew(); /* Construct a functions script */
- pNewrc->m_pScriptcom = scriptNew(); /* Construct a common script */
+ pNewrc->m_pScriptcnf = scriptNew(); /* Construct a config script */
}
ex_catch(Except)
rethrow;
@@ -110,8 +110,8 @@
try { /* If it exists, append config section unconditionally */
pSec = rcfileGetsec(pRcfile, configGetval(RC_NCF_VAL));
if (pSec) { /* Only operate if the section lookup succeeds */
- scriptAppend(pRc->m_pScriptcom, sectionGetdata(pSec), strlen(sectionGetdata(pSec)));
- scriptAppend(pRc->m_pScriptcom, "\n", strlen ("\n"));
+ scriptAppend(pRc->m_pScriptcnf, sectionGetdata(pSec), strlen(sectionGetdata(pSec)));
+ scriptAppend(pRc->m_pScriptcnf, "\n", strlen ("\n"));
}
for (nSect = 0; nSect < nTotalsecs; nSect++) { /* Iterate over */
@@ -164,7 +164,7 @@
char *szTmpfile = NULL; /* Path of temporary file */
char *szTmp = NULL; /* Generic temporary string */
char *szFunc = NULL; /* Stores func script text */
- char *szCom = NULL; /* Stores common script text */
+ char *szCnf = NULL; /* Stores config script text */
char *szExec = NULL; /* Used only during exec mode */
char *szVerbose = NULL; /* Used when handling verbose mode */
char *pszVec[RC_EXEC_MAXARGS]; /* For passing in to execv(3) */
@@ -203,7 +203,7 @@
szVerbose = NULL;
}
scriptAdd(pFatscript, pRc->m_pScriptfunc);
- /* Conditionally print common section notice in verbal mode */
+ /* Conditionally print config section notice in verbal mode */
if (configGetval(RC_VRB_VAL)) {
nBytes = (strlen(RC_EVN_TEXT) + strlen(RC_CFG_TEXT) * 2 + 2) * sizeof (char);
szVerbose = malloc(nBytes);
@@ -213,7 +213,7 @@
free(szVerbose);
szVerbose = NULL;
}
- scriptAdd(pFatscript, pRc->m_pScriptcom);
+ scriptAdd(pFatscript, pRc->m_pScriptcnf);
for (nSecs = 0; nSecs < nTotalsecs; nSecs++) {
for (nRcs = 0; nRcs < pRc->m_pList->m_nFiles; nRcs++) {
for (nTmp = 0; nTmp < pRc->m_pList->m_ppFilevec[nRcs]->m_nSecs && \
@@ -297,7 +297,7 @@
/* Allocate a block of section pointers to use temporarily */
ppSectmp = calloc(pRc->m_pList->m_nFiles, sizeof(rc_section_t *));
szFunc = (char *)scriptGetdata(pRc->m_pScriptfunc);
- szCom = (char *)scriptGetdata(pRc->m_pScriptcom);
+ szCnf = (char *)scriptGetdata(pRc->m_pScriptcnf);
for (nSecs = 0; nSecs < nTotalsecs; nSecs++) {
for (nRcs = 0; nRcs < pRc->m_pList->m_nFiles; nRcs++) {
for (nTmp = 0; nTmp < pRc->m_pList->m_ppFilevec[nRcs]->m_nSecs && \
@@ -314,7 +314,7 @@
pszVec[3] = NULL; /* Add a NULL to mark the end of the chain */
nTmp = 0; /* Count from zero until however many sections we have */
while (nTmp < pRc->m_pList->m_nFiles && ppSectmp[nTmp]) {
- /* Conditionally print common and other section notices in verbal mode */
+ /* Conditionally print config and other section notices in verbal mode */
if (configGetval(RC_VRB_VAL)) { /* Verbose mode is active */
size_t nSizverb = 0;
size_t nPrescr = 0;
@@ -329,7 +329,7 @@
/* Allocate space for entire string to execvp(3) */
nPrescr = (strlen(RC_VST_TEXT) + strlen(RC_EXF_TEXT) + \
- strlen(szVerbose) + strlen(szFunc) + strlen(szCom) + \
+ strlen(szVerbose) + strlen(szFunc) + strlen(szCnf) + \
strlen(RC_BANG_STR) + 1) * sizeof (char);
szExec = malloc(nSizverb + nPrescr);
@@ -343,9 +343,9 @@
strcat(szExec, szFunc); /* Continue with the funcs script code */
strcat(szExec, RC_ECHO_STR); /* Continue with the echo string */
strcat(szExec, "\""); /* Append a quote next to the echo */
- strcat(szExec, szVerbose); /* Continue with the common text */
+ strcat(szExec, szVerbose); /* Continue with the config text */
strcat(szExec, "\";"); /* Finalize the verbosity notice */
- strcat(szExec, szCom); /* Then with the common script code */
+ strcat(szExec, szCnf); /* Then with the config script code */
szTmp = (char *)sectionGetname(ppSectmp[nTmp]);
nSecverb = (strlen(RC_EXN_TEXT) + strlen(szTmp) * 2 \
+ strlen(RC_ECHO_STR) + strlen("\"\"") + 1) * sizeof (char);
@@ -387,11 +387,11 @@
}
else { /* Verbose mode is off */
szTmp = (char *)sectionGetdata(ppSectmp[nTmp]);
- szExec = malloc((strlen(szFunc) + strlen(szCom) + \
+ szExec = malloc((strlen(szFunc) + strlen(szCnf) + \
strlen(szTmp) + 1) * sizeof(char));
strcpy(szExec, RC_BANG_STR); /* Start out with the shebang string */
strcat(szExec, szFunc); /* Continue with just the funcs script code */
- strcat(szExec, szCom); /* Continue with just the common script code */
+ strcat(szExec, szCnf); /* Continue with just the config script code */
strcat(szExec, szTmp); /* And build a section onto the command chain */
pszVec[2] = szExec; /* Actually launch the new process image now */
@@ -436,7 +436,7 @@
if (configGetval(RC_VRB_VAL))
fprintf(stderr, "%s\n", RC_EVF_TEXT);
scriptDump(pRc->m_pScriptfunc); /* Dump the funcs script */
- /* Conditionally print common section notice in verbal mode */
+ /* Conditionally print config section notice in verbal mode */
if (configGetval(RC_VRB_VAL)) {
nBytes = (strlen(RC_EVN_TEXT) + strlen(RC_CFG_TEXT) * 2 + 2) * sizeof (char);
szVerbose = malloc(nBytes);
@@ -446,7 +446,7 @@
free(szVerbose);
szVerbose = NULL;
}
- scriptDump(pRc->m_pScriptcom); /* Dump the common script */
+ scriptDump(pRc->m_pScriptcnf); /* Dump the config script */
for (nSecs = 0; nSecs < nTotalsecs; nSecs++) {
for (nRcs = 0; nRcs < pRc->m_pList->m_nFiles; nRcs++) {
@@ -511,10 +511,10 @@
{
int nRcs = pRc->m_pList->m_nFiles;
- scriptDelete(pRc->m_pScriptcom); /* Destroy the common script */
- pRc->m_pScriptcom = NULL;
+ scriptDelete(pRc->m_pScriptcnf); /* Destroy the config script */
+ pRc->m_pScriptcnf = NULL;
scriptDelete(pRc->m_pScriptfunc); /* Destroy the funcs script */
- pRc->m_pScriptcom = NULL;
+ pRc->m_pScriptfunc = NULL;
/* Destroy the rcfile objects */
while (nRcs-- > 0)
|