2014-05-16 00:33:59 -04:00
|
|
|
/*
|
2014-05-16 08:22:25 -04:00
|
|
|
* r3_define.h
|
2014-05-16 00:33:59 -04:00
|
|
|
* Copyright (C) 2014 c9s <c9s@c9smba.local>
|
|
|
|
*
|
|
|
|
* Distributed under terms of the MIT license.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DEFINE_H
|
|
|
|
#define DEFINE_H
|
|
|
|
|
2014-05-16 14:51:21 -04:00
|
|
|
#ifndef bool
|
2014-05-16 00:33:59 -04:00
|
|
|
typedef unsigned char bool;
|
2014-05-16 14:51:21 -04:00
|
|
|
#endif
|
|
|
|
#ifndef FALSE
|
|
|
|
# define FALSE 0
|
|
|
|
#endif
|
|
|
|
#ifndef TRUE
|
|
|
|
# define TRUE 1
|
|
|
|
#endif
|
2014-05-16 00:33:59 -04:00
|
|
|
|
2014-05-16 06:03:52 -04:00
|
|
|
// #define DEBUG 1
|
2014-05-16 02:36:48 -04:00
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
#define info(fmt, ...) \
|
|
|
|
do { fprintf(stderr, fmt, __VA_ARGS__); } while (0)
|
|
|
|
|
|
|
|
#define debug(fmt, ...) \
|
|
|
|
do { fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
|
|
|
|
__LINE__, __func__, __VA_ARGS__); } while (0)
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define info(...);
|
|
|
|
#define debug(...);
|
|
|
|
#endif
|
|
|
|
|
2014-05-16 00:33:59 -04:00
|
|
|
#endif /* !DEFINE_H */
|