|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Xlbp_U_Char_Converters, seg_004f43
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Xlbt_Arithmetic;
use Xlbt_Arithmetic;
package body Xlbp_U_Char_Converters is
------------------------------------------------------------------------------
-- X Library Basic Converters
--
-- Xlbp_U_Char_Converters - Conversion to/from U_Char_Array.
------------------------------------------------------------------------------
-- Copyright 1990 - 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
procedure To_Uca (Uca : out U_Char_Array;
Str : String) is
------------------------------------------------------------------------------
-- Convert a normal 7-bit Ada string into an U_Char_Array.
------------------------------------------------------------------------------
Str_Last : Integer := Str'Last;
begin
if Str'Length /= Uca'Length then
raise Constraint_Error;
else
for I in reverse Uca'Range loop
Uca (I) := Character'Pos (Str (Str_Last));
Str_Last := Str_Last - 1;
end loop;
end if;
end To_Uca;
--\x0c
procedure From_Uca (Str : out String;
Uca : U_Char_Array) is
------------------------------------------------------------------------------
-- Convert an U_Char_Array into a normal 7-bit string. Chop each
-- character to 7 bits as we go.
------------------------------------------------------------------------------
Uca_Last : S_Long := Uca'Last;
begin
if Str'Length /= Uca'Length then
raise Constraint_Error;
else
for I in reverse Str'Range loop
Str (I) := Character'Val (Uca (Uca_Last) rem 128);
Uca_Last := Uca_Last - 1;
end loop;
end if;
end From_Uca;
--\x0c
procedure From_Uca (Str : out String;
Uca : U_Char_Array;
Trans : U_Character_Array) is
------------------------------------------------------------------------------
-- Convert an U_Char_Array into a normal 7-bit string. Translates
-- each U_Char in the Uca via the Trans array and returns that result.
------------------------------------------------------------------------------
Uca_Last : S_Long := Uca'Last;
begin
if Str'Length /= Uca'Length then
raise Constraint_Error;
else
for I in reverse Str'Range loop
Str (I) := Trans (Uca (Uca_Last));
Uca_Last := Uca_Last - 1;
end loop;
end if;
end From_Uca;
--\x0c
end Xlbp_U_Char_Converters;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=17 rec1=00 rec2=01 rec3=054
[0x01] rec0=13 rec1=00 rec2=02 rec3=030
[0x02] rec0=1b rec1=00 rec2=03 rec3=05a
[0x03] rec0=15 rec1=00 rec2=04 rec3=000
tail 0x2170069908197818de7fb 0x42a00088462063203