aboutsummaryrefslogtreecommitdiff
path: root/sys/etc/envinit.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/etc/envinit.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/etc/envinit.x')
-rw-r--r--sys/etc/envinit.x27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/etc/envinit.x b/sys/etc/envinit.x
new file mode 100644
index 00000000..3b58f444
--- /dev/null
+++ b/sys/etc/envinit.x
@@ -0,0 +1,27 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <syserr.h>
+include "environ.h"
+
+# ENV_INIT -- Called by the IRAF main to initialize the environment common
+# upon process startup.
+
+procedure env_init()
+
+bool first_time
+int kmalloc()
+include "environ.com"
+data first_time /true/
+
+begin
+ if (first_time) {
+ if (kmalloc (envbuf, LEN_ENVBUF, TY_SHORT) == ERR)
+ call sys_panic (SYS_MFULL, "Out of memory")
+
+ call aclrs (threads, NTHREADS)
+ len_envbuf = LEN_ENVBUF
+ last = NULL
+ top = 1
+ first_time = false
+ }
+end