Index: ossp-pkg/rc/rc.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc.c,v rcsdiff -q -kk '-r1.22' '-r1.23' -u '/v/ossp/cvs/ossp-pkg/rc/rc.c,v' 2>/dev/null --- rc.c 2002/04/24 16:47:07 1.22 +++ rc.c 2002/04/25 09:51:29 1.23 @@ -70,7 +70,7 @@ configNew(); /* Construct a new configuration */ configLoad(argc, argv); /* Read configuration from cli, env, and conf */ configDebug(); /* FIXME Remove FIXME */ - rcIntro(); /* Test for usage, help, and version options */ + configVerify(); /* Test for usage, help, and version options */ /* pRc = procNew(); procReadrc(pRc); @@ -78,7 +78,7 @@ procReadtmp(pRc); for (i = 0; i < clioptGetseclen; procSection(pRc, configGetsec(i))); procParse(pRc); /- Script generation -/ - procOut(pRc); /- [Execute|Evaluate|Print] script -/ + procRun(pRc); /- [Execute|Evaluate|Print] script -/ procDelete(pRc);*/ configDelete(); Index: ossp-pkg/rc/rc.h RCS File: /v/ossp/cvs/ossp-pkg/rc/rc.h,v rcsdiff -q -kk '-r1.22' '-r1.23' -u '/v/ossp/cvs/ossp-pkg/rc/rc.h,v' 2>/dev/null --- rc.h 2002/04/24 16:47:07 1.22 +++ rc.h 2002/04/25 09:51:29 1.23 @@ -61,9 +61,6 @@ /* Rc script type */ typedef char *rc_script_t; -/* Main function prototypes */ -rc_return_t rcIntro(void); - /* Option function prototypes */ /*rc_return_t optionProcess(void); rc_return_t optionProcess(void);*/ @@ -71,6 +68,7 @@ /* Config function prototypes */ rc_return_t configNew(void); rc_return_t configLoad(int, char **); +rc_return_t configVerify(void); rc_return_t configDelete(void); const char *configSummarize(void); void configDebug(void); /* FIXME Remove */ Index: ossp-pkg/rc/rc_config.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_config.c,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/rc/rc_config.c,v' 2>/dev/null --- rc_config.c 2002/04/24 16:47:07 1.14 +++ rc_config.c 2002/04/25 09:51:29 1.15 @@ -255,6 +255,29 @@ return(RC_THROW(RC_OK)); } +/************************************************ +* configVerify(void) * +* Verify config options help, usage, or version * +************************************************/ +rc_return_t configVerify(void) +{ + ex_t Except; + + ex_try { /* Basic checks of version, usage, and help options */ + if (configGetval(RC_VER_VAL)) + fprintf(stdout, "OSSP rc %s\n", RC_VERSION); + if (configGetval(RC_USE_VAL)) + clioptPrintusage(); + if (configGetval(RC_HLP_VAL)) + clioptPrintusage(); /* FIXME Replace with real help FIXME */ + } + ex_catch(Except) { + rethrow; + } + + return(RC_THROW(RC_OK)); +} + /*************************************** * configDelete(void) * * Destruct a configuration *