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) */
13 #include <limits.h> /* for PATH_MAX */
18 #ifdef HAVE_SYS_STAT_H
19 #include <sys/stat.h> /* for fstat(2) */
23 #include <unistd.h> /* for unlink(2) */
36 #define snprintf _snprintf
37 #define vsnprintf _vsnprintf
39 #include <glob.h> /* for glob(3) */
41 #include <fcntl.h> /* for open(2) */
43 #include "asn1compiler.h"
44 #include "asn1_namespace.h"
46 struct asn1c_ioc_table_and_objset_s;
48 typedef struct arg_s {
50 enum asn1c_flags flags;
52 void (*logger_cb)(int _severity, const char *fmt, ...);
54 int (*default_cb)(struct arg_s *, const struct asn1c_ioc_table_and_objset_s *opt);
56 struct compiler_streams *target;
68 #define LOG(ll, fmt, args...) do { \
69 arg->logger_cb(ll, fmt, ##args); \
71 #define DEBUG(fmt, args...) do { \
72 if(arg->flags & A1C_DEBUG) \
73 LOG(-1, fmt, ##args); \
75 #define WARNING(fmt, args...) LOG(0, fmt, ##args);
76 #define FATAL(fmt, args...) LOG(1, fmt, ##args);
78 #endif /* ASN1_COMPILER_INTERNAL_H */