campo-sirio/gfm/dislt.c

55 lines
881 B
C
Raw Normal View History

/* int IsDecimalLess(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 22-APR-1987 14:27
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
*
* MODIFICATIONS
*
*/
#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"
int IsDecimalLess(pSrc1,pSrc2)
DEC *pSrc1,*pSrc2;
{
int i;
_MacStart(GM_DISLT);
i=CompareDecimal(pSrc1,pSrc2);
switch(i) {
case -1: {
_MacRet(TRUE);
}
case 0:
case 1: {
_MacRet(FALSE);
}
}
_MacRet(i);
}