/* int	TestSignDecimal(pSrc1);
 *
 * ARGUMENT
 *	DEC	*pSrc1;
 *
 * DESCRIPTION
 *	Decides	whether	pSrc1 is positive, negative, or	zero.
 *
 * SIDE	EFFECTS
 *	None.
 *
 * RETURNS
 *	Returns	 1 if scr1 is positive.
 *		 0 if pSrc1 is zero.
 *		-1 if scr1 is negative.
 *	Returns	GM_NULLPOINTER if pSrc1	points to a null.
 *
 * POSSIBLE ERROR CODES
 *
 *	GM_NULLPOINTER
 *
 * AUTHOR
 *  Andy Anderson   27-JAN-1987	 19:00
 *   Copyright (C) 1987-1990 Greenleaf Software	Inc.  All rights reserved.
 *
 * MODIFICATIONS
 *
 */

#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"

int	TestSignDecimal(pSrc1)
DEC	*pSrc1;
{

	_MacStart(GM_DSIGN);
	_MacInVarI(pSrc1);

/* keep	checks in this order */
	if(_MacIsDecP(pSrc1))	/* means positive AND non-zero */
		_MacRet(1);

	if(_MacIsDecN(pSrc1))	/* negative bit	set */
		_MacRet(-1);

	_MacRet(0);
}