------------------------------------------------------------------------------ -- -- -- POSIX ADA LANGUAGE INTERFACES COMPONENTS -- -- -- -- P O S I X . P R O C E S S _ E N V I R O N M E N T -- -- -- -- S p e c -- -- -- -- $Revision: 1.4 $ -- -- -- -- -- -- This package specification is part of the Florida State -- -- University (FSU) prototype implementation of IEEE Draft Std -- -- 1003.5b, for use with the Gnu NYU Ada Translator (GNAT) and the -- -- FSU Gnu Ada Runtime Library (GNARL). -- -- -- -- This package specification contains some text extracted from IEEE -- -- Draft Std 1003.5b/D5 (August 1995), IEEE Draft Standard for -- -- Information Technology -- POSIX Ada Language Interfaces -- Part 1: -- -- Binding for System Application Program Interface, Amendment 1: -- -- Realtime Extensions, copyright 1995 by the Institute of Electrical -- -- and Electronics Engineers, Inc. -- -- -- -- This package specification differs from the package specifications -- -- in IEEE Draft Std 1003.5/D5 in several respects. For example, it -- -- includes additional with-clause dependences, comments, and -- -- complete definitions for certain types, ranges, and constants that -- -- are left implementation-defined in the draft standard. These -- -- differences appear to be within the scope of variation which the -- -- draft standard permits for implementations, but no warranty is -- -- made to that effect. -- -- -- -- These package specifications are distributed in the hope that they -- -- will be useful, but WITHOUT ANY WARRANTY; without even the implied -- -- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- The package specifications in IEEE Draft Std 1003.5b/D5 represent -- -- only a portion of the document and are not to be interpreteted -- -- outside the context of the document, nor is the draft document to -- -- be interpreted as an approved consensus standard. -- -- -- -- When IEEE Std 1003.5b is approved, it must be used in conjunction -- -- with the final version of the package specifications contained in -- -- that document in order to claim conformance. The IEEE takes no -- -- responsibility for and will assume no liability for damages -- -- resulting from the reader's misinterpretation of said information -- -- resulting from its out-of-context nature. To order copies of the -- -- IEEE Draft Std 1003.5/D5, please contact the IEEE Service Center -- -- at 445 Hoes Lane, PO Box 1331, Piscataway, NJ 08855-1331; via -- -- phone at 1-800-678-IEEE, 908-981-1393; or via fax at 908-981-9667. -- -- -- -- For bodies to these packages, and other free products of the FSU -- -- POSIX/Ada Real-Time project, see the ftp site "ftp.cs.fsu.edu", -- -- subdirectory "pub/PART", or send e-mail to "part@ada.cs.fsu.edu". -- -- -- ------------------------------------------------------------------------------ with POSIX; package POSIX.Process_Environment is pragma Elaborate_Body (POSIX.Process_Environment); -- Process Parameters function Argument_List return POSIX.POSIX_String_List; -- Environment Variables type Environment is limited private; -- procedure mkenv (i : integer; e : out Environment); procedure Copy_From_Current_Environment (Env : in out Environment); procedure Copy_To_Current_Environment (Env : in Environment); procedure Copy_Environment (Source : in Environment; Target : in out Environment); function Environment_Value_Of (Name : POSIX.POSIX_String; Env : Environment; Undefined : POSIX.POSIX_String := "") return POSIX.POSIX_String; function Environment_Value_Of (Name : POSIX.POSIX_String; Undefined : POSIX.POSIX_String := "") return POSIX.POSIX_String; function Is_Environment_Variable (Name : POSIX.POSIX_String; Env : Environment) return Boolean; function Is_Environment_Variable (Name : POSIX.POSIX_String) return Boolean; procedure Clear_Environment (Env : in out Environment); procedure Clear_Environment; procedure Set_Environment_Variable (Name : in POSIX.POSIX_String; Value : in POSIX.POSIX_String; Env : in out Environment); procedure Set_Environment_Variable (Name : in POSIX.POSIX_String; Value : in POSIX.POSIX_String); procedure Delete_Environment_Variable (Name : in POSIX.POSIX_String; Env : in out Environment); procedure Delete_Environment_Variable (Name : in POSIX.POSIX_String); function Length (Env : Environment) return Natural; function Length return Natural; generic with procedure Action (Name : in POSIX.POSIX_String; Value : in POSIX.POSIX_String; Quit : in out Boolean); procedure For_Every_Environment_Variable (Env : in Environment); generic with procedure Action (Name : in POSIX.POSIX_String; Value : in POSIX.POSIX_String; Quit : in out Boolean); procedure For_Every_Current_Environment_Variable; -- Process Working Directory procedure Change_Working_Directory (Directory_Name : in POSIX.Pathname); function Get_Working_Directory return POSIX.Pathname; private type envitem (namesize, valuesize : Natural); type Environment is access envitem; type envitem (namesize, valuesize : Natural) is record Name : POSIX.POSIX_String (1 .. namesize); Value : POSIX.POSIX_String (1 .. valuesize); Next : Environment; end record; curr_env : Environment; loc : Environment; end POSIX.Process_Environment;