Lines Matching refs:bcd
45 /* decPackedFromNumber -- convert decNumber to BCD Packed Decimal */
47 /* bcd is the BCD bytes */
48 /* length is the length of the BCD array */
51 /* returns bcd, or NULL if error */
53 /* The number is converted to a BCD packed decimal byte array, */
54 /* right aligned in the bcd array, whose length is indicated by the */
66 /* returned and the bcd and scale results are unchanged. Otherwise */
67 /* bcd is returned. */
69 uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale,
89 out=bcd+length-1; /* -> final byte */
90 for (; out>=bcd; out--) {
130 return bcd;
134 /* decPackedToNumber -- convert BCD Packed Decimal to a decNumber */
136 /* bcd is the BCD bytes */
137 /* length is the length of the BCD array */
138 /* scale is the scale associated with the BCD integer */
142 /* The BCD packed decimal byte array, together with an associated */
143 /* scale, is converted to a decNumber. The BCD array is assumed full */
157 decNumber * decPackedToNumber(const uByte *bcd, Int length,
159 const uByte *last=bcd+length-1; /* -> last byte */
167 last=&bcd[length-1];
173 for (first=bcd; *first==0;) first++;