--| --|Item: Ada PCTE Binding --|$Revision: 0.2 $ --|$State: Prototype $ --| --|The Version Description Document (VDD) included with this release provides --|detailed information regarding the condition of the software. The "User --|Feedback" section of the VDD describes how to obtain additional information. --| --|Distribution Statement "A", per DoD Directive 5230.24 --|Authorized for public release; distribution is unlimited. --| --|Copyright (c) 1992, Paramax Systems Corporation, Reston, Virginia --|Copyright is assigned to the U.S. Government, upon delivery thereto, --|in accordance with the DFAR Special Works Clause. --| --|Developed by: Paramax Systems Corporation, --| --|This software, developed under the Software Technology for Adaptable, --|Reliable Systems (STARS) program, is approved for release under --|Distribution "A" of the Scientific and Technical Information Program --|Classification Scheme (DoD Directive 5230.24) unless otherwise indicated. --|Sponsored by the U.S. Defense Advanced Research Projects Agency (DARPA) --|under contract F19628-88-D-0031, the STARS program is supported by the --|military services, SEI, and MITRE, with the U.S. Air Force as the executive --|contracting agent. --| --|Permission to use, copy, modify, and comment on this software and its --|documentation for purposes stated under Distribution "A" and without fee --|is hereby granted, provided that this notice appears in each whole or --|partial copy. This software retains Contractor indemnification to --|the Government regarding copyrights pursuant to the above referenced --|STARS contract. The Government disclaims all responsibility against --|liability, including costs and expenses for violation of proprietary --|rights, or copyrights arising out of the creation or use of this --|software. --| --|In addition, the Government, Paramax, and its subcontractors disclaim all --|warranties with regard to this software, including all implied warranties --|of merchantability and fitness, and in no event shall the Government, --|Paramax, or its subcontractor(s) be liable for any special, indirect or --|consequential damages or any damages whatsoever resulting from the loss of --|use, data, or profits, whether in action of contract, negligence or other --|tortious action, arising in connection with the use or performance of this --|software. --| --|$Log $ --| -- Version Information -- ^^^^^^^^^^^^^^^^^^^ -- -- PCTE - Ada Language Interface. -- Version: 0.2. -- Release Date: November 30, 1992. -- Compiled under SUN OS 4.1.2 using SunAda 1.0 -- -- -- General Information -- ^^^^^^^^^^^^^^^^^^^ -- -- This is an alpha release of the Paramax STARS Ada binding to Emeraude's -- PCTE 1.5 using the ECMA PCTE Ada binding specifications. The binding -- is incomplete in this release. See the Version Description Document -- provided with this alpha release for information on which interfaces -- have been implemented. It is expected that future releases will -- expand the number of interfaces implemented. The interfaces defined -- herein are subject to change. -- -- For further information, contact the authors: -- -- -- Robert Smith -- Paramax Systems Corp. -- Valley Forge Labs -- 70 E. Swedesford Road -- Paoli, PA. 19301 -- smith@prc.unisys.com (current) -- smith@vfl.paramax.com (future) -- +1 215 648-2402 -- -- Michael Horton -- Paramax Systems Corp. -- Valley Forge Labs -- 70 E. Swedesford Road -- Paoli, PA. 19301 -- horton@prc.unisys.com (current) -- horton@vfl.paramax.com (future) -- +1 215 648-2527 -- -- with Pcte, Pcte_error; package Pcte_contents is use Pcte, Pcte_error; type opening_mode is (READ_WRITE, READ_ONLY, WRITE_ONLY, APPEND); -- Pcte_contents.opening_mode corresponds to the PCTE datatype of -- the parameter opening_mode of CONTENTS_OPEN. type whence is (AT_BEGINNING, AT_CURRENT, AT_END); -- Pcte_contents.whence corresponds to the PCTE datatype -- of the parameter whence of CONTENTS_SEEK. type set_mode is (AT_BEGINNING, AT_POSITION, AT_END); -- Pcte_contents.set_mode corresponds to the PCTE datatype -- of the parameter set_mode of CONTENTS_SET_POSITION type positioning is (SEQUENTIAL, DIRECT, SEEK); -- Pcte_contents.positioning corresponds to the PCTE datatype -- of the parameter positioning of CONTENTS_SET_PROPERTIES. type position_handle is limited private ; -- Pcte_contents.position_handle to the PCTE datatype Position_handle. type handle is limited private ; --type handle is private; -- this is private so assignment can be done -- Pcte_contents.handle to the PCTE datatype Contents_handle. -- 12.2.1 CONTENTS_CLOSE --% procedure close will be implemented in binding to PCTE 1.5 procedure close ( contents : in Pcte_contents.handle; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.2 CONTENTS_GET_FROM_KEY --% procedure get_from_key will not be implemented in binding to PCTE 1.5 procedure get_from_key ( open_key : in Pcte.natural; contents : in out Pcte_contents.handle; status : in Pcte_error.handle := EXCEPTION_ONLY); -- Pcte_contents.get_from_key can give rise to the binding-defined -- error condition CONTENTS_HANDLE_IS_OPEN(contents). -- 12.2.3 CONTENTS_GET_KEY --% function get_key will not be implemented in binding to PCTE 1.5 function get_key ( contents : Pcte_contents.handle; status : Pcte_error.handle := EXCEPTION_ONLY) return Pcte.natural; -- 12.2.4 CONTENTS_GET_POSITION --% procedure get_position will be implemented in binding to PCTE 1.5 function get_position ( contents : Pcte_contents.handle; status : Pcte_error.handle := EXCEPTION_ONLY) return Pcte_contents.position_handle; -- 12.2.5 CONTENTS_OPEN --% procedure open will be implemented in binding to PCTE 1.5 procedure open ( object : in Pcte.object_reference; opening_mode : in Pcte_contents.opening_mode; non_blocking_io : in Pcte.boolean; inheritable : in Pcte.boolean; contents : in out Pcte_contents.handle; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.6 CONTENTS_READ generic type element_type is private ; --% procedure read will be implemented in binding to PCTE 1.5 function read ( contents : Pcte_contents.handle; size : Pcte.natural; status : Pcte_error.handle := EXCEPTION_ONLY) return element_type; --% procedure read_s will be implemented in binding to PCTE 1.5 procedure read_s ( contents : Pcte_contents.handle; size : Pcte.natural; buf : in out Pcte.string; act_size : out Pcte.natural; status : Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.7 CONTENTS_SEEK --% procedure seek will be implemented in binding to PCTE 1.5 procedure seek ( contents : in Pcte_contents.handle; offset : in Pcte.integer; whence : in Pcte_contents.whence; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.8 CONTENTS_SET_POSITION --% procedure set_position will be implemented in binding to PCTE 1.5 procedure set_position ( contents : in Pcte_contents.handle; position : in Pcte_contents.position_handle; set_mode : in Pcte_contents.set_mode; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.9 CONTENTS_SET_PROPERTIES --% procedure set_properties will be implemented in binding to PCTE 1.5 procedure set_properties ( contents : in Pcte_contents.handle; positioning : in Pcte_contents.positioning; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.10 CONTENTS_TRUNCATE --% procedure truncate will be implemented in binding to PCTE 1.5 procedure truncate ( contents : in Pcte_contents.handle; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 12.2.11 CONTENTS_WRITE generic type element_type is private ; --% function write will be implemented in binding to PCTE 1.5 procedure write ( contents : in Pcte_contents.handle; size : in Pcte.natural; data : in element_type; actual_size : out Pcte.natural; status : in Pcte_error.handle := EXCEPTION_ONLY); --% function write_s will be implemented in binding to PCTE 1.5 procedure write_s ( contents : in Pcte_contents.handle; size : in Pcte.natural; data : in Pcte.string; act_size : out Pcte.natural; status : in Pcte_error.handle := EXCEPTION_ONLY); --% function end_of_contents added to the spec for use in binding to PCTE 1.5 function end_of_contents ( contents : in Pcte_contents.handle; status : in Pcte_error.handle := EXCEPTION_ONLY) return Pcte.boolean; -- 12.2.12 DEVICE_GET_CONTROL -- See 11.2. -- 12.2.13 DEVICE_SET_CONTROL -- See 11.2. -- 18.3.1 CONTENTS_COPY_FROM_FOREIGN_SYSTEM --% procedure copy_from_foreign_system will be implemented in binding to PCTE 1.5 procedure copy_from_foreign_system ( file : in Pcte.object_reference; foreign_system : in Pcte.object_reference; foreign_name : in Pcte.string; foreign_parameters : in Pcte.string; status : in Pcte_error.handle := EXCEPTION_ONLY); -- 18.3.1 CONTENTS_COPY_TO_FOREIGN_SYSTEM --% procedure copy_to_foreign_system will be implemented in binding to PCTE 1.5 procedure copy_to_foreign_system ( file : in Pcte.object_reference; foreign_system : in Pcte.object_reference; foreign_name : in Pcte.string; foreign_parameters : in Pcte.string; status : in Pcte_error.handle := EXCEPTION_ONLY); -- these routines were added to provide standard IO contents handles procedure standard_input (contents : in out Pcte_contents.handle); procedure standard_output (contents : in out Pcte_contents.handle); procedure standard_error (contents : in out Pcte_contents.handle); private -- implementation-defined type fildes is new standard.integer; type contents_type is (FILE, PIPE, DEVICE); type position_handle is new Pcte.natural; type handle_rec is record fd : fildes; contents : contents_type := file; amode : opening_mode; nb_io : standard.boolean; inherit : standard.boolean; io_type : positioning := sequential; pos : position_handle := 0; -- add more as we figure out what we need end record; type handle is access handle_rec; end Pcte_contents;