ba237a9d91
Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti i sorgenti per Greenleaf Math Library (gfm.dll) git-svn-id: svn://10.65.10.50/trunk@10079 c028cbd2-c16b-5b4b-a496-9718f37d4682
54 lines
836 B
C
Executable File
54 lines
836 B
C
Executable File
/* DEC *MaximumDecimal(pDst,pSrc1,pSrc2)
|
|
*
|
|
* ARGUMENT
|
|
* DEC *pSrc1,*pSrc2,*pDst;
|
|
*
|
|
* DESCRIPTION
|
|
* Stores the larger of pSrc1 or pSrc2 in pDst.
|
|
*
|
|
* SIDE EFFECTS
|
|
* None.
|
|
*
|
|
* RETURNS
|
|
* Returns a pointer to pDst if successful.
|
|
* otherwise GM_NULL and sets the global error to GM_NULLPOINTER.
|
|
*
|
|
* POSSIBLE ERROR CODES
|
|
*
|
|
* GM_NULLPOINTER
|
|
* GM_NOMEMORY
|
|
*
|
|
* AUTHOR
|
|
* AA 17-Sep-87
|
|
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
|
|
*
|
|
* MODIFICATIONS
|
|
*
|
|
*
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "gm.h"
|
|
#include "gmsystem.h"
|
|
|
|
DEC *MaximumDecimal(pDst,pSrc1,pSrc2)
|
|
DEC *pSrc1,*pSrc2,*pDst;
|
|
{
|
|
|
|
int i;
|
|
|
|
_MacStart(GM_DMAX);
|
|
_MacInVarD(pSrc1);
|
|
_MacInVarD(pSrc2);
|
|
_MacOutVarD(pDst);
|
|
|
|
i = CompareDecimal(pSrc1,pSrc2);
|
|
|
|
if(i<0)
|
|
_MacDCopy(pDst,pSrc2);
|
|
else
|
|
_MacDCopy(pDst,pSrc1);
|
|
|
|
return(pDst);
|
|
}
|