From 6e6b888e31f9a4c245f621ccd91d3fce5ac88463 Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Wed, 5 Feb 2014 00:44:55 +0200
Subject: [PATCH] Add generic MIN()/MAX() functions.

---
 py/misc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/py/misc.h b/py/misc.h
index 52498c70b..f58a9f669 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -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)
-- 
GitLab