Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.15
 
1.16
 
MAIN:ragge:20030202145022
 
trees.c
_>66 # include "pass2.h"     /* for NOPREF */
 77 
 88 # include <setjmp.h>
<> 9+# include <stdarg.h>
  10+# include <string.h>
911 
 1012 int bdebug = 0;
 1113 int adebug = 0;
     
 !
1517 int opact(NODE *p);
 1618 int chkstr(int, int, TWORD);
 1719 int moditype(TWORD);
<> 20+static void to_pass2(NODE *p);
1821 
 1922 /* corrections when in violation of lint */
 2023 
     
 !
16831686                 else if( p->tn.rval >= 0 ){ /* copy name from exname */
 16841687                         register char *cp;
 16851688                         cp = exname( stab[p->tn.rval].sname );
<>1686 -                        p->in.name = tstr(cp);
  1689+                        if (isinlining)
  1690+                                p->in.name = strdup(cp);
  1691+                        else
  1692+                                p->in.name = tstr(cp);
16871693                         }
 16881694                 else {
 16891695                         char temp[32];
 16901696                         sprintf( temp, LABFMT, -p->tn.rval );
<>1691 -                        p->in.name = tstr(temp);
  1697+                        if (isinlining)
  1698+                                p->in.name = strdup(temp);
  1699+                        else
  1700+                                p->in.name = tstr(temp);
16921701                 }
 16931702                 break;
 16941703 
     
 !
17141723         }
 17151724 
 17161725 # endif
<_ 1726+
  1727+void
  1728+to_pass2(NODE *p)
  1729+{
  1730+        if (isinlining)
  1731+                inline_savenode(p);
  1732+        else
  1733+                p2compile(p);
  1734+}
  1735+
  1736+void
  1737+ecode(NODE *p
  1738+{
  1739+        /* walk the tree and write out the nodes.. */
  1740+
  1741+        if (nerrors)   
  1742+                return;
  1743+        if (xdebug) {
  1744+                printf("Fulltree:\n");
  1745+                fwalk(p, eprint, 0);
  1746+        }
  1747+        p2tree(p);     
  1748+        to_pass2(p);
  1749+}
  1750+
  1751+/*
  1752+ * Printout something in pass1.
  1753+ * This is spooled up if inline is defined.
  1754+ * XXX - should be done in some other way.
  1755+ */
  1756+void
  1757+p1print(char *fmt, ...)
  1758+{
  1759+        va_list ap;
  1760+        char *buf;
  1761+
  1762+        va_start(ap, fmt);
  1763+        if (isinlining) {
  1764+                vasprintf(&buf, fmt, ap);
  1765+                inline_savestring(buf);
  1766+        } else
  1767+                vprintf(fmt, ap);
  1768+        va_end(ap);
  1769+}
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-09-01 23:12 +0200