campo-sirio/gfm/disneg.c

45 lines
748 B
C
Raw Normal View History

/* int IsDecimalNegative(pSrc1);
*
* ARGUMENT
* DEC *pSrc1;
*
* DESCRIPTION
* Decides whether pSrc1 is a negative number.
*
* SIDE EFFECTS
* None.
*
* RETURNS
* Returns TRUE if negative, else returns FALSE. Note that if a null
* pointer is handed us, we return GM_NULLPOINTER.
*
* POSSIBLE ERROR CODES
*
* GM_NULLPOINTER
*
* AUTHOR
* Andy Anderson 15-JAN-1987 16:00
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
*
* MODIFICATIONS
*
*/
#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"
int IsDecimalNegative(pSrc1)
DEC *pSrc1;
{
_MacStart(GM_DISNEG);
_MacInVarI(pSrc1);
/* Then check for negative number */
if(_MacIsDecN(pSrc1))
{_MacRet(TRUE);}
else
_MacRet(FALSE);
}