OSSP CVS Repository

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

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

--- rc_config.c  2002/05/22 13:29:40     1.16
+++ rc_config.c  2002/06/26 14:11:16     1.17
@@ -48,16 +48,22 @@
 void configDebug(void)
 {
     int i = 0;
+    ex_t Except;
     char **szTemp = NULL;
 
-    fprintf(stderr, "Run command file: %s\n", configGetrcfile());
+    try {
+        fprintf(stderr, "Run command file: %s\n", configGetrcfile());
 
-    szTemp = (char **)configGetsecs();
-    fprintf(stderr, "Sections:");
-    while (szTemp[i])
-        fprintf(stderr, " %s", szTemp[i++]);
+        szTemp = (char **)configGetsecs();
+        fprintf(stderr, "Sections:");
+        while (szTemp[i])
+            fprintf(stderr, " %s", szTemp[i++]);
 
-    fprintf(stderr, "\n%s", configSummarize());
+        fprintf(stderr, "\n%s", configSummarize());
+    }
+    catch(Except) {
+        rethrow;
+    }
 }
 
 /***************************************
@@ -69,10 +75,10 @@
     ex_t Except;
 
     if (m_nLocks == 0) {                    /* If we don't have one yet */
-        ex_try {                            /* then construct a new one */
+        try {                               /* then construct a new one */
             clioptNew();                    /* Member cliopt instance   */
         }
-        ex_catch(Except) {
+        catch(Except) {
             rethrow;
         }
     }
@@ -91,7 +97,7 @@
     char *szTemp = NULL;
 
     if (m_nLocks) {                         /* Make sure config exists      */
-        ex_try {
+        try {
             if ((szTemp = (char *)clioptGetval(Optname)))
                 return((const char *)szTemp);
 /*            else if (szTemp = envoptGetval(Optname))
@@ -101,7 +107,7 @@
             else
                 return(NULL);               /* Special case when not found  */
         }
-        ex_catch(Except) {
+        catch(Except) {
             rethrow;
         }
     }
@@ -138,14 +144,14 @@
     ex_t Except;
 
     if (m_nLocks) {                     /* Make sure config exists   */
-        ex_try {
+        try {
             /* Because (1) only one rc file can be specified and     */
             /*         (2) it must be specified on the command line, */
             /* we don't bother checking the environment or conf file */
             /* contrary to the behaviour of Getval earlier           */
             return(clioptGetrcfile());
         }
-        ex_catch(Except) {
+        catch(Except) {
             rethrow;
         }
     }
@@ -161,10 +167,10 @@
     ex_t Except;
 
     if (m_nLocks) {                             /* Make sure config exists   */
-        ex_try {                                /* FIXME Might need to check */
+        try {                                   /* FIXME Might need to check */
             return(clioptGetsecs());            /* FIXME env, conf, configs  */
         }
-        ex_catch(Except) {
+        catch(Except) {
             rethrow;
         }
     }
@@ -188,7 +194,7 @@
     m_szSummary = malloc(NULL);
     for (i = 0; i < RC_NUMOPTS; i++)
     {
-        ex_try {    /* FIXME Not threadsafe, wrap with crit section */
+        try { /* FIXME Not threadsafe, wrap with crit section */
             if (configGetval(i) == NULL); /* NOP */
             else if (!(strcmp(configGetval(i), "1"))) {
                 szTemp = malloc(strlen(m_szSummary) + strlen(configGetval(i)));
@@ -213,7 +219,7 @@
                 m_szSummary = szTemp;
             }
         }               /* FIXME Not threadsafe, wrap with crit section */
-        ex_catch(Except) {  /* Breaks the otherwise endless loop above  */
+        catch(Except) {     /* Breaks the otherwise endless loop above  */
             rethrow;
         }
     }
@@ -229,13 +235,13 @@
 {
     ex_t Except;
 
-    ex_try {    /* Parse option groups in order of priority          */
+    try {       /* Parse option groups in order of priority          */
         clioptParseopts(nTotal, szArgvec);  /* Command line options  */
         clioptParseargs();                  /* Command line args */
 /*        envoptParse(m_nLocks->pOpt);*/    /* Environment options   */
 /*        cnfoptParse(m_nLocks->pOpt);*/    /* Configfile options    */
     }
-    ex_catch(Except) {
+    catch(Except) {
         rethrow;
     }
 
@@ -250,7 +256,7 @@
 {
     ex_t Except;
 
-    ex_try { /* Basic checks of version, usage, and help options */
+    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))
@@ -258,7 +264,7 @@
         if (configGetval(RC_HLP_VAL))
             clioptPrintusage(); /* FIXME Replace with real help FIXME */
     }
-    ex_catch(Except) {
+    catch(Except) {
         rethrow;
     }
 
@@ -274,12 +280,12 @@
     ex_t Except;
 
     if (--m_nLocks == 0) {          /* If m_nLocks is 0, deallocate */
-        ex_try {                    /* FIXME, not thread-safe       */
+        try {                       /* FIXME, not thread-safe       */
             clioptDelete();
             if (m_szSummary)
                 free(m_szSummary);
         }
-        ex_catch(Except) {
+        catch(Except) {
             rethrow;
         }
     }

CVSTrac 2.0.1