50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
|
/* int ReturnMathErrAndClear();
|
||
|
*
|
||
|
* ARGUMENT
|
||
|
*
|
||
|
*
|
||
|
* DESCRIPTION
|
||
|
* Sets wGMError to GM_SUCCESS, and returns it's previous value.
|
||
|
*
|
||
|
* SIDE EFFECTS
|
||
|
* Does NOT clear the variable wGMErrFunNum (function number
|
||
|
* causing error). This is so that ReturnErrFuncNumAndClear() can
|
||
|
* get and clear that one separately. If you want to write your own
|
||
|
* functions, or do your own checking, remember that wGMErrFunNum
|
||
|
* may contain an error function number, but wGMError could have
|
||
|
* been cleared by some previous call to here. Function ClearMathError()
|
||
|
* unconditionally clears both and can be found in "gm.h". BE SURE YOU ARE
|
||
|
* A SOURCE CODE USER AND KNOW WHAT YOU ARE DOING WITH THESE
|
||
|
* VARIABLES, AND HOW THEY ARE AFFECTED BY THE INTERNAL ROUTINES,
|
||
|
* BEFORE YOU WRITE YOUR OWN ERROR HANDLER!
|
||
|
*
|
||
|
* RETURNS
|
||
|
* Returns value of wGMError (before settting it to GM_SUCCESS).
|
||
|
*
|
||
|
* POSSIBLE ERROR CODES
|
||
|
*
|
||
|
* None.
|
||
|
*
|
||
|
* AUTHOR
|
||
|
* Andy Anderson 19-FEB-1987 15:30
|
||
|
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
|
||
|
*
|
||
|
* MODIFICATIONS
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include "gm.h"
|
||
|
#include "gmsystem.h"
|
||
|
|
||
|
int ReturnMathErrAndClear()
|
||
|
{
|
||
|
|
||
|
int i;
|
||
|
|
||
|
i=wGMError;
|
||
|
wGMError = GM_SUCCESS;
|
||
|
_wGMUser = 0;
|
||
|
return(i);
|
||
|
}
|