|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body File, seg_0427d5
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
------------------------------------------------------------------------ -- <UNIT> FILE ------------------------------------------------------------------------ -- -- <DESCRIPTION> This package defines operations for reading characters -- from a stream. -- -- <AUTHOR> Barthe Raphael, Beck Didier, Kempe Laurent -- <VERSION> 1.0 -- <DATE> 05-Oct-94 -- <MODIFY> 05-Oct-95 -- -- <PKG USED> TEXT_IO ------------------------------------------------------------------------ package body File is Currentchar : Character; -- CurrentChar is the last character read from the stream. Lookahead : Boolean := False; -- LookAhead is a flag to know if we've already read the next character. procedure Open is -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Open -- -- <DESCRIPTION> Open the stream. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- begin Lookahead := False; end Open; function Atend return Boolean is -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> AtEnd -- -- <DESCRIPTION> Check if we have read the last character of the stream. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- begin if Currentchar = Ascii.Eot then return True; else return False; end if; end Atend; procedure Next (File : Text_Io.File_Type) is -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Next -- -- <DESCRIPTION> Read the next character from the stream. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- begin if Lookahead then Lookahead := False; else if Text_Io.End_Of_File (File) then Currentchar := Ascii.Eot; elsif Text_Io.End_Of_Line (File) then Text_Io.Skip_Line (File); Currentchar := Ascii.Cr; else Text_Io.Get (File, Currentchar); end if; end if; end Next; function Getvalue return Character is -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Value -- -- <DESCRIPTION> return the last character read from the stream. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- begin return Currentchar; end Getvalue; function Get (File : Text_Io.File_Type) return Character is -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Get -- -- <DESCRIPTION> Get a character from the stream and return it. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- begin Next (File); return Getvalue; end Get; procedure Unget is -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> UnGet -- -- <DESCRIPTION> Erase the last character read from the stream. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- begin Lookahead := True; end Unget; end File;
nblk1=5 nid=0 hdr6=a [0x00] rec0=21 rec1=00 rec2=01 rec3=01e [0x01] rec0=12 rec1=00 rec2=05 rec3=038 [0x02] rec0=21 rec1=00 rec2=02 rec3=050 [0x03] rec0=21 rec1=00 rec2=03 rec3=072 [0x04] rec0=0b rec1=00 rec2=04 rec3=001 tail 0x2153dbaa2862f718affdd 0x42a00088462060003