include/common.h
branchpyrit
changeset 22 76b7bd51d64a
parent 20 f22952603f29
child 30 33f95441790e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/common.h	Mon Dec 03 01:49:23 2007 +0100
@@ -0,0 +1,28 @@
+#ifndef COMMON_H
+#define COMMON_H
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <float.h>
+
+#ifdef PYRIT_DOUBLE
+# define Float double
+# define Eps DBL_EPSILON
+# define Inf DBL_MAX
+#else
+# define Float float
+# define Eps 1e-6
+# define Inf FLT_MAX
+#endif
+
+inline void infomsg(const char *format, ...)
+{
+#ifndef PYRIT_QUIET
+	va_list ap;
+	va_start(ap, format);
+	vprintf(format, ap);
+	va_end(ap);
+#endif
+}
+
+#endif