home *** CD-ROM | disk | FTP | other *** search
- { (C) Copyright 1986-1992 MetaWare Incorporated; Santa Cruz, CA 95060. }
-
- pragma c_include('implement.pf');
- package Env;
- pragma routine_aliasing_convention(Implement.RTE_aliasing);
- { Package for processing the MS-DOS environemt string }
-
- var Env_separator:Char; -- Separates substrings;
- -- default: Dos -';', unix, xenix - ':'.
- iterator Each_env_field(const Name: String):(const S: String); external;
- {Iterator on each field of env name. A field is separated by Env_separator.}
- {If Name not found in environment, then routine returns without yielding}
- {anything.}
-
- { Example:
- Suppose the name PATH has been set to "/BIN;A:/;B:/XYZ"
-
- for S in Each_env_field('PATH') do ...
- yields the following strings in S: '/BIN' 'A:/' 'B:/XYZ'
- }
-
- { Each Env_separator-separated substring of S. }
- iterator Each_env_substring(const S:String):(const Substring:String);external;
-
- -- Obtain the entire environment string as a single chunk:
- type Env_string = String(256);
- function Get_env(const Name: String): Env_string; External;
-
- end;
-
-
-