RegisterMatherrHandler
Substitutes a custom routine for matherr
#include <math.h>
int RegisterMatherrHandler (
int (*newFunc) (
struct exception *));
RegisterMatherrHandler returns zero if successful. If a nonzero value is returned, an error occurred resulting in an error handler being registered. If an error occurs, it is most likely because the calling thread does not have CLib context.
If you have linked your program with the NWPRE.OBJ file, the RegisterMatherrHandler function returns a -1 and sets erno when an error occurs and no handler has been registered with RegisterMatherrHandler.
RegisterMatherrHandler registers a routine ( newFunc) to be called in place of matherr.
If a routine has already been registered, RegisterMatherrHandler returns a nonzero value. The following deregisters a previously registered matherr handler:
RegisterMatherrHandler(NULL);
The routine that is registered must meet the requirements of matherr.
See the example for matherr.