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

⟦609b7c7a1⟧ TextFile

    Length: 3820 (0xeec)
    Types: TextFile
    Notes: R1k Text-file segment

Derivation

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

TextFile


with Text_Io;

package body Filtre_D_Entree is
    Anticipation : array (1 .. 2) of Character;
    Compte : Natural := 0;

    procedure Entrer (Les_Elements : out string;len : out natural) is
    begin
            Text_Io.Get_line (Les_Elements,len);
    exception
        when others =>
            Text_Io.Put_Line ("Erreur");
    end Entrer;

    procedure Purger is
    begin
        Compte := 0;
    end Purger;

    procedure File_Entrer (L_Element : out Character) is
    begin
        if Compte = 0 then
            if Text_Io.End_Of_Line then
                L_Element := Termine_Ligne;
                if Text_Io.End_Of_Page then
                    Anticipation (1) := Termine_Page;
                    Compte := 1;
                    if Text_Io.End_Of_File then
                        Anticipation (2) := Termine_Fichier;
                        Compte := 2;
                    else
                        Text_Io.Skip_Page;
                    end if;
                else
                    Text_Io.Skip_Line;
                end if;
            else
                Text_Io.Get (L_Element);
            end if;
        else
            L_Element := Anticipation (1);
            if Anticipation (1) /= Termine_Fichier then
                Anticipation (1) := Anticipation (2);
                Compte := Compte - 1;
            end if;
        end if;
    end File_Entrer;

end Filtre_D_Entree;

with librairy_constants;
package Mots is
    Max_Mots : constant := librairy_constants.Max_Id;
    type Mot is private;
    type tableau is private;
    
        procedure Creer (Le_Mot : out Mot; Avec_La_Valeur : in String);
        procedure Creer (Les_Mots : out tableau; Avec_La_Valeur : in String);
        function Valeur (Du_Mot : in Mot) return String;
        function Valeur (Du_Mot : in tableau;index : in natural) return String;
        procedure creer_table (Table_Mots : in out tableau; Avec_La_Valeur : in String;nombre_mots : in out natural);
private
        type Mot is access String;
        type tableau is array(1..Max_Mots) of Mot;
end Mots;

procedure Main;

package Numeros_De_Lignes is
    type Numero is range 1 .. Integer'Last;
end Numeros_De_Lignes;

with Mots, Numeros_De_Lignes;

package Document is

    procedure File_Get (Le_Mot : out Mots.Mot;
                        Le_Numero : out Numeros_De_Lignes.Numero);
    function En_Fin_De_Fichier return Boolean;
    procedure Fopen (File_Name : in String);

    procedure Fclose;
    procedure Open;
    procedure Close;

        procedure Get (Les_Mots : in out Mots.tableau;
                                     tab_len : out natural);

        Mot_Trop_Long : exception;
        Fin_De_Fichier : exception;
end Document;


package Filtre_D_Entree is
    Termine_Ligne : constant Character := Ascii.Cr;
    Termine_Page : constant Character := Ascii.Ff;
    Termine_Fichier : constant Character := Ascii.Eot;
    procedure Entrer (Les_Elements : out string;len : out natural);
    procedure Purger;  
    procedure File_Entrer (L_Element : out Character);

end Filtre_D_Entree;


with Mots;

package Gestion_De_Tables is

    subtype Taille_Table is Integer range 1 .. 80;
    type P_String is access String;
    type Tableau is array (Taille_Table) of P_String;

    function Chercher_Dans_Table
                                (Un_Tableau : Tableau; Le_Mot_Lu : Mots.tableau;index : natural) return Boolean;

end Gestion_De_Tables;

package Interpreteur is

    procedure Interprete;
    procedure File_Interprete (File_Name : in String);
    Out_Of_Words : exception;
    End_Of_Play : exception;

end Interpreteur;

package Nombre_De_Mots is
    subtype Numero is Natural;
    Nombre_Max_Mots : constant Numero := 4;
end Nombre_De_Mots;


package librairy_constants is

Max_Id : constant := 80;

end librairy_constants