Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.97
 
1.98
 
MAIN:ragge:20090808072553
 
cpp.c
_>10701070 }
 10711071 
 10721072 /*
<> 1073+ * Maybe an indentifier (for macro expansion).
  1074+ */
  1075+static int
  1076+mayid(usch *s)
  1077+{
  1078+        for (; *s; s++)
  1079+                if (!isdigit(*s) && !isalpha(*s) && *s != '_')
  1080+                        return 0;
  1081+        return 1;
  1082+}
  1083+
  1084+/*
10731085  * do macro-expansion until WARN character read.
 10741086  * read from lex buffer and store result on heap.
 10751087  * will recurse into lookup() for recursive expansion.
     
 !
10981110                 case NOEXP: noexp++; break;
 10991111                 case EXPAND: noexp--; break;
 11001112 
<> 1113+                case NUMBER: /* handled as ident if no .+- in it */
  1114+                        if (!mayid((usch *)yytext))
  1115+                                goto def;
  1116+                        /* FALLTHROUGH */
11011117                 case IDENT:
 11021118                         /*
 11031119                          * Handle argument concatenation here.
     
 !
11201136 
 11211137                         DDPRINT(("id1: typ %d noexp %d orgexp %d\n",
 11221138                             c, noexp, orgexp));
<>1123 -                        if (c == IDENT) { /* XXX numbers? */
  1139+                        if (c == IDENT ||
  1140+                            (c == NUMBER && mayid((usch *)yytext))) {
<_11241141                                 DDPRINT(("id2: str %s\n", yytext));
 11251142                                 /* OK to always expand here? */
 11261143                                 savstr((usch *)yytext);
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-07-10 02:16 +0200