Index: ossp-pkg/ex/ex.c RCS File: /v/ossp/cvs/ossp-pkg/ex/ex.c,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/ex/ex.c,v' 2>/dev/null --- 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; Index: ossp-pkg/ex/ex.h RCS File: /v/ossp/cvs/ossp-pkg/ex/ex.h,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/ex/ex.h,v' 2>/dev/null --- 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 \ Index: ossp-pkg/ex/ex.pod RCS File: /v/ossp/cvs/ossp-pkg/ex/ex.pod,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/ex/ex.pod,v' 2>/dev/null --- 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) returns a pointer to -a static B 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) +returns a pointer to a static B 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 for static initialization and @@ -277,12 +278,12 @@ (*B<__ex_terminate>)(C)". It receives a pointer to the exception object which should have been thrown. -The default B<__ex_terminate> (as provided by F) this prints -a message of the form "C<**EX: UNCAUGHT EXCEPTION: class=0xXXXXXXXX -object=0xXXXXXXXX value=0xXXXXXXX [file:123:func]>" to F 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) this prints a message of the form "C<**EX: UNCAUGHT EXCEPTION: +class=0xXXXXXXXX object=0xXXXXXXXX value=0xXXXXXXX [file:123:func]>" to +F 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