Common definitions. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include "thirdparty/logger.h"
#include <unistd.h>
Defines | |
#define | _(s) s |
Wrapper for strings that could be translated. | |
#define | LOG(LVL,...) log_log(LVL,NULL,__FUNCTION__,0,__VA_ARGS__) |
Logging macro, outputs function name. | |
#define | LOGERR 1 |
Log level error. | |
#define | LOGWARN 2 |
Log level warning. | |
#define | LOGINFO 3 |
Log level info. | |
#define | LOGVERBOSE 4 |
Log level verbose. | |
#define | RET_FUN_FAILED 0 |
Function failed. | |
#define | RET_FUN_SUCCESS 1 |
Function success. | |
#define | LONGEST_PATH 2048 |
Size of path buffers. | |
#define | PATH_SEP '/' |
Platform dependent path separator. | |
#define | RSG_RCFILE ".redshiftgrc" |
Configuration file name. | |
#define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
Minimum of two values. | |
#define | MAX(x, y) ((x) > (y) ? (x) : (y)) |
Maximum of two values. | |
#define | SIZEOF(X) (sizeof(X)/sizeof(X[0])) |
Size of statically allocated arrays. | |
#define | SLEEP(X) usleep(1000*X) |
Platform dependent sleep wrapper. |
Common definitions.