summaryrefslogtreecommitdiffstats
path: root/qemu/libdecnumber
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/libdecnumber')
-rw-r--r--qemu/libdecnumber/decContext.c5
-rw-r--r--qemu/libdecnumber/decNumber.c13
-rw-r--r--qemu/libdecnumber/dpd/decimal128.c3
-rw-r--r--qemu/libdecnumber/dpd/decimal32.c3
-rw-r--r--qemu/libdecnumber/dpd/decimal64.c3
5 files changed, 10 insertions, 17 deletions
diff --git a/qemu/libdecnumber/decContext.c b/qemu/libdecnumber/decContext.c
index 8b6ae21be..7d97a65ac 100644
--- a/qemu/libdecnumber/decContext.c
+++ b/qemu/libdecnumber/decContext.c
@@ -35,8 +35,7 @@
/* context structures. */
/* ------------------------------------------------------------------ */
-#include <string.h> /* for strcmp */
-#include <stdio.h> /* for printf if DECCHECK */
+#include "qemu/osdep.h"
#include "libdecnumber/dconfig.h"
#include "libdecnumber/decContext.h"
#include "libdecnumber/decNumberLocal.h"
@@ -186,7 +185,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/qemu/libdecnumber/decNumber.c b/qemu/libdecnumber/decNumber.c
index 58211e7af..c9e7807f8 100644
--- a/qemu/libdecnumber/decNumber.c
+++ b/qemu/libdecnumber/decNumber.c
@@ -166,10 +166,7 @@
/* ** -- raise to the power */
/* ------------------------------------------------------------------ */
-#include <stdlib.h> /* for malloc, free, etc. */
-#include <stdio.h> /* for printf [if needed] */
-#include <string.h> /* for strcpy */
-#include <ctype.h> /* for lower */
+#include "qemu/osdep.h"
#include "libdecnumber/dconfig.h"
#include "libdecnumber/decNumber.h"
#include "libdecnumber/decNumberLocal.h"
@@ -2238,7 +2235,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
/* if a negative power the constant 1 is needed, and if not subset */
/* invert the lhs now rather than inverting the result later */
if (decNumberIsNegative(rhs)) { /* was a **-n [hence digits>0] */
- decNumber *inv=invbuff; /* asssume use fixed buffer */
+ decNumber *inv=invbuff; /* assume use fixed buffer */
decNumberCopy(&dnOne, dac); /* dnOne=1; [needed now or later] */
#if DECSUBSET
if (set->extended) { /* need to calculate 1/lhs */
@@ -3849,7 +3846,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 (notably exp). */
/* ------------------------------------------------------------------ */
static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set,
@@ -4263,7 +4260,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 (notably exp). */
/* ------------------------------------------------------------------ */
static decNumber * decDivideOp(decNumber *res,
const decNumber *lhs, const decNumber *rhs,
@@ -5254,7 +5251,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* exp(-x) where x can be the tiniest number (Ntiny). */
/* */
/* 2. Normalizing x to be <=0.1 (instead of <=1) reduces loop */
-/* iterations by appoximately a third with additional (although */
+/* iterations by approximately a third with additional (although */
/* diminishing) returns as the range is reduced to even smaller */
/* fractions. However, h (the power of 10 used to correct the */
/* result at the end, see below) must be kept <=8 as otherwise */
diff --git a/qemu/libdecnumber/dpd/decimal128.c b/qemu/libdecnumber/dpd/decimal128.c
index 7551b7caa..ca4764e54 100644
--- a/qemu/libdecnumber/dpd/decimal128.c
+++ b/qemu/libdecnumber/dpd/decimal128.c
@@ -39,8 +39,7 @@
/* */
/* Error handling is the same as decNumber (qv.). */
/* ------------------------------------------------------------------ */
-#include <string.h> /* [for memset/memcpy] */
-#include <stdio.h> /* [for printf] */
+#include "qemu/osdep.h"
#include "libdecnumber/dconfig.h"
#define DECNUMDIGITS 34 /* make decNumbers with space for 34 */
diff --git a/qemu/libdecnumber/dpd/decimal32.c b/qemu/libdecnumber/dpd/decimal32.c
index 095ab7565..53f29789d 100644
--- a/qemu/libdecnumber/dpd/decimal32.c
+++ b/qemu/libdecnumber/dpd/decimal32.c
@@ -39,8 +39,7 @@
/* */
/* Error handling is the same as decNumber (qv.). */
/* ------------------------------------------------------------------ */
-#include <string.h> /* [for memset/memcpy] */
-#include <stdio.h> /* [for printf] */
+#include "qemu/osdep.h"
#include "libdecnumber/dconfig.h"
#define DECNUMDIGITS 7 /* make decNumbers with space for 7 */
diff --git a/qemu/libdecnumber/dpd/decimal64.c b/qemu/libdecnumber/dpd/decimal64.c
index 8256084e9..481617641 100644
--- a/qemu/libdecnumber/dpd/decimal64.c
+++ b/qemu/libdecnumber/dpd/decimal64.c
@@ -39,8 +39,7 @@
/* */
/* Error handling is the same as decNumber (qv.). */
/* ------------------------------------------------------------------ */
-#include <string.h> /* [for memset/memcpy] */
-#include <stdio.h> /* [for printf] */
+#include "qemu/osdep.h"
#include "libdecnumber/dconfig.h"
#define DECNUMDIGITS 16 /* make decNumbers with space for 16 */