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

⟦63eb8fe6f⟧ Ada Source

    Length: 16384 (0x4000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, seg_03bd93

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



WITH Io_Exceptions;

PACKAGE Text_Io IS

   TYPE File_Type IS LIMITED PRIVATE;

   TYPE File_Mode IS (In_File, Out_File);

   TYPE    Count          IS RANGE 0 .. 1_000_000_000;
   SUBTYPE Positive_Count IS Count RANGE 1 .. Count'Last;
   Unbounded : CONSTANT Count := 0;  -- line and page length

   SUBTYPE Field       IS Integer RANGE 0 .. Integer'Last;
   SUBTYPE Number_Base IS Integer RANGE 2 .. 16;

   TYPE Type_Set IS (Lower_Case, Upper_Case);


   -- File Management

   PROCEDURE Create (File : IN OUT File_Type;
                     Mode :        File_Mode := Out_File;
                     Name :        String    := "";
                     Form :        String    := "");

   PROCEDURE Open (File : IN OUT File_Type;
                   Mode :        File_Mode;
                   Name :        String;
                   Form :        String := "");

   PROCEDURE Close  (File : IN OUT File_Type);
   PROCEDURE Delete (File : IN OUT File_Type);
   PROCEDURE Reset  (File : IN OUT File_Type; Mode : File_Mode);
   PROCEDURE Reset  (File : IN OUT File_Type);

   FUNCTION Mode (File : File_Type) RETURN File_Mode;
   FUNCTION Name (File : File_Type) RETURN String;
   FUNCTION Form (File : File_Type) RETURN String;

   FUNCTION Is_Open (File : File_Type) RETURN Boolean;


   -- Control of default input and output files

   PROCEDURE Set_Input  (File : File_Type);
   PROCEDURE Set_Output (File : File_Type);


   FUNCTION Standard_Input  RETURN File_Type;
   FUNCTION Standard_Output RETURN File_Type;

   FUNCTION Current_Input  RETURN File_Type;
   FUNCTION Current_Output RETURN File_Type;


   -- Specification of line and page lengths

   PROCEDURE Set_Line_Length (File : File_Type; To : Count);
   PROCEDURE Set_Line_Length (To : Count);

   PROCEDURE Set_Page_Length (File : File_Type; To : Count);
   PROCEDURE Set_Page_Length (To : Count);

   FUNCTION Line_Length (File : File_Type) RETURN Count;
   FUNCTION Line_Length                    RETURN Count;

   FUNCTION Page_Length (File : File_Type) RETURN Count;
   FUNCTION Page_Length                    RETURN Count;


   -- Column, Line and Page Control

   PROCEDURE New_Line (File : File_Type; Spacing : Positive_Count := 1);
   PROCEDURE New_Line (Spacing : Positive_Count := 1);

   PROCEDURE Skip_Line (File : File_Type; Spacing : Positive_Count := 1);
   PROCEDURE Skip_Line (Spacing : Positive_Count := 1);

   FUNCTION End_Of_Line (File : File_Type) RETURN Boolean;
   FUNCTION End_Of_Line                    RETURN Boolean;

   PROCEDURE New_Page (File : File_Type);
   PROCEDURE New_Page;

   PROCEDURE Skip_Page (File : File_Type);
   PROCEDURE Skip_Page;

   FUNCTION End_Of_Page (File : File_Type) RETURN Boolean;
   FUNCTION End_Of_Page                    RETURN Boolean;

   FUNCTION End_Of_File (File : File_Type) RETURN Boolean;
   FUNCTION End_Of_File                    RETURN Boolean;

   PROCEDURE Set_Col (File : File_Type; To : Positive_Count);
   PROCEDURE Set_Col (To : Positive_Count);

   PROCEDURE Set_Line (File : File_Type; To : Positive_Count);
   PROCEDURE Set_Line (To : Positive_Count);


   FUNCTION Col (File : File_Type) RETURN Positive_Count;
   FUNCTION Col                    RETURN Positive_Count;

   FUNCTION Line (File : File_Type) RETURN Positive_Count;
   FUNCTION Line                    RETURN Positive_Count;

   FUNCTION Page (File : File_Type) RETURN Positive_Count;
   FUNCTION Page                    RETURN Positive_Count;


   -- Character Input-Output

   PROCEDURE Get (File : File_Type; Item : OUT Character);
   PROCEDURE Get (Item : OUT Character);
   PROCEDURE Put (File : File_Type; Item : Character);
   PROCEDURE Put (Item : Character);


   -- String Input-Output

   PROCEDURE Get (File : File_Type; Item : OUT String);
   PROCEDURE Get (Item : OUT String);
   PROCEDURE Put (File : File_Type; Item : String);
   PROCEDURE Put (Item : String);

   PROCEDURE Get_Line
                (File : File_Type; Item : OUT String; Last : OUT Natural);
   PROCEDURE Get_Line (Item : OUT String; Last : OUT Natural);

   PROCEDURE Put_Line (File : File_Type; Item : String);
   PROCEDURE Put_Line (Item : String);


   -- Generic package for Input-Output of Integer Types

   GENERIC
      TYPE Num IS RANGE <>;
   PACKAGE Integer_Io IS

      Default_Width : Field       := Num'Width;
      Default_Base  : Number_Base := 10;

      PROCEDURE Get (File : File_Type; Item : OUT Num; Width : Field := 0);

      PROCEDURE Get (Item : OUT Num; Width : Field := 0);

      PROCEDURE Put (File  : File_Type;
                     Item  : Num;
                     Width : Field       := Default_Width;
                     Base  : Number_Base := Default_Base);

      PROCEDURE Put (Item  : Num;
                     Width : Field       := Default_Width;
                     Base  : Number_Base := Default_Base);

      PROCEDURE Get (From : String; Item : OUT Num; Last : OUT Positive);

      PROCEDURE Put (To   : OUT String;
                     Item :     Num;
                     Base :     Number_Base := Default_Base);
   END Integer_Io;


   -- Generic package for Input-Output of Floating Point Types

   GENERIC
      TYPE Num IS DIGITS <>;
   PACKAGE Float_Io IS

      Default_Fore : Field := 2;
      Default_Aft  : Field := Num'Digits - 1;
      Default_Exp  : Field := 3;


      PROCEDURE Get (File : File_Type; Item : OUT Num; Width : Field := 0);
      PROCEDURE Get (Item : OUT Num; Width : Field := 0);

      PROCEDURE Put (File : File_Type;
                     Item : Num;
                     Fore : Field := Default_Fore;
                     Aft  : Field := Default_Aft;
                     Exp  : Field := Default_Exp);

      PROCEDURE Put (Item : Num;
                     Fore : Field := Default_Fore;
                     Aft  : Field := Default_Aft;
                     Exp  : Field := Default_Exp);

      PROCEDURE Get (From : String; Item : OUT Num; Last : OUT Positive);

      PROCEDURE Put (To   : OUT String;
                     Item :     Num;
                     Aft  :     Field := Default_Aft;
                     Exp  :     Field := Default_Exp);
   END Float_Io;


   -- Generic package for Input-Output of Fixed Point Types

   GENERIC
      TYPE Num IS DELTA <>;
   PACKAGE Fixed_Io IS

      Default_Fore : Field := Num'Fore;
      Default_Aft  : Field := Num'Aft;
      Default_Exp  : Field := 0;

      PROCEDURE Get (File : File_Type; Item : OUT Num; Width : Field := 0);

      PROCEDURE Get (Item : OUT Num; Width : Field := 0);

      PROCEDURE Put (File : File_Type;
                     Item : Num;
                     Fore : Field := Default_Fore;
                     Aft  : Field := Default_Aft;
                     Exp  : Field := Default_Exp);

      PROCEDURE Put (Item : Num;
                     Fore : Field := Default_Fore;
                     Aft  : Field := Default_Aft;
                     Exp  : Field := Default_Exp);

      PROCEDURE Get (From : String; Item : OUT Num; Last : OUT Positive);

      PROCEDURE Put (To   : OUT String;
                     Item :     Num;
                     Aft  :     Field := Default_Aft;
                     Exp  :     Field := Default_Exp);
   END Fixed_Io;


   -- Generic package for Input-Output of Enumeration Types

   GENERIC
      TYPE Enum IS (<>);
   PACKAGE Enumeration_Io IS

      Default_Width   : Field    := 0;
      Default_Setting : Type_Set := Upper_Case;

      PROCEDURE Get (File : File_Type; Item : OUT Enum);
      PROCEDURE Get (Item : OUT Enum);

      PROCEDURE Put (File  : File_Type;
                     Item  : Enum;
                     Width : Field    := Default_Width;
                     Set   : Type_Set := Default_Setting);

      PROCEDURE Put (Item  : Enum;
                     Width : Field    := Default_Width;
                     Set   : Type_Set := Default_Setting);

      PROCEDURE Get (From : String; Item : OUT Enum; Last : OUT Positive);

      PROCEDURE Put (To   : OUT String;
                     Item :     Enum;
                     Set  :     Type_Set := Default_Setting);
   END Enumeration_Io;


   -- Exceptions

   Status_Error : EXCEPTION RENAMES Io_Exceptions.Status_Error;
   Mode_Error   : EXCEPTION RENAMES Io_Exceptions.Mode_Error;
   Name_Error   : EXCEPTION RENAMES Io_Exceptions.Name_Error;
   Use_Error    : EXCEPTION RENAMES Io_Exceptions.Use_Error;
   Device_Error : EXCEPTION RENAMES Io_Exceptions.Device_Error;
   End_Error    : EXCEPTION RENAMES Io_Exceptions.End_Error;
   Data_Error   : EXCEPTION RENAMES Io_Exceptions.Data_Error;
   Layout_Error : EXCEPTION RENAMES Io_Exceptions.Layout_Error;

PRIVATE
   TYPE File_Type IS NEW Boolean;
END Text_Io;

E3 Meta Data

    nblk1=f
    nid=0
    hdr6=1e
        [0x00] rec0=21 rec1=00 rec2=01 rec3=04e
        [0x01] rec0=01 rec1=00 rec2=0d rec3=012
        [0x02] rec0=1f rec1=00 rec2=02 rec3=070
        [0x03] rec0=01 rec1=00 rec2=0c rec3=006
        [0x04] rec0=1d rec1=00 rec2=03 rec3=000
        [0x05] rec0=02 rec1=00 rec2=0b rec3=038
        [0x06] rec0=20 rec1=00 rec2=04 rec3=020
        [0x07] rec0=1d rec1=00 rec2=0a rec3=058
        [0x08] rec0=02 rec1=00 rec2=05 rec3=03a
        [0x09] rec0=1f rec1=00 rec2=06 rec3=048
        [0x0a] rec0=00 rec1=00 rec2=0f rec3=004
        [0x0b] rec0=1f rec1=00 rec2=07 rec3=03e
        [0x0c] rec0=00 rec1=00 rec2=0e rec3=004
        [0x0d] rec0=1f rec1=00 rec2=08 rec3=018
        [0x0e] rec0=18 rec1=00 rec2=09 rec3=000
    tail 0x215347eba856574074f76 0x489e0066482863c01