diff --git a/gfm/dmbyn.c b/gfm/dmbyn.c index d3844b232..e434f9590 100755 --- a/gfm/dmbyn.c +++ b/gfm/dmbyn.c @@ -35,7 +35,7 @@ void _DivUnsArrByUnsArr(c,a,m,b,n,rf) unsigned SHORT a[],c[],b[]; int n,m,rf; { - int i,j,k,nc,ft; + int i,j,k,nc,ft = 0; unsigned long maxunsint,dvd,pqt,pp; float nqt; unsigned SHORT copa[10],copb[10],af[10],ppt[10],ppd[10],pqa[2]; diff --git a/gfm/dmi.c b/gfm/dmi.c index 75b059611..1d819301a 100755 --- a/gfm/dmi.c +++ b/gfm/dmi.c @@ -28,7 +28,7 @@ extern double pow(double, double); -void _DoubleUnsArr(a,n) +unsigned _DoubleUnsArr(a,n) unsigned SHORT a[]; int n; { diff --git a/gfm/dround.c b/gfm/dround.c index be9b0486e..27f31269b 100755 --- a/gfm/dround.c +++ b/gfm/dround.c @@ -54,7 +54,15 @@ int wID; _MacRet(GM_NULL); } - if(_MacIsDecZ(pSrc1)) { + /* Added by Guy */ + if (wID >= pDst->dc.id) + { + if (pDst != pSrc1) + _MacDCopy(pDst,pSrc1); + _MacRet(pDst); + } + + if(_MacIsDecZ(pSrc1)) { _MacDZero(pDst); pDst->dc.id = wID; _MacRet(pDst); diff --git a/gfm/gmsystem.h b/gfm/gmsystem.h index e33a3fba7..a4cc3ccc3 100755 --- a/gfm/gmsystem.h +++ b/gfm/gmsystem.h @@ -88,7 +88,7 @@ unsigned GF_CDECL _DivUnsArrByUns( unsigned SHORT [], unsigned SHORT , int ); void GF_CDECL _DivUnsArrByUnsArr( unsigned SHORT [], unsigned SHORT [], int , unsigned SHORT [], int , int ); void GF_CDECL _DivUnsArrByUnsRound( unsigned SHORT [], unsigned SHORT , int ); -void GF_CDECL _DoubleUnsArr( unsigned SHORT [], int ); +unsigned GF_CDECL _DoubleUnsArr( unsigned SHORT [], int ); int _ExpDec80Bit( DEC *, DEC *); void GF_CDECL _HalveUnsArr( unsigned SHORT [], int ); void GF_CDECL _IncrementUnsArr( unsigned SHORT [] );