moka/lib/commons.h

27 lines
507 B
C
Raw Normal View History

#ifndef MK_COMMON_H
#define MK_COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
2024-03-26 18:31:33 +00:00
#include <ctype.h>
2024-03-30 17:14:26 +00:00
#include <math.h>
typedef size_t MOKA;
#define MK_STRLEN 4096
#define MK_ENUM_ENUM(X) X
#define MK_ENUM_STRING(X) #X
#define MK_ENUM_H(PREFIX, DEF) \
typedef enum {DEF(MK_ENUM_ENUM)} PREFIX; \
extern char const* PREFIX ## Str []
#define MK_ENUM_C(PREFIX, DEF) \
char const* PREFIX ## Str [] = {DEF(MK_ENUM_STRING)}
#endif