2024-03-25 20:33:02 +00:00
|
|
|
#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-25 20:33:02 +00:00
|
|
|
|
|
|
|
#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
|