doc.txt

get-environment.ss: get C environmental variables

_get-environment.ss_: get C environmental variables

Danny Yoo ([email protected] / [email protected])

Index terms: _environ_, _environment_


Introduction
------------

_get-environment_ provides a single function GET-ENVIRONMENT, which
returns a list of byte strings.  For example:


    > (require (planet "get-environment.ss" ("dyoo" "get-environment.plt")))
    > (require (lib "pretty.ss"))

    > (pretty-print (get-environment))
    (#"TERM=xterm"
     #"DESKTOP_STARTUP_ID="
     #"SHELL=/bin/bash"
     #"GTK_RC_FILES=/etc/gtk/gtkrc:/home/dyoo/.gtkrc-1.2-gnome2"
     ;; output omitted
     )

This is really a quick-and-dirty and immediate application of the
foreign function interface.


API
---

> get-environment: -> (listof byte-string)
Returns a list of the environmental variables available from the
user environment.  Each byte string will be in the form #"key=value".