(*
    Title: 	UnixEnv - Definitions
    LastEdit:	"Mon Sep 17 16:35:26 1984"
    Author: 	Mick Jordan
		Cambridge University Computer Laboratory

    An interface to Unix shell environment variables
*)

DEFINITION MODULE UnixEnv;

EXPORT QUALIFIED EnvRc, GetEnvVar, SetEnvVar;

TYPE EnvRc = (Found, NotFound);

PROCEDURE GetEnvVar(name: ARRAY OF CHAR; VAR value: ARRAY OF CHAR): EnvRc;
(*  searches the environment list for a variable called 'name'.
    If found copies its value into 'value' and returns 'Found'.
    Else returns 'NotFound'.
    ArrayIndexFault may be raised if 'value' not large enough.
*)
PROCEDURE SetEnvVar(name: ARRAY OF CHAR; value: ARRAY OF CHAR): EnvRc;
(*  as above, but instead of returning the value, updates it to
    the string passed in 'value'.
*)


END UnixEnv.
