shithub: scc

ref: 50dbcccb8762cbad40ebd87b42787c15d68c7c5b
dir: /cc.h/

View raw version
#ifndef CC_H
#define CC_H

#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))

extern unsigned linenum;
extern unsigned columnum;
extern const char *filename;


struct user_opt {
	unsigned char implicit;
	unsigned char c99;
	unsigned char mixdcls;
	unsigned char useless;
	unsigned char repeat;
	unsigned char charsign;
};

extern  struct user_opt options;

extern void error(const char *fmt, ...);
extern void die(const char *fmt, ...);
extern void warn(char flag, const char *fmt, ...);
extern void *xmalloc(size_t size);
extern void *xcalloc(size_t nmemb, size_t size);
extern char *xstrdup(const char *s);
extern void *xrealloc(void *buff, register size_t size);
#endif