roza/lib/commons.h

32 lines
650 B
C
Raw Normal View History

2023-12-09 17:24:41 +00:00
#ifndef RZ_COMMONS_H
#define RZ_COMMONS_H
2023-12-15 21:31:01 +00:00
#include <math.h>
2023-12-09 17:24:41 +00:00
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <conf.h>
#include "str.h"
#define RZ_STR_LIMIT 1024
2023-12-09 17:24:41 +00:00
#define RZ_STACK_LIMIT 1024
#define RZ_MAX_TYPES 256
#define RZ_NO_PARAM (-1)
typedef int param_t;
#define RZ_ENUM_ID(X) X
#define RZ_ENUM_STR(X) #X
#define RZ_ENUM_H(PREFIX, NAME) \
typedef enum PREFIX { NAME(RZ_ENUM_ID) } PREFIX; \
extern char const* PREFIX ## Str []
#define RZ_ENUM_C(PREFIX, NAME) \
char const* PREFIX ## Str [] = { NAME(RZ_ENUM_STR) }
#endif