Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.64
 
1.65
 
MAIN:ragge:20070925204107
 
cpp.c
_>126126 
 127127 static struct symtab *filloc;
 128128 static struct symtab *linloc;
<> 129+static struct symtab *pragloc;
129130 int     trulvl;
 130131 int     flslvl;
 131132 int     elflvl;
     
 !
242243 
 243244         filloc = lookup((usch *)"__FILE__", ENTER);
 244245         linloc = lookup((usch *)"__LINE__", ENTER);
<> 246+        pragloc = lookup((usch *)"_Pragma", ENTER);
245247         filloc->value = linloc->value = (usch *)""; /* Just something */
<> 248+        pragloc->value = (usch *)"";
246249 
 247250         if (tflag == 0) {
 248251                 time_t t = time(NULL);
     
 !
759762 }
 760763 
 761764 /*
<> 765+ * convert _Pragma to #pragma for output.
  766+ */
  767+static void
  768+pragoper(void)
  769+{
  770+        usch *opb;
  771+        int t;
  772+
  773+        slow = 1;
  774+        putstr((usch *)"\n#pragma ");
  775+        if ((t = yylex()) == WSPACE)
  776+                t = yylex();
  777+        if (t != '(')
  778+                goto bad;
  779+        if ((t = yylex()) == WSPACE)
  780+                t = yylex();
  781+        opb = stringbuf;
  782+        while (t != ')') {
  783+                savstr((usch *)yytext);
  784+                t = yylex();
  785+        }
  786+        savch(0);
  787+        cunput(WARN);
  788+        unpstr(opb);
  789+        stringbuf = opb;
  790+        expmac(NULL);
  791+        while (stringbuf > opb)
  792+                cunput(*--stringbuf);
  793+        if ((t = yylex()) != STRING)
  794+                goto bad;
  795+        opb = (usch *)yytext;
  796+        if (*opb++ == 'L')
  797+                opb++;
  798+        while ((t = *opb++) != '\"') {
  799+                if (t == '\\' && (*opb == '\"' || *opb == '\\'))
  800+                        t = *opb++;
  801+                putch(t);
  802+        }
  803+        putch('\n');
  804+        prtline();
  805+        return;
  806+bad:    error("bad pragma operator");
  807+}
  808+
  809+/*
762810  * substitute namep for sp->value.
 763811  */
 764812 int
     
 !
780828         } else if (sp == linloc) {
 781829                 (void)sheap("%d", ifiles->lineno);
 782830                 return 1;
<> 831+        } else if (sp == pragloc) {
  832+                pragoper();
  833+                return 1;
<_783834         }
 784835         vp = sp->value;
 785836 
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-20 21:11 +0100