include/common.h
branchpyrit
changeset 22 76b7bd51d64a
parent 20 f22952603f29
child 30 33f95441790e
equal deleted inserted replaced
21:79b516a3803d 22:76b7bd51d64a
       
     1 #ifndef COMMON_H
       
     2 #define COMMON_H
       
     3 
       
     4 #include <stdio.h>
       
     5 #include <stdarg.h>
       
     6 #include <float.h>
       
     7 
       
     8 #ifdef PYRIT_DOUBLE
       
     9 # define Float double
       
    10 # define Eps DBL_EPSILON
       
    11 # define Inf DBL_MAX
       
    12 #else
       
    13 # define Float float
       
    14 # define Eps 1e-6
       
    15 # define Inf FLT_MAX
       
    16 #endif
       
    17 
       
    18 inline void infomsg(const char *format, ...)
       
    19 {
       
    20 #ifndef PYRIT_QUIET
       
    21 	va_list ap;
       
    22 	va_start(ap, format);
       
    23 	vprintf(format, ap);
       
    24 	va_end(ap);
       
    25 #endif
       
    26 }
       
    27 
       
    28 #endif