51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
|
/* void SetMathErrVector(pfn);
|
||
|
*
|
||
|
* ARGUMENT
|
||
|
* void (*pfn)();
|
||
|
*
|
||
|
* DESCRIPTION
|
||
|
* Sets the internal error handler to point to routine pfn. If pfn is
|
||
|
* NULL on entry, then the default routine address is set. Note that the
|
||
|
* function SetMathError is #define-d in gm.h, and results in call to
|
||
|
* wherever the pointer pfnGMErrVector points to. The default handler
|
||
|
* just sets the global variables wGMError and wGMErrFunNum if wGMError is
|
||
|
* equal to GM_SUCCESS.
|
||
|
*
|
||
|
* SIDE EFFECTS
|
||
|
* If a NULL pointer is passed, the routine sets the default Mathlib
|
||
|
* pointer, and sets the errors wGMError and wGMErrFunNum. The requested
|
||
|
* [NULL] pointer is NOT SET.
|
||
|
*
|
||
|
* RETURNS
|
||
|
* None.
|
||
|
*
|
||
|
* POSSIBLE ERROR CODES
|
||
|
*
|
||
|
* None.
|
||
|
*
|
||
|
* AUTHOR
|
||
|
* Andy Anderson 9/15/87 1400
|
||
|
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
|
||
|
*
|
||
|
* MODIFICATIONS
|
||
|
*
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include "gm.h"
|
||
|
#include "gmsystem.h"
|
||
|
|
||
|
void SetMathErrVector(pfn)
|
||
|
void ( *pfn )( int , int );
|
||
|
{
|
||
|
_MacStart(GM_DSETERTN);
|
||
|
if(!pfn) {
|
||
|
pfnGMErrVector = GMDefErrHandler;
|
||
|
}
|
||
|
else
|
||
|
pfnGMErrVector = pfn;
|
||
|
|
||
|
_MacRetV;
|
||
|
}
|