commit 907362e9d8baf18b091135d220d02e04286502fc
parent c5ccdbae6b3269949d5975e399049936647a127f
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date: Thu, 11 Jun 2015 19:34:55 +0200
Remove MIN macro and use math.h's 'fmin' instead
Diffstat:
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/ansilove.c b/src/ansilove.c
@@ -9,6 +9,7 @@
// See the file LICENSE for details.
//
+#include <math.h>
#include "ansilove.h"
// shared method for drawing characters
@@ -663,7 +664,7 @@ void alAnsiLoader(char *input, char output[], char retinaout[], char font[], cha
}
if (isDizFile == true) {
- columns = MIN(position_x_max,80);
+ columns = fmin(position_x_max,80);
}
// create that damn thingy
diff --git a/src/ansilove.h b/src/ansilove.h
@@ -23,10 +23,6 @@
#ifndef ansilove_h
#define ansilove_h
-#if !defined(MIN)
-#define MIN(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __a : __b; })
-#endif
-
// prototypes
void alDrawChar(gdImagePtr im, const unsigned char *font_data, int32_t int_bits,
int32_t font_size_x, int32_t font_size_y, int32_t position_x, int32_t position_y,