OSSP CVS Repository

ossp - Check-in [1687]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1687
Date: 2002-Jan-29 21:10:53 (local)
2002-Jan-29 20:10:53 (UTC)
User:rse
Branch:
Comment: make defaults useable from outside to reset library
Tickets:
Inspections:
Files:
ossp-pkg/ex/ex.c      1.5 -> 1.6     4 inserted, 4 deleted
ossp-pkg/ex/ex.h      1.10 -> 1.11     2 inserted, 0 deleted
ossp-pkg/ex/ex.pod      1.8 -> 1.9     10 inserted, 9 deleted

ossp-pkg/ex/ex.c 1.5 -> 1.6

--- ex.c 2002/01/29 11:06:35     1.5
+++ ex.c 2002/01/29 20:10:53     1.6
@@ -34,7 +34,7 @@
 #include "ex.h"
 
 /* default __ex_ctx callback function */
-static ex_ctx_t *ex_ctx_default(void)
+ex_ctx_t *__ex_ctx_default(void)
 {
     static ex_ctx_t ctx = EX_CTX_INITIALIZER;
 
@@ -42,7 +42,7 @@
 }
 
 /* default __ex_terminate callback function */
-static void ex_terminate_default(ex_t *e)
+void __ex_terminate_default(ex_t *e)
 { 
     fprintf(stderr,
             "**EX: UNCAUGHT EXCEPTION: "
@@ -53,6 +53,6 @@
 }
 
 /* the externally visible API */
-ex_ctx_cb_t  __ex_ctx       = &ex_ctx_default;
-ex_term_cb_t __ex_terminate = &ex_terminate_default;
+ex_ctx_cb_t  __ex_ctx       = &__ex_ctx_default;
+ex_term_cb_t __ex_terminate = &__ex_terminate_default;
 


ossp-pkg/ex/ex.h 1.10 -> 1.11

--- ex.h 2002/01/29 11:05:21     1.10
+++ ex.h 2002/01/29 20:10:53     1.11
@@ -118,10 +118,12 @@
 /* the exception context */
 typedef ex_ctx_t *(*ex_ctx_cb_t)(void);
 extern ex_ctx_cb_t __ex_ctx;
+extern ex_ctx_t *__ex_ctx_default(void);
 
 /* the termination handler */
 typedef void (*ex_term_cb_t)(ex_t *);
 extern ex_term_cb_t __ex_terminate; 
+extern void __ex_terminate_default(ex_t *e);
 
 /* the block for trying execution */
 #define ex_try \


ossp-pkg/ex/ex.pod 1.8 -> 1.9

--- ex.pod       2002/01/29 11:05:21     1.8
+++ ex.pod       2002/01/29 20:10:53     1.9
@@ -262,9 +262,10 @@
 global exception context, returned on-the-fly by the callback "ex_ctx_t
 *(*B<__ex_ctx>)(void)".
 
-The default B<__ex_ctx> (as provided by F<libex>) returns a pointer to
-a static B<ex_ctx_t> context. For use in multi-threading environments,
-this should be overwritten with a per-thread context structure.
+The default B<__ex_ctx> (B<__ex_ctx_default> as provided by F<libex>)
+returns a pointer to a static B<ex_ctx_t> context. For use in
+multi-threading environments, this should be overwritten with a
+per-thread context structure.
 
 To initialize an exception context structure there are two macros
 defined: B<EX_CTX_INITIALIZER> for static initialization and
@@ -277,12 +278,12 @@
 (*B<__ex_terminate>)(C<ex_t *>)". It receives a pointer to the exception
 object which should have been thrown.
 
-The default B<__ex_terminate> (as provided by F<libex>) this prints
-a message of the form "C<**EX: UNCAUGHT EXCEPTION: class=0xXXXXXXXX
-object=0xXXXXXXXX value=0xXXXXXXX [file:123:func]>" to F<stderr> and
-then calls abort(3) in order to terminate the application. For use in
-multi-threading environments, this should be overwritten with a callback
-function which terminates only the current thread.
+The default B<__ex_terminate> (B<__ex_terminate_default> as provided by
+F<libex>) this prints a message of the form "C<**EX: UNCAUGHT EXCEPTION:
+class=0xXXXXXXXX object=0xXXXXXXXX value=0xXXXXXXX [file:123:func]>" to
+F<stderr> and then calls abort(3) in order to terminate the application.
+For use in multi-threading environments, this should be overwritten with
+a callback function which terminates only the current thread.
 
 =head2 Namespace Mapping
 

CVSTrac 2.0.1