From 0a034fd5ea6e7d2226434ee4e5e55fedfc35c35a Mon Sep 17 00:00:00 2001 From: Harald Oehlmann Date: Wed, 2 Mar 2016 11:05:22 +0100 Subject: [PATCH] Re-replace ceilf() by ceil(). ceilf is better but is C99 which is not supported by my MS-VC6 cpmpiler. I also suppose, we loose friends if we will rely on C99 features. If someone has a solution to test if ceilf() exists and use it in this case, I have no troubble, but we need a fall-back. --- backend/dmatrix.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/dmatrix.c b/backend/dmatrix.c index 0cdf1e63..04361018 100755 --- a/backend/dmatrix.c +++ b/backend/dmatrix.c @@ -339,12 +339,12 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen, do { if (sp == (sourcelen - 1)) { /* At the end of data ... step (k) */ - ascii_count = ceilf(ascii_count); - b256_count = ceilf(b256_count); - edf_count = ceilf(edf_count); - text_count = ceilf(text_count); - x12_count = ceilf(x12_count); - c40_count = ceilf(c40_count); + ascii_count = ceil(ascii_count); + b256_count = ceil(b256_count); + edf_count = ceil(edf_count); + text_count = ceil(text_count); + x12_count = ceil(x12_count); + c40_count = ceil(c40_count); best_count = c40_count; best_scheme = DM_C40; // (k)(7) @@ -379,9 +379,9 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen, ascii_count += 0.5F; // (l)(1) } else { if (inputData[sp] > 127) { - ascii_count = ceilf(ascii_count) + 2.0F; // (l)(2) + ascii_count = ceil(ascii_count) + 2.0F; // (l)(2) } else { - ascii_count = ceilf(ascii_count) + 1.0F; // (l)(3) + ascii_count = ceil(ascii_count) + 1.0F; // (l)(3) } }