campo-sirio/gfm/disge.c

53 lines
899 B
C
Raw Normal View History

/* int IsDecimalGreaterOrEqual(pSrc1,pSrc2)
*
* ARGUMENT
* pSrc1 is a ptr to the source1 DEC structure.
* pSrc2 is a ptr to the source2 DEC structure.
*
* DESCRIPTION
* Compares pSrc1:pSrc2 and return TRUE if pSrc1>=pSrc2.
*
* SIDE EFFECTS
* None.
*
* RETURNS
* Returns TRUE if scr1>=scr2, FALSE if pSrc1 < pSrc2.
* However, returns GM_NULLPOINTER if pSrc1 or pSrc2 point to a null.
*
* POSSIBLE ERROR CODES
*
* GM_NULLPOINTER
*
* AUTHOR
* Andy Anderson 14-JAN-1987 14:27
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
*
* MODIFICATIONS
*
*/
#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"
int IsDecimalGreaterOrEqual(pSrc1,pSrc2)
DEC *pSrc1,*pSrc2;
{
int i;
_MacStart(GM_DISGE);
i=CompareDecimal(pSrc1,pSrc2);
switch(i) {
case 0:
case 1: {
_MacRet(TRUE);
}
case -1: {
_MacRet(FALSE);
}
}
_MacRet(i);
}