head 1.13; access; symbols EX_1_0_6:1.13 LMTP2NNTP_1_4_1:1.11 LMTP2NNTP_1_4_0:1.11 EX_1_0_5:1.11 LMTP2NNTP_1_3_0:1.10 LMTP2NNTP_1_3b2:1.10 LMTP2NNTP_1_3b1:1.10 LMTP2NNTP_1_3a3:1.10 LMTP2NNTP_1_3a2:1.10 LMTP2NNTP_1_3a1:1.10 EX_1_0_4:1.10 EX_1_0_3:1.10 OSSP_RC_0_7_3:1.9 OSSP_RC_0_7_2:1.9 OSSP_RC_0_7_1:1.9 OSSP_RC_ALPHA_06:1.9 OSSP_RC_EXBROKEN:1.9 LMTP2NNTP_1_2_0:1.9 LMTP2NNTP_1_2b4:1.9 LMTP2NNTP_1_2b3:1.9 LMTP2NNTP_1_2b2:1.9 LMTP2NNTP_1_2b1:1.9 LMTP2NNTP_1_2a8:1.9 LMTP2NNTP_1_2a7:1.9 EX_1_0_2:1.9 EX_1_0_1:1.8 LMTP2NNTP_1_2a6:1.7 LMTP2NNTP_1_2a5:1.7 EX_1_0_0:1.7 LMTP2NNTP_1_2a4:1.6 EX_0_9_1:1.6 LMTP2NNTP_1_2a3:1.6 EX_0_9_0:1.6; locks; strict; comment @ * @; 1.13 date 2007.10.12.19.59.57; author rse; state Exp; branches; next 1.12; commitid 9SN7ivPOxnsC7lBs; 1.12 date 2006.08.10.19.49.33; author rse; state Exp; branches; next 1.11; commitid o4A6XFppdzD0PkIr; 1.11 date 2005.01.30.13.39.07; author rse; state Exp; branches; next 1.10; 1.10 date 2004.03.25.19.01.42; author rse; state Exp; branches; next 1.9; 1.9 date 2003.01.30.11.04.42; author rse; state Exp; branches; next 1.8; 1.8 date 2003.01.06.15.31.24; author rse; state Exp; branches; next 1.7; 1.7 date 2002.03.30.18.56.02; author rse; state Exp; branches; next 1.6; 1.6 date 2002.01.29.20.10.53; author rse; state Exp; branches; next 1.5; 1.5 date 2002.01.29.11.06.35; author rse; state Exp; branches; next 1.4; 1.4 date 2002.01.29.11.05.21; author rse; state Exp; branches; next 1.3; 1.3 date 2002.01.26.22.35.02; author rse; state Exp; branches; next 1.2; 1.2 date 2002.01.26.20.12.19; author rse; state Exp; branches; next 1.1; 1.1 date 2002.01.25.15.25.51; author rse; state Exp; branches; next ; desc @@ 1.13 log @prepare for release @ text @/* ** OSSP ex - Exception Handling ** Copyright (c) 2002-2007 Ralf S. Engelschall ** Copyright (c) 2002-2007 The OSSP Project ** ** This file is part of OSSP ex, an exception handling library ** which can be found at http://www.ossp.org/pkg/lib/ex/. ** ** Permission to use, copy, modify, and distribute this software for ** any purpose with or without fee is hereby granted, provided that ** the above copyright notice and this permission notice appear in all ** copies. ** ** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ** SUCH DAMAGE. ** ** ex.c: exception handling (compiler part) */ #include #include #include "ex.h" /* default __ex_ctx callback function */ ex_ctx_t *__ex_ctx_default(void) { static ex_ctx_t ctx = EX_CTX_INITIALIZER; return &ctx; } /* default __ex_terminate callback function */ void __ex_terminate_default(ex_t *e) { fprintf(stderr, "**EX: UNCAUGHT EXCEPTION: " "class=0x%lx object=0x%lx value=0x%lx [%s:%d@@%s]\n", (long)((e)->ex_class), (long)((e)->ex_object), (long)((e)->ex_value), (e)->ex_file, (e)->ex_line, (e)->ex_func); abort(); } /* the externally visible API */ ex_ctx_cb_t __ex_ctx = &__ex_ctx_default; ex_term_cb_t __ex_terminate = &__ex_terminate_default; @ 1.12 log @cleanup source tree @ text @d3 2 a4 2 ** Copyright (c) 2002-2006 Ralf S. Engelschall ** Copyright (c) 2002-2006 The OSSP Project @ 1.11 log @Adjusted copyright messages to include new year 2005. @ text @d3 2 a4 3 ** Copyright (c) 2002-2005 Ralf S. Engelschall ** Copyright (c) 2002-2005 The OSSP Project ** Copyright (c) 2002-2005 Cable & Wireless @ 1.10 log @bump and adjust copyright @ text @d3 3 a5 3 ** Copyright (c) 2002-2004 Ralf S. Engelschall ** Copyright (c) 2002-2004 The OSSP Project ** Copyright (c) 2002-2004 Cable & Wireless @ 1.9 log @final polishing @ text @d3 3 a5 3 ** Copyright (c) 2002-2003 Ralf S. Engelschall ** Copyright (c) 2002-2003 The OSSP Project ** Copyright (c) 2002-2003 Cable & Wireless Germany @ 1.8 log @- consistently use "Exception Handling" - strip trailing whitespaces - adjust copyright for new year 2003 - consistently use OSSP ASCII-art @ text @d5 1 a5 1 ** Copyright (c) 2002-2003 Cable & Wireless Deutschland @ 1.7 log @bump version and fix URLs @ text @d2 4 a5 4 ** OSSP ex - Exception Handling Library ** Copyright (c) 2002 Ralf S. Engelschall ** Copyright (c) 2002 The OSSP Project ** Copyright (c) 2002 Cable & Wireless Deutschland d46 1 a46 1 { @ 1.6 log @make defaults useable from outside to reset library @ text @d8 1 a8 1 ** which can be found at http://www.ossp.org/pkg/ex/. @ 1.5 log @just a few comments I forgot... @ text @d37 1 a37 1 static ex_ctx_t *ex_ctx_default(void) d45 1 a45 1 static void ex_terminate_default(ex_t *e) d56 2 a57 2 ex_ctx_cb_t __ex_ctx = &ex_ctx_default; ex_term_cb_t __ex_terminate = &ex_terminate_default; @ 1.4 log @overhaul __ex_ctx and __ex_terminate stuff @ text @d36 1 d44 1 d55 1 @ 1.3 log @fix license messages @ text @d31 3 d36 19 a54 1 ex_ctx_t __ex_ctx_global; @ 1.2 log @switch to our standard build environment @ text @d10 4 a13 4 ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License ** as published by the Free Software Foundation; either version ** 2.0 of the License, or (at your option) any later version. d15 12 a26 9 ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this file; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ** USA, or contact the OSSP project . @ 1.1 log @Welcome OSSP ex, another new-born OSSP library. This is the first cut for a C exception handling library. Read ex.pod for details... @ text @d2 4 a5 2 ** Copyright (c) 2001-2002 The OSSP Project ** Copyright (c) 2001-2002 Cable & Wireless Deutschland d7 1 a7 1 ** This file is part of OSSP ex, an exception library @