Index: ossp-pkg/rc/rc.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc.c,v rcsdiff -q -kk '-r1.37' '-r1.38' -u '/v/ossp/cvs/ossp-pkg/rc/rc.c,v' 2>/dev/null --- rc.c 2002/07/01 15:03:32 1.37 +++ rc.c 2002/07/05 14:10:24 1.38 @@ -68,23 +68,23 @@ { ex_t Except; - try { /* Configuration block */ - configNew(); /* Construct a new configuration */ - configLoad(argc, (const char **)argv); /* Load cli, env, and conf */ - configVerify(); /* Test for usage, help and version options */ + try { /* Configuration block */ + configNew(); /* Construct a new config, add default values */ + configLoad(argc, (const char **)argv); /* Load cli, env, and conf */ + configVerify(); /* Test for usage, help and version options */ } - catch(Except) /* Exceptions of the configuration block */ + catch(Except) /* Exceptions of the configuration block */ rcError(Except); - try { /* Main processing block, script built here */ + try { /* Main processing block, script built here */ rc_proc_t *pProc = NULL; - pProc = procNew(); /* Construct a new processor, build script */ - procPopulate(pProc); /* Populate with run commands */ - procRun(pProc); /* [Execute|Evaluate|Print] script */ - procDelete(pProc); /* Destroy the processor */ - configDelete(); /* Destroy the configuration */ + pProc = procNew(); /* Construct a new processor, build script */ + procPopulate(pProc); /* Populate with run commands */ + procRun(pProc); /* [Execute|Evaluate|Print] script */ + procDelete(pProc); /* Destroy the processor */ + configDelete(); /* Destroy the configuration */ } - catch(Except) /* Exception thrown while script processing */ + catch(Except) /* Exception thrown while script processing */ rcError(Except); exit(0); /* Return success */ Index: ossp-pkg/rc/rc_config.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_config.c,v rcsdiff -q -kk '-r1.21' '-r1.22' -u '/v/ossp/cvs/ossp-pkg/rc/rc_config.c,v' 2>/dev/null --- rc_config.c 2002/07/05 13:27:22 1.21 +++ rc_config.c 2002/07/05 14:10:24 1.22 @@ -55,9 +55,14 @@ } m_nLocks++; /* FIXME not threadsafe */ +/* Warn: Experimental design pattern code abstracts operations from config */ +/* configVisit(pfnSetdefaults); + configVisit(pfnGetoptinfo);*/ + return(RC_THROW(RC_OK)); } +/* FIXME: Make into configVisit, using callbacks to get and set option info */ /*************************************** * configInfo(void) * * Print the configuration information * @@ -66,7 +71,7 @@ { ex_t Except; int i = 0; - char **pszTemp = NULL; /* For holding the section string vector */ + char **pszTemp = NULL; /* For holding the section string vector */ try { fprintf(stderr, "Run command file: %s\n", configGetrcfile());