diff options
author | Ben Elliston <bje@au.ibm.com> | 2009-03-29 00:33:22 +0000 |
---|---|---|
committer | Ben Elliston <bje@gcc.gnu.org> | 2009-03-29 11:33:22 +1100 |
commit | f988ec96d922819a4948c1ed96c6dc1b79a7ad22 (patch) | |
tree | 9ce194cc5467e65c729657e8e356f5d17eef3a16 /libdecnumber/decPacked.c | |
parent | 7cdc19725b8817483f523591ac085b8e6375a7e3 (diff) | |
download | gcc-f988ec96d922819a4948c1ed96c6dc1b79a7ad22.zip gcc-f988ec96d922819a4948c1ed96c6dc1b79a7ad22.tar.gz gcc-f988ec96d922819a4948c1ed96c6dc1b79a7ad22.tar.bz2 |
decNumber.c, [...]: Upgrade to decNumber 3.61.
* decNumber.c, decNumber.h, decNumberLocal.h, decDouble.c,
decDouble.h, decSingle.c, decContext.c, decSingle.h, decPacked.c,
decCommon.c, decContext.h, decQuad.c, decPacked.h, decQuad.h,
decDPD.h, decBasic.c: Upgrade to decNumber 3.61.
* dpd/decimal128.h, dpd/decimal32.c, dpd/decimal32.h,
dpd/decimal64.c, dpd/decimal128.c, dpd/decimal64.h: Likewise.
From-SVN: r145222
Diffstat (limited to 'libdecnumber/decPacked.c')
-rw-r--r-- | libdecnumber/decPacked.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libdecnumber/decPacked.c b/libdecnumber/decPacked.c index 2b912fe..2297d7d 100644 --- a/libdecnumber/decPacked.c +++ b/libdecnumber/decPacked.c @@ -31,12 +31,12 @@ /* ------------------------------------------------------------------ */ /* Packed Decimal conversion module */ /* ------------------------------------------------------------------ */ -/* This module comprises the routines for Packed Decimal format */ +/* This module comprises the routines for Packed Decimal format */ /* numbers. Conversions are supplied to and from decNumber, which in */ /* turn supports: */ /* conversions to and from string */ /* arithmetic routines */ -/* utilities. */ +/* utilities. */ /* Conversions from decNumber to and from densely packed decimal */ /* formats are provided by the decimal32 through decimal128 modules. */ /* ------------------------------------------------------------------ */ @@ -51,8 +51,8 @@ /* */ /* bcd is the BCD bytes */ /* length is the length of the BCD array */ -/* scale is the scale result */ -/* dn is the decNumber */ +/* scale is the scale result */ +/* dn is the decNumber */ /* returns bcd, or NULL if error */ /* */ /* The number is converted to a BCD packed decimal byte array, */ @@ -67,7 +67,7 @@ /* as necessary. */ /* */ /* If there is an error (that is, the decNumber has too many digits */ -/* to fit in length bytes, or it is a NaN or Infinity), NULL is */ +/* to fit in length bytes, or it is a NaN or Infinity), NULL is */ /* returned and the bcd and scale results are unchanged. Otherwise */ /* bcd is returned. */ /* ------------------------------------------------------------------ */ @@ -86,9 +86,9 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale, if (dn->digits>length*2-1 /* too long .. */ ||(dn->bits & DECSPECIAL)) return NULL; /* .. or special -- hopeless */ - if (dn->bits&DECNEG) obyte=DECPMINUS; /* set the sign .. */ - else obyte=DECPPLUS; - *scale=-dn->exponent; /* .. and scale */ + if (dn->bits&DECNEG) obyte=DECPMINUS; /* set the sign .. */ + else obyte=DECPPLUS; + *scale=-dn->exponent; /* .. and scale */ /* loop from lowest (rightmost) byte */ out=bcd+length-1; /* -> final byte */ @@ -141,7 +141,7 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale, /* bcd is the BCD bytes */ /* length is the length of the BCD array */ /* scale is the scale associated with the BCD integer */ -/* dn is the decNumber [with space for length*2 digits] */ +/* dn is the decNumber [with space for length*2 digits] */ /* returns dn, or NULL if error */ /* */ /* The BCD packed decimal byte array, together with an associated */ @@ -157,7 +157,7 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale, /* no error is possible unless the adjusted exponent is out of range, */ /* no sign nibble was found, or a sign nibble was found before the */ /* final nibble. In these error cases, NULL is returned and the */ -/* decNumber will be 0. */ +/* decNumber will be 0. */ /* ------------------------------------------------------------------ */ decNumber * decPackedToNumber(const uByte *bcd, Int length, const Int *scale, decNumber *dn) { @@ -165,7 +165,7 @@ decNumber * decPackedToNumber(const uByte *bcd, Int length, const uByte *first; /* -> first non-zero byte */ uInt nib; /* work nibble */ Unit *up=dn->lsu; /* output pointer */ - Int digits; /* digits count */ + Int digits; /* digits count */ Int cut=0; /* phase of output */ decNumberZero(dn); /* default result */ @@ -182,7 +182,7 @@ decNumber * decPackedToNumber(const uByte *bcd, Int length, /* leave as 1] */ /* check the adjusted exponent; note that scale could be unbounded */ - dn->exponent=-*scale; /* set the exponent */ + dn->exponent=-*scale; /* set the exponent */ if (*scale>=0) { /* usual case */ if ((dn->digits-*scale-1)<-DECNUMMAXE) { /* underflow */ decNumberZero(dn); |