summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-10-19 13:36:49 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-10-19 13:36:49 +0200
commit0a1746da98ef24b887074bad1c390523f6c4b190 (patch)
treeed266131000fafdfa1bdf780d22683dad7b8eaf0 /main.c
parenta892293556960b0813098ede7da7a34774da7d3c (diff)
downloadgawk-0a1746da98ef24b887074bad1c390523f6c4b190.tar.gz
SYMTAB enhancements, bug fix. Doc additions.
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.c b/main.c
index e1cdd3d3..5e84a3c7 100644
--- a/main.c
+++ b/main.c
@@ -1064,6 +1064,12 @@ load_environ()
NODE **aptr;
int i;
NODE *tmp;
+ static bool been_here = false;
+
+ if (been_here)
+ return ENVIRON_node;
+
+ been_here = true;
ENVIRON_node = install_symbol(estrdup("ENVIRON", 7), Node_var_array);
for (i = 0; environ[i] != NULL; i++) {
@@ -1107,6 +1113,12 @@ load_procinfo()
char name[100];
#endif
AWKNUM value;
+ static bool been_here = false;
+
+ if (been_here)
+ return PROCINFO_node;
+
+ been_here = true;
PROCINFO_node = install_symbol(estrdup("PROCINFO", 8), Node_var_array);