-- -- -------------------------------------------------------------------------------- -- -- OSI_Standard -- -- This package defines the filename character set used by the -- OSI packages as well as some routines to manipulate the -- character/strings. The package also defines constants which -- indicates the portable maximum length of a Filename and a -- Pathname. A filename is composed of a sequence of OSI -- characters with a range of 1 to 14. -- -- -- -- -- -- Gerardo A. Colon -- 18 July 1990 -- -- Science Applications International Corporation --
311 Park Place Boulevard, Suite 360 --
Clearwater, Florida 34619 -- -- Developed under task S40 of the STARS program. -- -- -- -- -- Dependencies => -- ( Operating_System => None , -- Compiler => None , -- Device => None ) ; -- -- -------------------------------------------------------------------------------- pragma Page ; package OSI_Standard is Portable_Filename_Limit : constant := 14 ; -- -- This constant defines the portable maximum length for a filename. -- Portable_Pathname_Limit : constant := 255 ; -- -- This constant defines the portable maximum length for a pathname. -- Portable_Open_Files : constant := 16 ; -- -- This constant defines the portable maximum number of files a process can -- have open at one time. -- type OSI_Character is new Character ; -- -- This is a derived type from the Ada predefined type Character. The reason -- we decided to make it a derived type from the Ada predefined character -- instead of a subtype, is that we want to differentiate betwwen the two -- types. In this implementation and OSI_Character happens to be the same -- as a character, but that is not neccessarily true for other future -- implementations. That is the reason why we define conversion and -- concatenation operations for OSI_Strings and Ada predefined Characters and -- Strings. -- type OSI_String is array ( Positive range <> ) of OSI_Character ; -- -- This type is used to represent a filename. The type is just an array -- of OSI_Character. -- function To_OSI_String ( The_String : in String ) return OSI_String ; -------------------------------------------------------------------------------- -- -- To_OSI_String -- -- This function converts the Ada predefined String given by -- The_String to an OSI_String and returns the OSI_String. -- -- None. -- -- -------------------------------------------------------------------------------- function To_String ( The_OSI_String : in OSI_String ) return String ; -------------------------------------------------------------------------------- -- -- To_String -- -- This function converts the OSI_String given by The_OSI_String -- to an Ada predefined String and returns the String. -- -- Constraint_Error => -- The_OSI_String contains characters not supported by the -- Ada predefined Character set. -- -- -------------------------------------------------------------------------------- function "&" ( Left : String ; Right : OSI_String ) return OSI_String ; -------------------------------------------------------------------------------- -- -- "&" -- -- This function concatenates an OSI_String with an Ada predefined -- string. The result of the concatenation is an OSI_String -- which is returned by the function. -- -- None. -- -- -------------------------------------------------------------------------------- function "&" ( Left : Character ; Right : OSI_String ) return OSI_String ; -------------------------------------------------------------------------------- -- -- "&" -- -- This function concatenates an OSI_String with an Ada predefined -- character. The result of the concatenation is an OSI_String -- which is returned by the function. -- -- None. -- -- -------------------------------------------------------------------------------- function "&" ( Left : OSI_String ; Right : String ) return OSI_String ; -------------------------------------------------------------------------------- -- -- "&" -- -- This function concatenates an OSI_String with an Ada predefined -- string. The result of the concatenation is an OSI_String -- which is returned by the function. -- -- None. -- -- -------------------------------------------------------------------------------- function "&" ( Left : OSI_String ; Right : Character ) return OSI_String ; -------------------------------------------------------------------------------- -- -- "&" -- -- This function concatenates an OSI_String with an Ada predefined -- character. The result of the concatenation is an OSI_String -- which is returned by the function. -- -- None. -- -- -------------------------------------------------------------------------------- end OSI_Standard ; --