Add generic MIN()/MAX() functions.

genexit-inst
Paul Sokolovsky 2014-02-05 00:44:55 +02:00
parent e0723497b3
commit 6e6b888e31
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,11 @@
typedef unsigned char byte;
typedef unsigned int uint;
/** generic ops *************************************************/
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))
/** memomry allocation ******************************************/
// TODO make a lazy m_renew that can increase by a smaller amount than requested (but by at least 1 more element)