roza/lib/commons.h

32 lines
649 B
C

#ifndef RZ_COMMONS_H
#define RZ_COMMONS_H
#include <math.h>
#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 256
#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