#pragma once /** * @file lephisto.h * * @brief Header file with generic functions and lephisto-specifics. */ #define APPNAME "Lephisto" /**< Application name. */ #define MALLOC_L(type)(malloc(sizeof(type))) /**< Deprecated. */ #define CALLOC_L(type)(calloc(1, sizeof(type))) /**< Deprecated. */ #define ABS(x) (((x)<0)?-(x):(x)) /**< Return absulute value. */ #define FABS(x) (((x)<0.)?-(x):(x)) /**< Return float absolute value. */ #define MAX(x,y) (((x)>(y))?(x):(y)) /**< Return maximum. */ #define MIN(x,y) (((x)>(y))?(y):(x)) /**< Return minumum. */ #define pow2(x) ((x)*(x)) /**< ^2 */ /* Max filename path. */ #ifndef PATH_MAX # define PATH_MAX 256 /**< If not already defined. */ #endif #ifndef M_PI #define M_PI 3.14159265358979323846 /**< If not already defined. */ #endif char* lephisto_version(void);