OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc_config.c versions 1.17 and 1.18
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc_config.c 1.17 -> 1.18

--- rc_config.c  2002/06/26 14:11:16     1.17
+++ rc_config.c  2002/06/26 14:42:53     1.18
@@ -255,20 +255,30 @@
 rc_return_t configVerify(void)
 {
     ex_t Except;
+    short bStop = FALSE;
 
     try { /* Basic checks of version, usage, and help options */
-        if (configGetval(RC_VER_VAL))
+        if (configGetval(RC_VER_VAL)) {
             fprintf(stdout, "OSSP rc %s\n", RC_VERSION);
-        if (configGetval(RC_USE_VAL))
+            bStop = TRUE;
+        }
+        if (configGetval(RC_USE_VAL)) {
             clioptPrintusage();
-        if (configGetval(RC_HLP_VAL))
+            bStop = TRUE;
+        }
+        if (configGetval(RC_HLP_VAL)) {
             clioptPrintusage(); /* FIXME Replace with real help FIXME */
+            bStop = TRUE;
+        }
     }
     catch(Except) {
         rethrow;
     }
 
-    return(RC_THROW(RC_OK));
+    if (bStop)                          /* Did user request a non-operation?  */
+        return(RC_THROW(RC_WRN_TRM));   /* Yes, so terminate after handling.  */
+    else
+        return(RC_THROW(RC_OK));        /* No, we should continue processing. */
 }
 
 /***************************************

CVSTrac 2.0.1