home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $Source: WB_2.1:homes/rkr/prog/sercli/src/RCS/errors.c,v $
- ** $Author: rkr $
- ** $Revision: 1.5 $
- ** $Locker: rkr $
- ** $State: Exp $
- ** $Date: 1993/06/16 23:30:56 $
- **
- ** sercli (an Amiga .device <-> FIFO interface tool)
- ** Copyright (C) 1993 Richard Rauch
- **
- ** See /doc/sercli.doc and /COPYING for use and distribution license.
- **
- */
-
- #include "errors.h"
-
- static error_handler handlers [num_error_types];
-
- error_handler set_error_handler (error_type type, error_handler new_handler)
- {
- error_handler old_handler;
-
- old_handler = handlers [type];
- handlers [type] = new_handler;
-
- return (old_handler);
- }
-
-
-
- void handle_error (error_type type, void *error)
- {
- error_handler handler;
-
- handler = handlers [type];
- if (handler)
- handler (error);
- }
-