include/common.h
branchpyrit
changeset 93 96d65f841791
parent 92 9af5c039b678
child 94 4c8abb8977dc
--- a/include/common.h	Mon May 05 15:31:14 2008 +0200
+++ b/include/common.h	Tue May 06 09:39:58 2008 +0200
@@ -30,7 +30,6 @@
 #include "config.h"
 
 #include <stdio.h>
-#include <stdarg.h>
 #include <math.h>
 #include <float.h>
 #include <pthread.h>
@@ -42,10 +41,12 @@
 # define Float double
 # define Eps DBL_EPSILON
 # define Inf DBL_MAX
+# define PI M_PI
 #else
 # define Float float
 # define Eps 1e-6f
 # define Inf FLT_MAX
+# define PI (float)M_PI
 #endif
 
 // enable M_* constants in MSVC
@@ -61,24 +62,7 @@
 */
 extern int pyrit_verbosity;
 
-inline void dbgmsg(const int vlevel, const char *format, ...)
-{
-	static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-	if (pyrit_verbosity >= vlevel)
-	{
-		if (pyrit_verbosity >= 4)
-			pthread_mutex_lock(&mutex);
-
-		va_list ap;
-		va_start(ap, format);
-		vprintf(format, ap);
-		va_end(ap);
-		fflush(stdout);
-
-		if (pyrit_verbosity >= 4)
-			pthread_mutex_unlock(&mutex);
-	}
-}
+void dbgmsg(const int vlevel, const char *format, ...);
 
 template<typename Type> const Type &min3(const Type &a, const Type &b, const Type &c)
 {