changed some large static data structures into STATIC

This commit is contained in:
erikb
1986-09-15 08:47:53 +00:00
parent 225f1fb724
commit a968ce8437
5 changed files with 23 additions and 15 deletions

View File

@@ -16,6 +16,7 @@
#include "Lpars.h"
#include "label.h"
#include "expr.h"
#include "static.h"
/* Some routines (symbol2str, token2str, type2str) which should have
* yielded strings are written to yield a pointer to a transient piece
@@ -284,15 +285,16 @@ type2str(tp)
return buf;
}
STATIC char trans_buf[MAXTRANS][300];
char * /* the ultimate transient buffer supplier */
next_transient()
{
static int bnum;
static char buf[MAXTRANS][300];
if (++bnum == MAXTRANS)
bnum = 0;
return buf[bnum];
return trans_buf[bnum];
}
print_expr(msg, expr)