Mercurial > hg > CbC > old > device
changeset 852:4640447d80ef
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 21 Nov 2011 19:52:25 +0900 |
parents | beb59eb56bb4 |
children | 280815f3111a |
files | mc-code-i64.c mc-codegen.c mc-macro.c mc-macro.h mc-parse.c |
diffstat | 5 files changed, 21 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-i64.c Sat Nov 19 18:43:00 2011 +0900 +++ b/mc-code-i64.c Mon Nov 21 19:52:25 2011 +0900 @@ -215,6 +215,8 @@ "#define __APPLE__ 1\n" "#define __GNUC__ 4\n" "#define __BIG_ENDIAN__ 1\n" +"#define __DARWIN_ALIAS_STARTING(a,b,c) \n" +"#define __DARWIN_ALIAS(a) \n" #endif ;
--- a/mc-codegen.c Sat Nov 19 18:43:00 2011 +0900 +++ b/mc-codegen.c Mon Nov 21 19:52:25 2011 +0900 @@ -1042,7 +1042,7 @@ /* source (after) list2(tag,disp) */ /* source list list3(e,cdr,sz) */ -#define DEBUG_PARALLEL_ASSIGN 1 +#define DEBUG_PARALLEL_ASSIGN 0 static int is_writable(int);
--- a/mc-macro.c Sat Nov 19 18:43:00 2011 +0900 +++ b/mc-macro.c Mon Nov 21 19:52:25 2011 +0900 @@ -326,14 +326,14 @@ } getch(); } - if (in_comment==1) { getline_(); getch(); } + if (in_comment==1) { getline1(); getch(); } } while(in_comment==1); in_comment=0; return 0; } /* - getline_ from chptr or chinput (for internal source) + getline1 from chptr or chinput (for internal source) with macro processing generate comment generate ST_COMMENT parse tree, in inline mode @@ -347,7 +347,7 @@ // another cheap area. extern void -getline_(void) +getline1(void) { int i; int c = 0; @@ -620,7 +620,7 @@ break; case 'p': if (macroeq("pragma")) { - getline_(); + getline1(); return 0; } break; @@ -630,10 +630,10 @@ if (macroeq("asm")) { if (asmf) error(MCERR); asmf = 1; - getline_(); + getline1(); while (asmf) { printf("%s",linebuf); - getline_(); + getline1(); } return 0; } @@ -647,7 +647,7 @@ break; #endif case ' ': case '\t': case '\n': case 0: - getline_(); + getline1(); return 0; } error(MCERR); @@ -732,7 +732,7 @@ for(;;) { c = *chptr++; if (!c) { - getline_(); + getline1(); continue; } if (c=='*'&&chptr[0]=='/') { @@ -743,7 +743,7 @@ } else if (c=='\\' && (*chptr=='\n'||*chptr==0)) { chptr++; cheap->ptr--; - getline_(); + getline1(); } } if (c=='\n') { @@ -776,7 +776,7 @@ if (c=='\\') { if (*chptr=='\n') { cheap->ptr--; - getline_(); + getline1(); chptr = *pchptr; continue; } @@ -793,7 +793,7 @@ *cheap->ptr = *chptr++; cheap = increment_cheap(cheap,body); } else { - getline_(); + getline1(); chptr = *pchptr; } } else if (c=='\'') { @@ -806,7 +806,7 @@ cheap = increment_cheap(cheap,body); } else { *cheap->ptr = '\n'; - getline_(); + getline1(); chptr = *pchptr; } } else if (c=='"') { @@ -829,14 +829,14 @@ } else if (c=='\\') { if (*chptr=='\n') { cheap->ptr--; - getline_(); + getline1(); chptr = *pchptr; } // } else if (c==' '||c=='\t') { // cheap->ptr--; } else if (c=='\n') { cheap->ptr--; - getline_(); + getline1(); chptr = *pchptr; } } else if (c==')') { @@ -845,7 +845,7 @@ plevel++; } else if (c=='\n') { cheap->ptr--; - getline_(); + getline1(); chptr = *pchptr; } }
--- a/mc-macro.h Sat Nov 19 18:43:00 2011 +0900 +++ b/mc-macro.h Mon Nov 21 19:52:25 2011 +0900 @@ -25,7 +25,7 @@ extern void macro_expansion(NMTBL *nptrm); extern int macroeq(char *n); extern void check_macro_eof(); -extern void getline_(void); +extern void getline1(void); extern void macro_define(char *macro); extern char *chinput; extern char *mappend(int lists,char **result);
--- a/mc-parse.c Sat Nov 19 18:43:00 2011 +0900 +++ b/mc-parse.c Mon Nov 21 19:52:25 2011 +0900 @@ -798,7 +798,7 @@ // before reading any file, perform initialization source chinput = init_src; } - getline_(); + getline1(); } static void @@ -5541,7 +5541,7 @@ return ch; } if (!filep) return ch=0; // command line case; - getline_(); + getline1(); if (in_macro_if) check_macro_eof(); return getch(); }