https://gcc.gnu.org/g:b966e87aa42ad43837259b2e89571bbcfdd01ae5
commit r17-1028-gb966e87aa42ad43837259b2e89571bbcfdd01ae5 Author: Dhruv Chawla <[email protected]> Date: Thu May 14 09:07:11 2026 +0000 libdecnumber: Fix typos in various files Signed-off-by: Dhruv Chawla <[email protected]> libdecnumber/ChangeLog: * decBasic.c (decCanonical): Fix typos. (decDivide): Likewise. (decFiniteMultiply): Likewise. (decFloatMultiply): Likewise. (decFloatQuantize): Likewise. (decToInt32): Likewise. * decCommon.c (decFinalize): Likewise. (decFloatFromString): Likewise. * decContext.c (decContextGetStatus): Likewise. * decNumber.c (decToString): Likewise. (decAddOp): Likewise. (decMalloc): Likewise. * decNumberLocal.h: Likewise. Diff: --- libdecnumber/decBasic.c | 18 +++++++++--------- libdecnumber/decCommon.c | 4 ++-- libdecnumber/decContext.c | 2 +- libdecnumber/decNumber.c | 8 ++++---- libdecnumber/decNumberLocal.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libdecnumber/decBasic.c b/libdecnumber/decBasic.c index f810eba6cad7..8f257e105696 100644 --- a/libdecnumber/decBasic.c +++ b/libdecnumber/decBasic.c @@ -123,7 +123,7 @@ static decFloat * decCanonical(decFloat *result, const decFloat *df) { #endif } /* block */ - /* Loop to repair a non-canonical coefficent, as needed */ + /* Loop to repair a non-canonical coefficient, as needed */ inword=DECWORDS-1; /* current input word */ uoff=0; /* bit offset of declet */ encode=DFWORD(result, inword); @@ -178,7 +178,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, const decFloat *dfr, decContext *set, uInt op) { decFloat quotient; /* for remainders */ bcdnum num; /* for final conversion */ - uInt acc[DIVACCLEN]; /* coefficent in base-billion .. */ + uInt acc[DIVACCLEN]; /* coefficient in base-billion .. */ uInt div[DIVOPLEN]; /* divisor in base-billion .. */ uInt quo[DIVOPLEN+1]; /* quotient in base-billion .. */ uByte bcdacc[(DIVOPLEN+1)*9+2]; /* for quotient in BCD, +1, +1 */ @@ -255,7 +255,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, } /* 0/x */ /* [here, both operands are known to be finite and non-zero] */ - /* extract the operand coefficents into 'units' which are */ + /* extract the operand coefficients into 'units' which are */ /* base-billion; the lhs is high-aligned in acc and the msu of both */ /* acc and div is at the right-hand end of array (offset length-1); */ /* the quotient can need one more unit than the operands as digits */ @@ -726,7 +726,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, #if DECUSE64 uLong accl[MULACCLEN]; /* lazy accumulator (base-billion+) */ uLong *pl; /* work -> lazy accumulator */ - uInt acc[MULACCLEN]; /* coefficent in base-billion .. */ + uInt acc[MULACCLEN]; /* coefficient in base-billion .. */ #else uInt acc[MULACCLEN*2]; /* accumulator in base-billion .. */ #endif @@ -766,7 +766,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, #endif /* Effect the multiplication */ - /* The multiplcation proceeds using MFC's lazy-carry resolution */ + /* The multiplication proceeds using MFC's lazy-carry resolution */ /* algorithm from decNumber. First, the multiplication is */ /* effected, allowing accumulation of the partial products (which */ /* are in base-billion at each column position) into 64 bits */ @@ -2661,7 +2661,7 @@ decFloat * decFloatMultiply(decFloat *result, const decFloat *dfl, const decFloat *dfr, decContext *set) { bcdnum num; /* for final conversion */ - uByte bcdacc[DECPMAX9*18+1]; /* for coefficent in BCD */ + uByte bcdacc[DECPMAX9*18+1]; /* for coefficient in BCD */ if (DFISSPECIAL(dfl) || DFISSPECIAL(dfr)) { /* either is special? */ /* NaNs are handled as usual */ @@ -3072,7 +3072,7 @@ decFloat * decFloatQuantize(decFloat *result, } /* inexact rounding */ /* now clear zeros to the left so exactly DECPMAX digits will be */ - /* available in the coefficent -- the first word to the left was */ + /* available in the coefficient -- the first word to the left was */ /* cleared earlier for safe carry; now add any more needed */ if (drop>4) { UBFROMUI(BUFOFF-8, 0); /* must be at least 5 */ @@ -3091,7 +3091,7 @@ decFloat * decFloatQuantize(decFloat *result, ulsd=BUFOFF+DECPMAX-1; } else { /* padding will fit (but may still be too long) */ - /* final-word mask depends on endianess */ + /* final-word mask depends on endianness */ #if DECLITEND static const uInt dmask[]={0, 0x000000ff, 0x0000ffff, 0x00ffffff}; #else @@ -3833,7 +3833,7 @@ static uInt decToInt32(const decFloat *df, decContext *set, set->status|=DEC_Invalid_operation; /* Invalid or out of range */ return 0; } - /* get last twelve digits of the coefficent into hi & ho, base */ + /* get last twelve digits of the coefficient into hi & ho, base */ /* 10**9 (see GETCOEFFBILL): */ sourlo=DFWORD(&result, DECWORDS-1); lo=DPD2BIN0[sourlo&0x3ff] diff --git a/libdecnumber/decCommon.c b/libdecnumber/decCommon.c index 3e395cfa6eff..950bcd805bfd 100644 --- a/libdecnumber/decCommon.c +++ b/libdecnumber/decCommon.c @@ -252,7 +252,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, #if DECCHECK Int clen=ulsd-umsd+1; #if QUAD - #define COEXTRA 2 /* extra-long coefficent */ + #define COEXTRA 2 /* extra-long coefficient */ #else #define COEXTRA 0 #endif @@ -795,7 +795,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, uInt uiwork; /* for macros */ bcdnum num; /* collects data for finishing */ uInt error=DEC_Conversion_syntax; /* assume the worst */ - uByte buffer[ROUNDUP(DECSTRING+11, 8)]; /* room for most coefficents, */ + uByte buffer[ROUNDUP(DECSTRING+11, 8)]; /* room for most coefficients, */ /* some common rounding, +3, & pad */ #if DECTRACE /* printf("FromString %s ...\n", string); */ diff --git a/libdecnumber/decContext.c b/libdecnumber/decContext.c index 97b21c96ffaa..bf8e200664ed 100644 --- a/libdecnumber/decContext.c +++ b/libdecnumber/decContext.c @@ -170,7 +170,7 @@ uInt decContextGetStatus(decContext *context) { /* newstatus is the source for the bits to be restored */ /* mask indicates the bits to be restored (the status bit that */ /* corresponds to each 1 bit in the mask is set to the value of */ -/* the correspnding bit in newstatus) */ +/* the corresponding bit in newstatus) */ /* returns context */ /* */ /* No error is possible. */ diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c index 97f825dd9e6c..b25f82779fd3 100644 --- a/libdecnumber/decNumber.c +++ b/libdecnumber/decNumber.c @@ -3792,7 +3792,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { /* */ /* Addition, especially x=x+1, is speed-critical. */ /* The static buffer is larger than might be expected to allow for */ -/* calls from higher-level funtions (notable exp). */ +/* calls from higher-level functions (notable exp). */ /* ------------------------------------------------------------------ */ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set, @@ -4206,7 +4206,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* long subtractions. These are acc and var1 respectively. */ /* var1 is a copy of the lhs coefficient, var2 is the rhs coefficient.*/ /* The static buffers may be larger than might be expected to allow */ -/* for calls from higher-level funtions (notable exp). */ +/* for calls from higher-level functions (notable exp). */ /* ------------------------------------------------------------------ */ static decNumber * decDivideOp(decNumber *res, const decNumber *lhs, const decNumber *rhs, @@ -5571,7 +5571,7 @@ const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208, /* would certainly save at least one if it were made ten times */ /* bigger, too (for truncated fractions 0.100 through 0.999). */ /* However, for most practical evaluations, at least four or five */ -/* iterations will be neede -- so this would only speed up by */ +/* iterations will be needed -- so this would only speed up by */ /* 20-25% and that probably does not justify increasing the table */ /* size. */ /* */ @@ -8091,7 +8091,7 @@ static void *decMalloc(size_t n) { uInt uiwork; /* for macros */ alloc=malloc(size); /* -> allocated storage */ - if (alloc==NULL) return NULL; /* out of strorage */ + if (alloc==NULL) return NULL; /* out of storage */ b0=(uByte *)alloc; /* as bytes */ decAllocBytes+=n; /* account for storage */ UBFROMUI(alloc, n); /* save n */ diff --git a/libdecnumber/decNumberLocal.h b/libdecnumber/decNumberLocal.h index 618d8f703701..c0f02627d61c 100644 --- a/libdecnumber/decNumberLocal.h +++ b/libdecnumber/decNumberLocal.h @@ -173,7 +173,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* ---------------------------------------------------------------- */ - /* Definitions for arbitary-precision modules (only valid after */ + /* Definitions for arbitrary-precision modules (only valid after */ /* decNumber.h has been included) */ /* ---------------------------------------------------------------- */
