|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 4318 (0x10de) Types: TextFile Names: »B«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00 └─⟦0c20f784e⟧ »DATA« └─⟦1abbe589f⟧ └─⟦059497ac5⟧ └─⟦this⟧
with Xlbt_Arithmetic; use Xlbt_Arithmetic; with Xlbt_Basic3; use Xlbt_Basic3; with Xlbt_Font3; use Xlbt_Font3; with Xlbt_Hint3; use Xlbt_Hint3; with Xlbt_Key3; use Xlbt_Key3; with Xlbt_Keyboard3; use Xlbt_Keyboard3; with Xlbt_Misc; use Xlbt_Misc; with Xlbt_Pointer; use Xlbt_Pointer; with Xlbt_String; use Xlbt_String; with Xlbt_String16; use Xlbt_String16; with Xlbmt_Network_Types; use Xlbmt_Network_Types; with Xlbmp_Generic_Converters; use Xlbmp_Generic_Converters; package body Xlbip_Base_Converters is ------------------------------------------------------------------------------ -- X Library Internal Basic Converters -- -- Xlbip_Base_Converters - Protocol converters for basic types. ------------------------------------------------------------------------------ -- Copyright 1989 - 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. ------------------------------------------------------------------------------ -- --\f -- procedure To_Raw (Raw : out X_Raw_Data_Array; Str : String) is -- ------------------------------------------------------------------------------ -- -- Convert a normal 7-bit Ada string into an X Byte Array. -- ------------------------------------------------------------------------------ -- Str_Last : Integer := Str'Last; -- begin -- if Str'Length /= Raw'Length then -- raise Constraint_Error; -- else -- for I in reverse Raw'Range loop -- Raw (I) := Character'Pos (Str (Str_Last)); -- Str_Last := Str_Last - 1; -- end loop; -- end if; -- end To_Raw; -- -- --\f -- procedure From_Raw (Str : out String; Raw : X_Raw_Data_Array) is -- ------------------------------------------------------------------------------ -- -- Convert an X_Raw_Data_Array into a normal 7-bit string. Chop each -- -- character to 7 bits as we go. -- ------------------------------------------------------------------------------ -- Raw_Last : X_Raw_Data_Index := Raw'Last; -- begin -- if Str'Length /= Raw'Length then -- raise Constraint_Error; -- else -- for I in reverse Str'Range loop -- Str (I) := Character'Val -- (abs (S_Short (Raw (Raw_Last)) rem 128)); -- Raw_Last := Raw_Last - 1; -- end loop; -- end if; -- end From_Raw; -- -- --\f -- procedure From_Raw (Str : out String; -- Raw : X_Raw_Data_Array; -- Trans : X_Raw_Character_Array) is -- ------------------------------------------------------------------------------ -- -- Convert an X_Raw_Data_Array into a normal 7-bit string. Translates -- -- each Byte in the Raw via the Trans array and returns that result. -- ------------------------------------------------------------------------------ -- Raw_Last : X_Raw_Data_Index := Raw'Last; -- begin -- if Str'Length /= Raw'Length then -- raise Constraint_Error; -- else -- for I in reverse Str'Range loop -- Str (I) := Trans (Raw (Raw_Last)); -- Raw_Last := Raw_Last - 1; -- end loop; -- end if; -- end From_Raw; -- -- --\f end Xlbip_Base_Converters;