include/common.h
branchpyrit
changeset 30 33f95441790e
parent 22 76b7bd51d64a
child 34 28f6e8b9d5d1
equal deleted inserted replaced
29:574c34441a1c 30:33f95441790e
    13 # define Float float
    13 # define Float float
    14 # define Eps 1e-6
    14 # define Eps 1e-6
    15 # define Inf FLT_MAX
    15 # define Inf FLT_MAX
    16 #endif
    16 #endif
    17 
    17 
    18 inline void infomsg(const char *format, ...)
    18 /* verbosity level:
       
    19 0: only errors (E)
       
    20 1: major status messages (*)
       
    21 2: minor status, progress (-)
       
    22 3: debug messages (D)
       
    23 4: more debug
       
    24 default = 2
       
    25 */
       
    26 extern int pyrit_verbosity;
       
    27 
       
    28 inline void dbgmsg(const int vlevel, const char *format, ...)
    19 {
    29 {
    20 #ifndef PYRIT_QUIET
    30 	if (pyrit_verbosity >= vlevel)
    21 	va_list ap;
    31 	{
    22 	va_start(ap, format);
    32 		va_list ap;
    23 	vprintf(format, ap);
    33 		va_start(ap, format);
    24 	va_end(ap);
    34 		vprintf(format, ap);
    25 #endif
    35 		va_end(ap);
       
    36 		fflush(stdout);
       
    37 	}
    26 }
    38 }
    27 
    39 
    28 #endif
    40 #endif