Mercurial > hg > CbC > old > device
changeset 851:beb59eb56bb4
change method name from getline to getline_
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Nov 2011 18:43:00 +0900 |
parents | d58ae69b11e4 |
children | 4640447d80ef |
files | mc-macro.c mc-macro.h mc-parse.c |
diffstat | 3 files changed, 18 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-macro.c Sat Sep 24 02:00:01 2011 +0900 +++ b/mc-macro.c Sat Nov 19 18:43:00 2011 +0900 @@ -326,14 +326,14 @@ } getch(); } - if (in_comment==1) { getline(); getch(); } + if (in_comment==1) { getline_(); getch(); } } while(in_comment==1); in_comment=0; return 0; } /* - getline from chptr or chinput (for internal source) + getline_ 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) +getline_(void) { int i; int c = 0; @@ -620,7 +620,7 @@ break; case 'p': if (macroeq("pragma")) { - getline(); + getline_(); return 0; } break; @@ -630,10 +630,10 @@ if (macroeq("asm")) { if (asmf) error(MCERR); asmf = 1; - getline(); + getline_(); while (asmf) { printf("%s",linebuf); - getline(); + getline_(); } return 0; } @@ -647,7 +647,7 @@ break; #endif case ' ': case '\t': case '\n': case 0: - getline(); + getline_(); return 0; } error(MCERR); @@ -732,7 +732,7 @@ for(;;) { c = *chptr++; if (!c) { - getline(); + getline_(); continue; } if (c=='*'&&chptr[0]=='/') { @@ -743,7 +743,7 @@ } else if (c=='\\' && (*chptr=='\n'||*chptr==0)) { chptr++; cheap->ptr--; - getline(); + getline_(); } } if (c=='\n') { @@ -776,7 +776,7 @@ if (c=='\\') { if (*chptr=='\n') { cheap->ptr--; - getline(); + getline_(); chptr = *pchptr; continue; } @@ -793,7 +793,7 @@ *cheap->ptr = *chptr++; cheap = increment_cheap(cheap,body); } else { - getline(); + getline_(); chptr = *pchptr; } } else if (c=='\'') { @@ -806,7 +806,7 @@ cheap = increment_cheap(cheap,body); } else { *cheap->ptr = '\n'; - getline(); + getline_(); chptr = *pchptr; } } else if (c=='"') { @@ -829,14 +829,14 @@ } else if (c=='\\') { if (*chptr=='\n') { cheap->ptr--; - getline(); + getline_(); chptr = *pchptr; } // } else if (c==' '||c=='\t') { // cheap->ptr--; } else if (c=='\n') { cheap->ptr--; - getline(); + getline_(); chptr = *pchptr; } } else if (c==')') { @@ -845,7 +845,7 @@ plevel++; } else if (c=='\n') { cheap->ptr--; - getline(); + getline_(); chptr = *pchptr; } }
--- a/mc-macro.h Sat Sep 24 02:00:01 2011 +0900 +++ b/mc-macro.h Sat Nov 19 18:43:00 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 getline_(void); extern void macro_define(char *macro); extern char *chinput; extern char *mappend(int lists,char **result);
--- a/mc-parse.c Sat Sep 24 02:00:01 2011 +0900 +++ b/mc-parse.c Sat Nov 19 18:43:00 2011 +0900 @@ -798,7 +798,7 @@ // before reading any file, perform initialization source chinput = init_src; } - getline(); + getline_(); } static void @@ -5541,7 +5541,7 @@ return ch; } if (!filep) return ch=0; // command line case; - getline(); + getline_(); if (in_macro_if) check_macro_eof(); return getch(); }