(*
    Title: 	Environ - Definitions
    LastEdit:	"Mon Mar  5 17:30:03 1984"
    Author: 	Mick Jordan
		Cambridge University Computer Laboratory

    An interface to Unix shell environment variables
*)

DEFINITION MODULE Environ;

EXPORT QUALIFIED ENVRC, GetEnvVar, SetEnvVar;

TYPE ENVRC = (success, notfound, truncated);

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 'success'
    if 'value' was large enough, else 'truncated';
    Else returns 'notfound'.
*)
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 Environ.
