Oberon || Library || Module Index || Search Engine || Definition || Module

Ulm's Oberon Library:


UnixEnvironment - get environment parameters


TYPE Stream = POINTER TO StreamRec;
TYPE StreamRec = RECORD (Streams.StreamRec) END;

PROCEDURE String(name: ARRAY OF CHAR; VAR value: ARRAY OF CHAR) : BOOLEAN; PROCEDURE Open(VAR value: Streams.Stream; name: ARRAY OF CHAR) : BOOLEAN; PROCEDURE OpenAll(VAR stream: Streams.Stream);


The UNIX environment is a list of parameters of the form name=value. String looks for an environment parameter with name name and store its associated value (behind "=") into value. Open opens value as stream for reading the value associated with name. String and Open return FALSE if name is not found.

OpenAll opens all environment parameters for reading. The environment parameters are 0X-terminated.


Streams   	  stream operations
SysArgs   	  the environment  parameters  are  taken  from
UnixArgLists   	  construction of an environment list


The streams opened by Open and OpenAll are not capable of seek and tell operations.

There is no convenient way to redefine single environment parameters. Instead of this, UnixArgLists must be used to construct an entirely new one.

Edited by: borchert, last change: 1992/03/24, revision: 1.3, converted to HTML: 1997/04/28

Oberon || Library || Module Index || Search Engine || Definition || Module