summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-05 19:59:05 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-11-05 19:59:05 -0700
commita5f2b7e6641a5f7ebaf01dd0e9fa10200ceb4606 (patch)
tree4e9c4f5083bd2b4016edf2555f3b2bcc032950ea /txr.1
parentb347ef4f083443e608b46f308894acc2567ce630 (diff)
downloadtxr-a5f2b7e6641a5f7ebaf01dd0e9fa10200ceb4606.tar.gz
txr-a5f2b7e6641a5f7ebaf01dd0e9fa10200ceb4606.tar.bz2
txr-a5f2b7e6641a5f7ebaf01dd0e9fa10200ceb4606.zip
Task #11442. Access to environment variables.
* lib.c (env_list): New static variable. (env): New function. (match): Declaration of nonexistent function removed. (obj_init): New variable gc-protected. * lib.h (env): Declared. * match.c (env_k): New symbol variable. (v_next): Implemented :env. * txr.1: @(next :env) described.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.16
1 files changed, 6 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index edf0bbd0..1523f3a4 100644
--- a/txr.1
+++ b/txr.1
@@ -1114,6 +1114,7 @@ with, or without arguments:
@(next SOURCE)
@(next SOURCE :nothrow)
@(next :args)
+ @(next :env)
@(next :list EXPR)
@(next :string EXPR)
@@ -1151,6 +1152,11 @@ open the input source named by that argument. If the very first directive of a q
avoids opening the first input source, but it does open the input source for
any other directive, even one which does not consume any data.
+The variant @(next :env) means that the list of process enviornment variables
+is treated as a source of data. It looks like a text file stream
+consisting of lines of the form "name=value". If this feature is not available
+on a given platform, an exception is thrown.
+
The syntax @(next :list EXPR) treats the expression as a source of
text. The value of the expression is flattened to a list in a way similar
to the @(flatten) directive. The resulting list is treated as if it were the