mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
box-drawings: handle architecture with soft-float
Currently, architecture using soft-floats doesn't support instructions FE_INVALID, FE_DIVBYZERO, FE_OVERFLOW and FE_UNDERFLOW and so building on those architectures results with a build error. As the sqrt math function should set errno to EDOM if an error occurs, fetestexcept shouldn't be mandatory. This commit removes the float environment error handling. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
This commit is contained in:
parent
8de378963b
commit
9443ac7e29
1 changed files with 1 additions and 3 deletions
|
|
@ -1462,14 +1462,12 @@ draw_box_drawings_light_arc(struct buf *buf, char32_t wc)
|
||||||
*/
|
*/
|
||||||
for (double i = y_min*16; i <= y_max*16; i++) {
|
for (double i = y_min*16; i <= y_max*16; i++) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
feclearexcept(FE_ALL_EXCEPT);
|
|
||||||
|
|
||||||
double y = i / 16.;
|
double y = i / 16.;
|
||||||
double x = circle_hemisphere * sqrt(c_r2 - (y - c_y) * (y - c_y)) + c_x;
|
double x = circle_hemisphere * sqrt(c_r2 - (y - c_y) * (y - c_y)) + c_x;
|
||||||
|
|
||||||
/* See math_error(7) */
|
/* See math_error(7) */
|
||||||
if (errno != 0 ||
|
if (errno != 0)
|
||||||
fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW))
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue