[pulseaudio-commits] r1876 - /branches/lennart/src/pulsecore/macro.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Sep 20 17:14:21 PDT 2007


Author: lennart
Date: Fri Sep 21 02:14:20 2007
New Revision: 1876

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1876&root=pulseaudio&view=rev
Log:
add CLAMP macro

Modified:
    branches/lennart/src/pulsecore/macro.h

Modified: branches/lennart/src/pulsecore/macro.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/macro.h?rev=1876&root=pulseaudio&r1=1875&r2=1876&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/macro.h (original)
+++ branches/lennart/src/pulsecore/macro.h Fri Sep 21 02:14:20 2007
@@ -28,7 +28,7 @@
 #include <unistd.h>
 #include <assert.h>
 #include <limits.h>
-#include <unistd.h>  
+#include <unistd.h>
 
 #include <pulsecore/log.h>
 
@@ -70,6 +70,10 @@
 
 #ifndef MIN
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef CLAMP
+#define CLAMP(x, low, high)  (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
 #endif
 
 /* This type is not intended to be used in exported APIs! Use classic "int" there! */




More information about the pulseaudio-commits mailing list