mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
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.
This commit is contained in:
parent
4fb0bb96d9
commit
0a034fd5ea
@ -339,12 +339,12 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen,
|
|||||||
do {
|
do {
|
||||||
if (sp == (sourcelen - 1)) {
|
if (sp == (sourcelen - 1)) {
|
||||||
/* At the end of data ... step (k) */
|
/* At the end of data ... step (k) */
|
||||||
ascii_count = ceilf(ascii_count);
|
ascii_count = ceil(ascii_count);
|
||||||
b256_count = ceilf(b256_count);
|
b256_count = ceil(b256_count);
|
||||||
edf_count = ceilf(edf_count);
|
edf_count = ceil(edf_count);
|
||||||
text_count = ceilf(text_count);
|
text_count = ceil(text_count);
|
||||||
x12_count = ceilf(x12_count);
|
x12_count = ceil(x12_count);
|
||||||
c40_count = ceilf(c40_count);
|
c40_count = ceil(c40_count);
|
||||||
|
|
||||||
best_count = c40_count;
|
best_count = c40_count;
|
||||||
best_scheme = DM_C40; // (k)(7)
|
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)
|
ascii_count += 0.5F; // (l)(1)
|
||||||
} else {
|
} else {
|
||||||
if (inputData[sp] > 127) {
|
if (inputData[sp] > 127) {
|
||||||
ascii_count = ceilf(ascii_count) + 2.0F; // (l)(2)
|
ascii_count = ceil(ascii_count) + 2.0F; // (l)(2)
|
||||||
} else {
|
} else {
|
||||||
ascii_count = ceilf(ascii_count) + 1.0F; // (l)(3)
|
ascii_count = ceil(ascii_count) + 1.0F; // (l)(3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user