Introduce shared/defines.h to collect commonly used macros. For now
it defines min() / max() macros.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include "shared/defines.h"
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE 1
|
||||
#endif
|
||||
@@ -61,12 +63,4 @@ const char *get_hostname(void);
|
||||
const char *get_sysname(void);
|
||||
const char *get_sysrelease(void);
|
||||
|
||||
#ifndef min
|
||||
# define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef max
|
||||
# define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#ifndef LCDVC_H
|
||||
#define LCDVC_H
|
||||
|
||||
#include "shared/defines.h"
|
||||
|
||||
#define CHAIN(e,f) { if( e>=0 ) { e=(f); }}
|
||||
#define CHAIN_END(e) { if( e<0 ) { report( RPT_CRIT,"Critical error, abort"); exit(e); }}
|
||||
|
||||
#define min(a,b) ((a)<(b))?(a):(b)
|
||||
|
||||
#define UNSET_INT -1
|
||||
#define UNSET_STR "\01"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user