DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦66b1cf270⟧ TextFile

    Length: 5896 (0x1708)
    Types: TextFile
    Names: »V«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦591c5b094⟧ 
                └─⟦this⟧ 

TextFile

with Arithmetic;
use Arithmetic;
with Vstring_Type;
use Vstring_Type;

package Vstring_Query is
------------------------------------------------------------------------------
-- VString Query and SubString Functions
------------------------------------------------------------------------------
-- Copyright 1988 - 1991 by Rational, Santa Clara, California.
--
--                  All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the name of Rational not be used in
-- advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- Rational disclaims all warranties with regard to this software, including
-- all implied warranties of merchantability and fitness, in no event shall
-- Rational be liable for any special, indirect or consequential damages or
-- any damages whatsoever resulting from loss of use, data or profits, whether
-- in an action of contract, negligence or other tortious action, arising out
-- of or in connection with the use or performance of this software.
------------------------------------------------------------------------------

    procedure Empty_Vstring (Vstr : in out Vstring_Data);
    procedure Empty_Vstring (Vstr : Vstring);
    ----Sets the string to be Empty; null string.

    function Length (Vstr : Vstring_Data) return S_Natural;
    function Length (Vstr : Vstring)      return S_Natural;
    ----Called to obtain the current length of the string.

    function Maximum_Length (Vstr : Vstring_Data) return S_Natural;
    function Maximum_Length (Vstr : Vstring)      return S_Natural;
    ----Called to obtain the maximum number of characters a string may hold.

    function Length_Left (Vstr : Vstring_Data) return S_Natural;
    function Length_Left (Vstr : Vstring)      return S_Natural;
    ----Called to obtain the amount of room remaining in a string.

    function Char_At (Vstr : Vstring_Data; Pos : S_Positive) return Character;
    function Char_At (Vstr : Vstring; Pos : S_Positive)      return Character;
    ----Called to return character Pos in the string.  Returns Ascii.Nul if
    --  the character is not present.

    function First (Vstr : Vstring_Data) return Character;
    function First (Vstr : Vstring)      return Character;
    ----Returns the first character in the Vstring; returns Ascii.Nul if the
    --  string is empty.

    procedure Lop_First (Vstr : in out Vstring_Data; Char : out Character);
    function  Lop_First (Vstr : Vstring) return Character;
    ----Just like First except that the character is removed from the Vstring.

    function Last (Vstr : Vstring_Data) return Character;
    function Last (Vstr : Vstring)      return Character;
    ----Returns the last character in the Vstring; returns Ascii.Nul if the
    --  string is empty.

    procedure Lop_Last (Vstr : in out Vstring_Data; Char : out Character);
    function  Lop_Last (Vstr : Vstring) return Character;
    ----Just like Last except that the character is removed from the Vstring.

    Inf : constant S_Positive := S_Positive'Last;   -- Infinity

    function Substring_To (Vstr : Vstring_Data;  
                           Pos  : S_Positive;  
                           To   : S_Positive) return E_String;
    function Substring_To (Vstr : Vstring;  
                           Pos  : S_Positive;  
                           To   : S_Positive) return E_String;
    ----Called to obtain the substring of a Vstring which is contained in
    --  Vstr.Chars(Pos..To).  If To > Vstr.Length then we return
    --  Vstr.Chars(Pos..Vstr.Length).  If Pos > Vstr.Length then we return
    --  the null string.

    procedure Truncstring_To (Vstr : in out Vstring_Data;  
                              Pos  :        S_Positive;  
                              To   :        S_Positive);
    procedure Truncstring_To (Vstr : Vstring;  
                              Pos  : S_Positive;  
                              To   : S_Positive);
    ----Called to truncate a string down to the substring contained in
    --  Vstr.Chars(Pos..To).  If To > Vstr.Length then we truncate it to
    --  Vstr.Chars(Pos..Vstr.Length).  If Pos > Vstr.Length then the string
    --  is set to the null string.

    function Substring_For (Vstr : Vstring_Data;  
                            Pos  : S_Positive;  
                            Cnt  : S_Positive) return E_String;
    function Substring_For (Vstr : Vstring;  
                            Pos  : S_Positive;  
                            Cnt  : S_Positive) return E_String;
    ----Called to obtain the substring of a Vstring which is contained in
    --  Vstr.Chars(Pos..Pos+Cnt-1).  If Pos+Cnt-1 > Vstr.Length then we return
    --  Vstr.Chars(Pos..Vstr.Length).  If Pos > Vstr.Length then we return
    --  the null string.

    procedure Truncstring_For (Vstr : in out Vstring_Data;  
                               Pos  :        S_Positive;  
                               Cnt  :        S_Positive);
    procedure Truncstring_For (Vstr : Vstring;  
                               Pos  : S_Positive;  
                               Cnt  : S_Positive);
    ----Called to truncate a string down to the substring contained in
    --  Vstr.Chars(Pos..Pos+Cnt-1).  If Pos+Cnt-1 > Vstr.Length then we truncate it to
    --  Vstr.Chars(Pos..Vstr.Length).  If Pos > Vstr.Length then the string
    --  is set to the null string.

    function To_String (Vstr : Vstring_Data) return E_String;
    function To_String (Vstr : Vstring)      return E_String;
    ----Called to obtain the full string contained in a Vstring.

end Vstring_Query;