|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 14336 (0x3800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Vstring_Equal, seg_005839
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Arithmetic;
use Arithmetic;
with Vstring_Case;
use Vstring_Case;
with Vstring_Type;
use Vstring_Type;
package body Vstring_Equal is
------------------------------------------------------------------------------
-- VString Equality Tests
------------------------------------------------------------------------------
-- 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.
------------------------------------------------------------------------------
--\x0c
function Equal (Vstr1 : Vstring_Data;
Vstr2 : Vstring_Data) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Vstr1.Chars (I) /= Vstr2.Chars (I) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring_Data;
Vstr2 : Vstring) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Vstr1.Chars (I) /= Vstr2.Chars (I) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring;
Vstr2 : Vstring_Data) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Vstr1.Chars (I) /= Vstr2.Chars (I) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring;
Vstr2 : Vstring) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Vstr1.Chars (I) /= Vstr2.Chars (I) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring_Data;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length = Vstr2'Length then
for I in reverse 0 .. Vstr1.Length - 1 loop
if Vstr1.Chars (I + 1) /= Vstr2 (I + Vstr2'First) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring_Data;
Vstr2 : Character) return Boolean is
begin
return Vstr1.Length /= 1 or else Vstr1.Chars (1) /= Vstr2;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring_Data;
Vstr2 : Character;
Copies : S_Natural) return Boolean is
begin
if Vstr1.Length = Copies then
for I in reverse 1 .. Copies loop
if Vstr1.Chars (I) /= Vstr2 then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length = Vstr2'Length then
for I in reverse 0 .. Vstr1.Length - 1 loop
if Vstr1.Chars (I + 1) /= Vstr2 (I + Vstr2'First) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring;
Vstr2 : Character) return Boolean is
begin
return Vstr1.Length /= 1 or else Vstr1.Chars (1) /= Vstr2;
end Equal;
--\x0c
function Equal (Vstr1 : Vstring;
Vstr2 : Character;
Copies : S_Natural) return Boolean is
begin
if Vstr1.Length = Copies then
for I in reverse 1 .. Copies loop
if Vstr1.Chars (I) /= Vstr2 then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring_Data;
Vstr2 : Vstring_Data) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Uc_Char (Vstr1.Chars (I)) /= Uc_Char (Vstr2.Chars (I)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring_Data;
Vstr2 : Vstring) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Uc_Char (Vstr1.Chars (I)) /= Uc_Char (Vstr2.Chars (I)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring;
Vstr2 : Vstring_Data) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Uc_Char (Vstr1.Chars (I)) /= Uc_Char (Vstr2.Chars (I)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring;
Vstr2 : Vstring) return Boolean is
begin
if Vstr1.Length = Vstr2.Length then
for I in reverse 1 .. Vstr1.Length loop
if Uc_Char (Vstr1.Chars (I)) /= Uc_Char (Vstr2.Chars (I)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring_Data;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length = Vstr2'Length then
for I in reverse 0 .. Vstr1.Length - 1 loop
if Uc_Char (Vstr1.Chars (I + 1)) /=
Uc_Char (Vstr2 (I + Vstr2'First)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring_Data;
Vstr2 : Character) return Boolean is
begin
return Vstr1.Length /= 1 or else
Uc_Char (Vstr1.Chars (1)) /= Uc_Char (Vstr2);
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring_Data;
Vstr2 : Character;
Copies : S_Natural) return Boolean is
Chr : constant Character := Uc_Char (Vstr2);
begin
if Vstr1.Length = Copies then
for I in reverse 1 .. Copies loop
if Uc_Char (Vstr1.Chars (I)) /= Chr then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length = Vstr2'Length then
for I in reverse 0 .. Vstr1.Length - 1 loop
if Uc_Char (Vstr1.Chars (I + 1)) /=
Uc_Char (Vstr2 (I + Vstr2'First)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring;
Vstr2 : Character) return Boolean is
begin
return Vstr1.Length /= 1 or else
Uc_Char (Vstr1.Chars (1)) /= Uc_Char (Vstr2);
end Uc_Equal;
--\x0c
function Uc_Equal (Vstr1 : Vstring;
Vstr2 : Character;
Copies : S_Natural) return Boolean is
Chr : constant Character := Uc_Char (Vstr2);
begin
if Vstr1.Length = Copies then
for I in reverse 1 .. Copies loop
if Uc_Char (Vstr1.Chars (I)) /= Chr then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal;
--\x0c
function Equal_Prefix (Vstr1 : Vstring_Data;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length >= Vstr2'Length then
for I in reverse S_Natural range 0 .. Vstr2'Length - 1 loop
if Vstr1.Chars (I + 1) /= Vstr2 (I + Vstr2'First) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal_Prefix;
--\x0c
function Equal_Prefix (Vstr1 : Vstring;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length >= Vstr2'Length then
for I in reverse S_Natural range 0 .. Vstr2'Length - 1 loop
if Vstr1.Chars (I + 1) /= Vstr2 (I + Vstr2'First) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Equal_Prefix;
--\x0c
function Uc_Equal_Prefix (Vstr1 : Vstring_Data;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length >= Vstr2'Length then
for I in reverse S_Natural range 0 .. Vstr2'Length - 1 loop
if Uc_Char (Vstr1.Chars (I + 1)) /=
Uc_Char (Vstr2 (I + Vstr2'First)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal_Prefix;
--\x0c
function Uc_Equal_Prefix (Vstr1 : Vstring;
Vstr2 : E_String) return Boolean is
begin
if Vstr1.Length >= Vstr2'Length then
for I in reverse S_Natural range 0 .. Vstr2'Length - 1 loop
if Uc_Char (Vstr1.Chars (I + 1)) /=
Uc_Char (Vstr2 (I + Vstr2'First)) then
return False;
end if;
end loop;
return True;
end if;
return False;
end Uc_Equal_Prefix;
--\x0c
end Vstring_Equal;
nblk1=d
nid=0
hdr6=1a
[0x00] rec0=19 rec1=00 rec2=01 rec3=06a
[0x01] rec0=19 rec1=00 rec2=02 rec3=00a
[0x02] rec0=20 rec1=00 rec2=03 rec3=056
[0x03] rec0=22 rec1=00 rec2=04 rec3=046
[0x04] rec0=20 rec1=00 rec2=05 rec3=070
[0x05] rec0=20 rec1=00 rec2=06 rec3=018
[0x06] rec0=20 rec1=00 rec2=07 rec3=01e
[0x07] rec0=21 rec1=00 rec2=08 rec3=006
[0x08] rec0=1e rec1=00 rec2=09 rec3=046
[0x09] rec0=1e rec1=00 rec2=0a rec3=012
[0x0a] rec0=1e rec1=00 rec2=0b rec3=016
[0x0b] rec0=1d rec1=00 rec2=0c rec3=044
[0x0c] rec0=0b rec1=00 rec2=0d rec3=000
tail 0x21500af2881978f0855ec 0x42a00088462063203