tur/r7rs/process-context
(scheme process-context): the command line, the environment, and leaving the process.
An on-demand R7RS library (see stdlib/r7rs/time.tur). The primitives are inline C with interpreter twins: the typed stdlib's env/process functions are effect-annotated inline C with no interpreter natives, so forwarding to them would make this library compiled-only. The command line is read from *args*, walked cell by cell -- never from g_tur_args.
Since: r7rs-lang-plan R7
r7rs-args-head__
(r7rs-args-head__ [c :int] :cstr)
r7rs-args-tail__
(r7rs-args-tail__ [c :int] :int)
r7rs-args-loop__
(r7rs-args-loop__ [c :int last] :any)
r7rs-args-go__
(r7rs-args-go__ [c :int] :any)
r7rs-command-line
(r7rs-command-line :any)
the command name, then the arguments. The name is implementation-dependent in R7RS: here it is *argv0*, argv[0] of a compiled binary and the script path under the interpreter.
r7rs-getenv-set?__
(r7rs-getenv-set?__ [name :cstr] :bool)
r7rs-getenv__
(r7rs-getenv__ [name :cstr] :cstr)
r7rs-get-environment-variable
(r7rs-get-environment-variable [name0] :any)
the value, or #f when it is not set.
r7rs-environ-count__
(r7rs-environ-count__ :int)
r7rs-environ-name__
(r7rs-environ-name__ [i :int] :cstr)
r7rs-environ-value__
(r7rs-environ-value__ [i :int] :cstr)
r7rs-environ-go__
(r7rs-environ-go__ [i :int n :int] :any)
r7rs-get-environment-variables
(r7rs-get-environment-variables :any)
an alist of (name . value).
r7rs-exit-code__
(r7rs-exit-code__ [l] :int)
no argument or #t is success (0), #f is failure (1), an exact integer is itself, anything else is success.
r7rs-unwind-all__
(r7rs-unwind-all__ :nil)
run every outstanding dynamic-wind after, innermost first.
r7rs-exit
(r7rs-exit [& obj :any] :nil)
run the outstanding dynamic-wind afters, then leave.
r7rs-emergency-exit
(r7rs-emergency-exit [& obj :any] :nil)
leave without running them.