mirror of https://github.com/dirtbags/fluffy.git
my changes to the utilities
This commit is contained in:
parent
eaca00daa3
commit
24c962c56d
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef __NETRE_H__
|
||||||
|
#define __NETRE_H__
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#define WHICHOUT(x) (x ? stderr : stdout)
|
||||||
|
|
||||||
|
#ifdef DEBUGSTMTS
|
||||||
|
/*@notfunction@*/
|
||||||
|
# define DDUMPf(fmt, args...) fprintf(stderr, "[@%s:%s():%d] " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##args)
|
||||||
|
#else
|
||||||
|
/*@notfunction@*/
|
||||||
|
# define DDUMPf(fmt, args...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DDUMP(v) DDUMPf("%s", v)
|
||||||
|
#define DDUMP_d(v) DDUMPf("%s = %d", #v, v)
|
||||||
|
#define DDUMP_u(v) DDUMPf("%s = %u", #v, v)
|
||||||
|
#define DDUMP_x(v) DDUMPf("%s = 0x%x", #v, v)
|
||||||
|
#define DDUMP_s(v) DDUMPf("%s = %s", #v, v)
|
||||||
|
#define DDUMP_c(v) DDUMPf("%s = %c", #v, v)
|
||||||
|
#define DDUMP_p(v) DDUMPf("%s = %p", #v, v)
|
||||||
|
|
||||||
|
#endif /* __NETRE_H__ */
|
Loading…
Reference in New Issue