X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/63935474eb0bb850356356496625ad5b8dd7357a..ff0f0220601f448169de6cda01f3a39f04bae808:/exc.c diff --git a/exc.c b/exc.c index 7ef3812..0b5cf3e 100644 --- a/exc.c +++ b/exc.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: exc.c,v 1.4 1999/05/17 20:35:30 mdw Exp $ + * $Id: exc.c,v 1.5 1999/05/19 20:27:11 mdw Exp $ * * Structured exception handling in C * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: exc.c,v $ + * Revision 1.5 1999/05/19 20:27:11 mdw + * Change naming to match newer mLib conventions. + * * Revision 1.4 1999/05/17 20:35:30 mdw * Output uncaught exception types in hex, because they're easier to * translate that way. @@ -57,7 +60,7 @@ __exc_hnd *__exc_list = 0; /*----- Functions ---------------------------------------------------------*/ -/* --- @exc__duff@ --- * +/* --- @duff@ --- * * * Arguments: @exc_extype type@ = type of duff exception * @exc_exval val@ = extra data supplied @@ -67,18 +70,18 @@ __exc_hnd *__exc_list = 0; * Use: Default handler when everything goes wrong. */ -static void exc__duff(exc_extype type, exc_exval val) +static void duff(exc_extype type, exc_exval val) { fprintf(stderr, "fatal error: uncaught exception (type = %lx)\n", type); abort(); } -/* --- @exc__duffproc@ --- * +/* --- @duffproc@ --- * * * Current handler when there are no more exceptions left. */ -static exc__uncaught exc__duffproc = exc__duff; +static exc__uncaught duffproc = duff; /* --- @exc_uncaught@ --- * * @@ -91,9 +94,9 @@ static exc__uncaught exc__duffproc = exc__duff; exc__uncaught exc_uncaught(exc__uncaught proc) { - exc__uncaught p = exc__duffproc; + exc__uncaught p = duffproc; if (proc) - exc__duffproc = proc; + duffproc = proc; return (p); } @@ -146,7 +149,7 @@ void __exc_rethrow(exc_extype type, exc_exval val) { __exc_hnd *p = __exc_list; if (!p) - exc__duffproc(type, val); + duffproc(type, val); p->type = type; p->val = val; __exc_list = p->next;