DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦4247c46c7⟧ Ada Source

    Length: 14336 (0x3800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Xlbt_Arithmetic, seg_005a2d

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



--/ if TeleGen2 and then Unix then
--// with Float_Text_Io;
--/ end if;

with Text_Io;  
with Unchecked_Deallocation;

with Xlbmt_Numeric_Types;

package Xlbt_Arithmetic is
------------------------------------------------------------------------------
-- X Library Arithmetic Types
--
-- Xlbt_Arithmetic - Differing sizes of arithmetic types and types constructed
--  from arithmetic types, e.g. arrays.
------------------------------------------------------------------------------
-- 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.
------------------------------------------------------------------------------

--\x0c
    ----Scalar Types

    type S_Char  is new Xlbmt_Numeric_Types.Eight_Bits_Signed;  
    type S_Short is new Xlbmt_Numeric_Types.Sixteen_Bits_Signed;  
    type S_Long  is new Xlbmt_Numeric_Types.Thirty_Two_Bits_Signed;

    subtype S_Natural  is S_Long range 0 .. S_Long'Last;  
    subtype S_Positive is S_Long range 1 .. S_Long'Last;

    type U_Char  is new Xlbmt_Numeric_Types.Eight_Bits_Unsigned;  
    type U_Short is new Xlbmt_Numeric_Types.Sixteen_Bits_Unsigned;

--/ if TeleGen2_2d_Bug then
--//     subtype Telegen2_2d_Bug is Integer range 0 .. 255;
--/ end if;

    subtype U_Short_Positive is U_Short range 1 .. U_Short'Last;

----Unfortunately, a 32-bit unsigned type is not portable to most present-day
--  Ada implementations.  The LRM would require them to implemented at least
--  33-bit signed arithmetic (or 64-bit arithmetic) and most vendors do not
--  do that.  Xlib is thus forced to used 32-bit signed values where that is
--  not entirely appropriate.
--
--    type U_Long  is new Xlbmt_Numeric_Types.Thirty_Two_Bits_Unsigned;
--    type U_Long_Array  is array (S_Natural range <>) of U_Long;
--    type U_Long_List  is access U_Long_Array;
--    package U_Long_Io is new Text_Io.Integer_Io (U_Long);
--    None_U_Long_List  : constant U_Long_List  := null;
--    pragma Enabl_Deallocation (U_Long_List);
--    procedure Free_U_Char_List is
--       new Unchecked_Deallocation (U_Long_Array, U_Long_List);

----I/O packages

    package S_Long_Io is new Text_Io.Integer_Io (S_Long);

--/ if TeleGen2 and then Unix then
--//     package Float_Io renames Float_Text_Io;
--/ else
    package Float_Io is new Text_Io.Float_Io (Float);
--/ end if;

----Signed Array Types

    type S_Char_Array  is array (S_Natural range <>) of S_Char;  
    type S_Short_Array is array (S_Natural range <>) of S_Short;  
    type S_Long_Array  is array (S_Natural range <>) of S_Long;

--/ if Pack then
--//     pragma Pack (S_Char_Array);
--//     pragma Pack (S_Short_Array);
--//     pragma Pack (S_Long_Array);
--/ end if;

    type S_Char_List  is access S_Char_Array;  
    type S_Short_List is access S_Short_Array;  
    type S_Long_List  is access S_Long_Array;

--/ if Enable_Deallocation then
    pragma Enable_Deallocation (S_Char_List);     pragma Enable_Deallocation (S_Short_List);  
    pragma Enable_Deallocation (S_Long_List);
--/ end if;

    None_S_Char_List  : constant S_Char_List  := null;  
    None_S_Short_List : constant S_Short_List := null;  
    None_S_Long_List  : constant S_Long_List  := null;

    procedure Free_S_Char_List  is  
       new Unchecked_Deallocation (S_Char_Array, S_Char_List);  
    procedure Free_S_Short_List is  
       new Unchecked_Deallocation (S_Short_Array, S_Short_List);  
    procedure Free_S_Long_List  is  
       new Unchecked_Deallocation (S_Long_Array, S_Long_List);

----Unsigned Array Types

    type U_Char_Array  is array (S_Natural range <>) of U_Char;  
    type U_Short_Array is array (S_Natural range <>) of U_Short;

--/ if Pack then
--//     pragma Pack (U_Char_Array);
--//     pragma Pack (U_Short_Array);
--/ end if;

    type U_Char_List  is access U_Char_Array;  
    type U_Short_List is access U_Short_Array;

--/ if Enable_Deallocation then
    pragma Enable_Deallocation (U_Char_List);  
    pragma Enable_Deallocation (U_Short_List);
--/ end if;

    None_U_Char_List  : constant U_Char_List  := null;  
    None_U_Short_List : constant U_Short_List := null;


    procedure Free_U_Char_List  is  
       new Unchecked_Deallocation (U_Char_Array, U_Char_List);  
    procedure Free_U_Short_List is  
       new Unchecked_Deallocation (U_Short_Array, U_Short_List);


--\x0c
    --/ if TeleGen2_Derive_Bug then
--//
--// ------------------------------------------------------------------------------
--// -- TeleSoft's TeleGen2 68k Unix has a bug in it.  Derived types don't inherit
--// -- the functions of their base types.  Ack...  Fix this with this hack.
--// -- Duplicate lots of code.
--// ------------------------------------------------------------------------------
--//
--// ------------------------------------------------------------------------------
--// -- Perform bit-wise operations on signed 32-bit values.
--// ------------------------------------------------------------------------------
--//
--//     function "and" (A : S_Long; B : S_Long)  return S_Long;
--//     function "or"  (A : S_Long; B : S_Long)  return S_Long;
--//     function "xor" (A : S_Long; B : S_Long)  return S_Long;
--//     function "not" (A : S_Long)              return S_Long;
--//     function Shift (A : S_Long; B : Integer) return S_Long;
--//
--// ------------------------------------------------------------------------------
--// -- Perform bit-wise operations on unsigned 16-bit values.
--// ------------------------------------------------------------------------------
--//
--//     function "and" (A : U_Short; B : U_Short) return U_Short;
--//     function "or"  (A : U_Short; B : U_Short) return U_Short;
--//     function "xor" (A : U_Short; B : U_Short) return U_Short;
--//     function "not" (A : U_Short)              return U_Short;
--//     function Shift (A : U_Short; B : Integer) return U_Short;
--//
--// ------------------------------------------------------------------------------
--// -- Perform bit-wise operations on unsigned 8-bit values.
--// ------------------------------------------------------------------------------
--//
--//     function "and" (A : U_Char; B : U_Char)  return U_Char;
--//     function "or"  (A : U_Char; B : U_Char)  return U_Char;
--//     function "xor" (A : U_Char; B : U_Char)  return U_Char;
--//     function "not" (A : U_Char)              return U_Char;
--//     function Shift (A : U_Char; B : Integer) return U_Char;
--//
--/ end if;
end Xlbt_Arithmetic;  

E3 Meta Data

    nblk1=d
    nid=0
    hdr6=1a
        [0x00] rec0=1b rec1=00 rec2=01 rec3=012
        [0x01] rec0=13 rec1=00 rec2=02 rec3=05c
        [0x02] rec0=00 rec1=00 rec2=0d rec3=006
        [0x03] rec0=16 rec1=00 rec2=03 rec3=024
        [0x04] rec0=00 rec1=00 rec2=0c rec3=002
        [0x05] rec0=1f rec1=00 rec2=04 rec3=05e
        [0x06] rec0=01 rec1=00 rec2=0b rec3=002
        [0x07] rec0=1c rec1=00 rec2=05 rec3=024
        [0x08] rec0=00 rec1=00 rec2=0a rec3=010
        [0x09] rec0=19 rec1=00 rec2=06 rec3=04e
        [0x0a] rec0=00 rec1=00 rec2=09 rec3=006
        [0x0b] rec0=11 rec1=00 rec2=07 rec3=052
        [0x0c] rec0=0e rec1=00 rec2=08 rec3=000
    tail 0x21500d41681a48253be74 0x42a00088462063203