aboutsummaryrefslogtreecommitdiff
path: root/sys/libc/cenvlist.c
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/libc/cenvlist.c
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/libc/cenvlist.c')
-rw-r--r--sys/libc/cenvlist.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/libc/cenvlist.c b/sys/libc/cenvlist.c
new file mode 100644
index 00000000..1616a4d5
--- /dev/null
+++ b/sys/libc/cenvlist.c
@@ -0,0 +1,32 @@
+/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+*/
+
+#define import_spp
+#define import_libc
+#define import_xnames
+#include <iraf.h>
+
+
+/* C_ENVLIST -- List the names and values of all environment variables on the
+** output file. Variables are listed in the reverse of the order in which
+** they were defined. If a variable is redefined all definitions or only the
+** most recent definition may be listed. Each definition appears on a separate
+** line in the following format:
+**
+** prefix var="value"
+**
+** where "prefix" is the prefix string supplied as an argument, "var" is the
+** name of the variable, and "value" is the value string.
+*/
+void
+c_envlist (
+ XINT fd, /* output file */
+ char *prefix, /* prefix string, e.g. "set " */
+ int show_redefs /* 0=hide redefs, 1=show redefs */
+)
+{
+ XINT x_fd = fd,
+ x_show_redefs = show_redefs;
+
+ ENVLIST (&x_fd, c_sppstr(prefix), &x_show_redefs);
+}