(*======================================================================*)
(*              Amiga Support Routines, Reading ENV: variables          *)
(*======================================================================*)
(*  Version:    1.00            Author:  Dennis Brueni                  *)
(*  Date:       08-04-91        Changes: Original                       *)
(*======================================================================*)
(*  This module contains functions to aid in dealing with environment   *)
(*  variables.                                                          *)
(*======================================================================*)

DEFINITION MODULE Env;

(*----------------------------------------------------------------------*)
(*  GETENV      Returns the string value of an environment variable     *)
(*                                                                      *)
(*  PARAMETERS  name:   The name of the environment variable            *)
(*              value:  The value of e.v. 'name', empty on error        *)
(*----------------------------------------------------------------------*)

PROCEDURE GetEnv(name: ARRAY OF CHAR; VAR value: ARRAY OF CHAR);

(*----------------------------------------------------------------------*)
(*  SETENV      Sets the value of an environment variable               *)
(*                                                                      *)
(*  PARAMETERS  name:   The name of the environment variable            *)
(*              value:  The value to set e.v. 'name' to.                *)
(*----------------------------------------------------------------------*)

PROCEDURE SetEnv(name: ARRAY OF CHAR; value: ARRAY OF CHAR);

(*----------------------------------------------------------------------*)
(*  PUTENV      Sets the value a environment variable                   *)
(*                                                                      *)
(*  PARAMETER   str:   Is in form "variable=value", calls setenv()      *)
(*----------------------------------------------------------------------*)

PROCEDURE PutEnv(str: ARRAY OF CHAR);

(*----------------------------------------------------------------------*)
(*  PARSEENV    Gets the next parsed entry in an environment variable   *)
(*                                                                      *)
(*  PARAMETERS  str:   String from getenv (the value of an e.v.)        *)
(*              next:  The next entry in str, empty on error            *)
(*                                                                      *)
(*  RETURNS     TRUE if next if valid, FALSE otherwise                  *)
(*                                                                      *)
(*  SIDE EFFECT This is destructive to str.                             *)
(*----------------------------------------------------------------------*)

PROCEDURE ParseEnv(VAR str: ARRAY OF CHAR; VAR next: ARRAY OF CHAR):BOOLEAN;


END Env.
