|
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: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Buffer, seg_0046bb, separate Spreadsheet_Generic
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
separate (Spreadsheet_Generic) package body Buffer is Buf : String (1 .. 100); Index : Positive := Buf'First; Untouched : Boolean := True; subtype Printable_Characters is Character range ' ' .. '~'; procedure Clear is begin Index := Buf'First; Buf := Buf'Length * ' '; Untouched := True; end Clear; procedure Erase is begin while Index > Buf'First loop Buffer.Del; end loop; end Erase; procedure Append (C : Character) is begin if Untouched then Untouched := False; -- clean the place Screen.Inverse (Width * ' '); Screen.Cursor; end if; if Index <= Buf'Last and C in Printable_Characters then Buf (Index) := C; Screen.Inverse (Buf (Index .. Index)); Screen.Cursor (Index); Index := Index + 1; else Beep; end if; end Append; procedure Put (S : String) is Last : Integer := S'Last; begin while Last > S'First and then S (Last) = ' ' loop Last := Last - 1; end loop; Untouched := False; Buf (1 .. Last - S'First + 1) := S (S'First .. Last); Index := Last - S'First + 2; end Put; procedure Del is begin if Index > Buf'First then Index := Index - 1; Buf (Index) := ' '; Screen.Cursor (Index - 1); Screen.Inverse (Buf (Index .. Index)); Screen.Cursor (Index - 1); else Beep; end if; end Del; function Get return String is begin return Buf (Buf'First .. Index - 1); end Get; function Is_Untouched return Boolean is begin return Untouched; end Is_Untouched; end Buffer;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=25 rec1=00 rec2=01 rec3=006 [0x01] rec0=27 rec1=00 rec2=02 rec3=000 tail 0x2150049fe815c66f31b54 0x42a00088462061e03