From 95fa0de49fa64f65068361ca92ff8a88d4d86073 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Sat, 21 Jul 2018 12:45:19 -0400 Subject: [PATCH] Fixed ARM build issue --- CHANGELOG.org | 1 + cc_reader.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 58c4f8e..1c3653b 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -40,6 +40,7 @@ Correct bug in how \" is treated Clean up of & when && should have been used Made test22 for consistent Fixed !c->a regression +Fixed ARM platform build ** Removed Removed need for string copying in M2-Planet diff --git a/cc_reader.c b/cc_reader.c index 75733b8..33263f3 100644 --- a/cc_reader.c +++ b/cc_reader.c @@ -21,7 +21,7 @@ struct token_list* token; int line; char* file; -char clearWhiteSpace(char c) +int clearWhiteSpace(int c) { if((32 == c) || (9 == c)) return clearWhiteSpace(fgetc(input)); else if (10 == c) @@ -33,14 +33,14 @@ char clearWhiteSpace(char c) } int string_index; -char consume_byte(struct token_list* current, char c) +int consume_byte(struct token_list* current, int c) { current->s[string_index] = c; string_index = string_index + 1; return fgetc(input); } -char consume_word(struct token_list* current, char c, char frequent) +int consume_word(struct token_list* current, int c, int frequent) { int escape = FALSE; do @@ -67,7 +67,7 @@ void fixup_label(struct token_list* current) } while(0 != hold); } -char preserve_keyword(struct token_list* current, char c) +int preserve_keyword(struct token_list* current, int c) { while((('a' <= c) & (c <= 'z')) | (('A' <= c) & (c <= 'Z')) | (('0' <= c) & (c <= '9')) | (c == '_')) { @@ -81,7 +81,7 @@ char preserve_keyword(struct token_list* current, char c) return c; } -char preserve_symbol(struct token_list* current, char c) +int preserve_symbol(struct token_list* current, int c) { while((c == '<') | (c == '=') | (c == '>') | (c == '|') | (c == '&') | (c == '!') | (c == '-')) { @@ -90,7 +90,7 @@ char preserve_symbol(struct token_list* current, char c) return c; } -char purge_macro(int ch) +int purge_macro(int ch) { while(10 != ch) ch = fgetc(input); return ch;