/* -*-c-*-
*
- * $Id: exc.c,v 1.2 1999/05/05 18:50:31 mdw Exp $
+ * $Id: exc.c,v 1.5 1999/05/19 20:27:11 mdw Exp $
*
* Structured exception handling in C
*
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with mLib; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * License along with mLib; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
*/
/*----- 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.
+ *
+ * Revision 1.3 1999/05/06 19:51:35 mdw
+ * Reformatted the LGPL notice a little bit.
+ *
* Revision 1.2 1999/05/05 18:50:31 mdw
* Change licensing conditions to LGPL.
*
/*----- Functions ---------------------------------------------------------*/
-/* --- @exc__duff@ --- *
+/* --- @duff@ --- *
*
* Arguments: @exc_extype type@ = type of duff exception
* @exc_exval val@ = extra data supplied
* 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 = %lu)\n", type);
+ 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@ --- *
*
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);
}
{
__exc_hnd *p = __exc_list;
if (!p)
- exc__duffproc(type, val);
+ duffproc(type, val);
p->type = type;
p->val = val;
__exc_list = p->next;