Mercurial > hg > CbC > old > device
diff mc-macro.c @ 350:43099915f4c2
name table reconfigure continue...
author | kono |
---|---|
date | Fri, 02 Jul 2004 18:28:19 +0900 (2004-07-02) |
parents | b74b580c10f6 |
children | 000c509b663d |
line wrap: on
line diff
--- a/mc-macro.c Fri Jul 02 14:14:24 2004 +0900 +++ b/mc-macro.c Fri Jul 02 18:28:19 2004 +0900 @@ -609,8 +609,7 @@ static int macro_eval(int macrop,char *body0,int history) { - int c/*,len*/; - int sch; char *schptr; + int c,len; int in_quote = 0; int in_wquote = 0; char *macro; @@ -642,17 +641,16 @@ // name concatenation. skip ## and re-eval macro line. mconcat = 1; body++; continue; } else if (alpha(c)) { -#if 0 body--; // ungetc - nptrm = get_name(body,&len); + nptrm = get_name(body,&len,NONDEF); + if (!nptrm) { + while((*cheap->ptr = *body++) && len--) + cheap = increment_cheap(cheap,expand); + body--; + continue; + } + body += len; c = *body; -#else - sch = ch; schptr = chptr; ch = c; chptr = body; - nptrm = get_name_from_chptr(); - body = chptr; c = ch; - body--; // ungetc - ch = sch; chptr = schptr; -#endif nptrm = name_space_search(nptrm,MACRO); macro = (char *)car(nptrm->dsp); switch(nptrm->sc) { @@ -706,7 +704,7 @@ p = (char *)car(lists); for(;(*cheap->ptr=*p++);cheap = increment_cheap(cheap,0)) { // in_quote + \n case ? should be \n. - if (p[-1]=='\n') cheap->ptr[-1]=' '; + if (p[-1]=='\n') cheap->ptr[0]=' '; } } cheap = increment_cheap(cheap,0);