ccm/lib/commons.h

25 lines
484 B
C

#ifndef CCM_COMMONS_H
#define CCM_COMMONS_H
#include <math.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#define CCM_STRLEN 256
#define CCM_ENUM_ENUM(X) X
#define CCM_ENUM_STR(X) #X
#define CCM_ENUM_H(PREFIX, DEF) \
typedef enum { DEF(CCM_ENUM_ENUM) } PREFIX ; \
extern char const* PREFIX ## Str []
#define CCM_ENUM_C(PREFIX, DEF) \
char const* PREFIX ## Str [] = {DEF(CCM_ENUM_STR)}
#endif