From 0a1746da98ef24b887074bad1c390523f6c4b190 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 19 Oct 2012 13:36:49 +0200 Subject: SYMTAB enhancements, bug fix. Doc additions. --- main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'main.c') 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); -- cgit v1.2.1