summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-18 23:46:51 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-18 23:46:51 -0800
commitc720098b5f0eb58eef01fef4acbeccde00af2c75 (patch)
tree257c1010127a56d0641c84b4056c66e45fc70ec9 /txr.1
parent6dbb219a3fb2152ca9991a073df7e45c553eadf4 (diff)
downloadtxr-c720098b5f0eb58eef01fef4acbeccde00af2c75.tar.gz
txr-c720098b5f0eb58eef01fef4acbeccde00af2c75.tar.bz2
txr-c720098b5f0eb58eef01fef4acbeccde00af2c75.zip
* eval.c (env_hash): new function.
(eval_init): Register env and env_hash functions. Register prog_args and prog_args_full as *args* and *full-args*. * lib.c (timegm_hack): Invalidate env_list, after mucking with the environment via setenv and unsetenv. * txr.c (prog_args_full, prog_args): New global variables. (txr_main): Command-line processing converted to use TXR's library. Populates prog_args_full and prog_args. * txr.h (prog_args_full, prog_args): Declared. * txr.1: Documented *args*, *full-args*, env and env-hash.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.143
1 files changed, 43 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 45ec1806..f9c50347 100644
--- a/txr.1
+++ b/txr.1
@@ -12131,6 +12131,49 @@ call compatibility with make-time. It may or may not have any effect
on the output (since the UTC zone by definition doesn't have daylight
savings time).
+.SH ENVIRONMENT VARIABLES AND COMMAND LINE
+
+.SS Variables *args* and *args-full*
+
+The *args* variable holds a list of strings representing the remaining
+arguments which follow any options processed by the txr executable, and the
+script name.
+
+The *args-full* variable holds the original, complete list of arguments passed
+from the operating system.
+
+Note: the *args* variable is nil during the processing of the command line,
+so TXR Lisp invoked using the -p or -e option cannot use it.
+
+.SS Function env
+
+.TP
+Syntax:
+
+ (env)
+
+.TP
+Description:
+
+The env function retrieves the list of environment variables. Each
+variable is represented by a single entry in the list: a string which
+contains an = (equal) character somewhere, separating the variable name
+from its value.
+
+See also: the env-hash function.
+
+.SS Function env-hash
+
+Syntax:
+
+ (env-hash)
+
+.TP
+Description:
+
+The env-hash function constructs and returns an :equal-based hash. The hash is
+populated with the environment variables, represented as key-value pairs.
+
.SH UNIX PROGRAMMING
.SS Function errno