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 - downloadIndex: ┃ B T ┃
Length: 2153 (0x869) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧
with Text_Io; with Bug; package body File is Lookahead : Boolean; Current_Char : Character; The_File : Text_Io.File_Type; Include_File : Text_Io.File_Type; Read : Text_Io.File_Mode := Text_Io.In_File; function Is_Include_Open return Boolean is begin return Text_Io.Is_Open (Include_File); end Is_Include_Open; procedure Open (Fichier_Name : String) is begin Lookahead := False; if Text_Io.Is_Open (Include_File) then raise Bug.Too_Many_Includes; elsif Text_Io.Is_Open (The_File) then Text_Io.Open (File => Include_File, Mode => Read, Name => Fichier_Name, Form => ""); Text_Io.Set_Input (Include_File); else Text_Io.Open (File => The_File, Mode => Read, Name => Fichier_Name, Form => ""); Text_Io.Set_Input (The_File); end if; end Open; procedure Close is begin if Is_Include_Open then Text_Io.Close (File => Include_File); Text_Io.Set_Input (The_File); else Text_Io.Close (File => The_File); end if; end Close; function End_Of_Line return Boolean is begin return Text_Io.End_Of_Line; end End_Of_Line; function At_End return Boolean is begin if Lookahead then return False; else return Text_Io.End_Of_File; end if; end At_End; procedure Next is begin if (Lookahead) then Lookahead := False; elsif End_Of_Line then Text_Io.Skip_Line; Current_Char := Ascii.Cr; else Text_Io.Get (Current_Char); end if; end Next; function Value return Character is begin return Current_Char; end Value; function Get return Character is begin Next; return Value; end Get; procedure Unget is begin Lookahead := True; end Unget; end File;