} lang_features_t;
/* the current C mode/dialect */
-extern lang_features_t c_mode;
+extern unsigned int c_mode;
/* the 'machine size', 16, 32 or 64 bit */
extern unsigned int machine_size;
#define fdopen(fd, mode) _fdopen(fd, mode)
#define popen(cmd, mode) _popen(cmd, mode)
#define pclose(file) _pclose(file)
+#define unlink(filename) _unlink(filename)
#else
#include <unistd.h>
#endif
/** The current c mode/dialect. */
-lang_features_t c_mode = _C89 | _ANSI | _C99 | _GNUC;
+unsigned int c_mode = _C89 | _ANSI | _C99 | _GNUC;
/** The 'machine size', 16, 32 or 64 bit, 32bit is the default. */
unsigned int machine_size = 32;
/* parse rest of options */
lang_standard_t standard = STANDARD_DEFAULT;
- lang_features_t features_on = 0;
- lang_features_t features_off = 0;
+ unsigned features_on = 0;
+ unsigned features_off = 0;
filetype_t forced_filetype = FILETYPE_AUTODETECT;
bool help_displayed = false;
bool argument_errors = false;
if (input.bufpos >= input.bufend) {
size_t s = fread(input.buf + MAX_PUTBACK, 1,
sizeof(input.buf) - MAX_PUTBACK, input.file);
- if(s == 0) {
+ if (s == 0) {
CC = EOF;
return;
}
}
}
-static void eat_pp(preprocessor_token_type_t type)
+static void eat_pp(int type)
{
(void) type;
assert(pp_token.type == type);
}
}
-void print_pp_token_type(FILE *f, preprocessor_token_type_t token_type)
+void print_pp_token_type(FILE *f, int token_type)
{
- if(token_type == TP_EOF) {
+ if (token_type == TP_EOF) {
fputs("end of file", f);
return;
}
- if(token_type == TP_ERROR) {
+ if (token_type == TP_ERROR) {
fputs("error", f);
return;
}
int token_symbols_len = TP_LAST_TOKEN;
- if(token_type < 0 || token_type >= token_symbols_len) {
+ if (token_type < 0 || token_type >= token_symbols_len) {
fputs("invalid token", f);
return;
}
const symbol_t *symbol = pp_token_symbols[token_type];
- if(symbol != NULL) {
+ if (symbol != NULL) {
fprintf(f, "%s", symbol->string);
} else {
if(token_type >= 0 && token_type < 256) {
void print_token_type(FILE *out, token_type_t token_type);
void print_token(FILE *out, const token_t *token);
-void print_pp_token_type(FILE *out, preprocessor_token_type_t type);
+void print_pp_token_type(FILE *out, int type);
void print_pp_token(FILE *out, const token_t *token);
#endif