1
#ifndef _ASN1_COMPILER_INTERNAL_H_
2
#define _ASN1_COMPILER_INTERNAL_H_
10
#include <string.h> /* for strlen(3) and memset(3) */
11
#include <ctype.h> /* for isalnum(3) */
12
#include <sys/types.h> /* for fstat(2) */
17
#ifdef HAVE_SYS_STAT_H
18
#include <sys/stat.h> /* for fstat(2) */
22
#include <unistd.h> /* for unlink(2) */
29
#define alloca _alloca
30
#define snprintf _snprintf
31
#define vsnprintf _vsnprintf
33
#include <fcntl.h> /* for open(2) */
34
#include <glob.h> /* for glob(3) */
37
#ifdef HAVE_SYS_PARAM_H
38
#include <sys/param.h> /* For MAXPATHLEN */
41
#include "asn1compiler.h"
43
typedef struct arg_s {
45
enum asn1c_flags flags;
47
void (*logger_cb)(int _severity, const char *fmt, ...);
49
int (*default_cb)(struct arg_s *);
51
struct compiler_streams *target;
63
#define LOG(ll, fmt, args...) do { \
64
arg->logger_cb(ll, fmt, ##args); \
66
#define DEBUG(fmt, args...) do { \
67
if(arg->flags & A1C_DEBUG) \
68
LOG(-1, fmt, ##args); \
70
#define WARNING(fmt, args...) LOG(0, fmt, ##args);
71
#define FATAL(fmt, args...) LOG(1, fmt, ##args);
73
#endif /* _ASN1_COMPILER_INTERNAL_H_ */