|
|
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 - metrics - downloadIndex: B T
Length: 6606 (0x19ce)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Window_Io;
package body Split_Window is
task body Window_Manager is
Window : Window_Io.File_Type;
Top_Line : Natural;
Top_Col : Natural;
Bottom_Line : Natural;
Bottom_Col : Natural;
Next_Top_Line : Positive;
Next_Bottom_Line : Positive;
Middle_Line : Window_Io.Line_Number;
Last_Line : Window_Io.Line_Number;
Lines, Cols : Positive;
Dashes : constant String (1 .. 78) := (others => '-');
begin
loop
select
accept Create do
Window_Io.Create
(Window, Window_Io.Out_File, "PHONE WINDOW");
Window_Io.Report_Size (Window, Lines, Cols);
Middle_Line := Lines / 2;
Last_Line := Lines;
Top_Line := 1;
Top_Col := 1;
Next_Top_Line := 2;
Bottom_Line := Middle_Line + 1;
Bottom_Col := 1;
Next_Bottom_Line := Bottom_Line + 1;
Window_Io.Position_Cursor (Window, Middle_Line, 1);
Window_Io.Overwrite (Window, Dashes);
end Create;
or
accept Delete;
exit;
or
accept Write_To_Top (Message : String) do
Top_Col := 1;
Window_Io.Position_Cursor (Window, Next_Top_Line, 1);
Window_Io.Delete (Window, Window_Io.Line_Length (Window));
Window_Io.Position_Cursor (Window, Top_Line, 1);
Window_Io.Overwrite (Window, Message);
if Top_Line = Middle_Line - 2 then
Top_Line := Top_Line + 1;
Next_Top_Line := 1;
elsif Top_Line = Middle_Line - 1 then
Top_Line := 1;
Next_Top_Line := 2;
else
Top_Line := Top_Line + 1;
Next_Top_Line := Top_Line + 1;
end if;
end Write_To_Top;
or
accept Write_To_Top (Message : Character) do
if Message = Ascii.Cr then
Top_Col := 1;
Window_Io.Position_Cursor
(Window, Next_Top_Line, Top_Col);
Window_Io.Delete (Window,
Window_Io.Line_Length (Window));
if Top_Line = Middle_Line - 2 then
Top_Line := Top_Line + 1;
Next_Top_Line := 1;
elsif Top_Line = Middle_Line - 1 then
Top_Line := 1;
Next_Top_Line := 2;
else
Top_Line := Top_Line + 1;
Next_Top_Line := Top_Line + 1;
end if;
else
Window_Io.Position_Cursor (Window, Top_Line, Top_Col);
Window_Io.Overwrite (Window, Message);
Top_Col := Top_Col + 1;
end if;
end Write_To_Top;
or
accept Write_To_Bottom (Message : String) do
Bottom_Col := 1;
Window_Io.Position_Cursor (Window, Next_Bottom_Line, 1);
Window_Io.Delete (Window, Window_Io.Line_Length (Window));
Window_Io.Position_Cursor (Window, Bottom_Line, 1);
Window_Io.Overwrite (Window, Message);
if Bottom_Line = Last_Line - 1 then
Bottom_Line := Bottom_Line + 1;
Next_Bottom_Line := Middle_Line + 1;
elsif Bottom_Line = Last_Line then
Bottom_Line := Middle_Line + 1;
Next_Bottom_Line := Bottom_Line + 1;
else
Bottom_Line := Bottom_Line + 1;
Next_Bottom_Line := Bottom_Line + 1;
end if;
end Write_To_Bottom;
or
accept Write_To_Bottom (Message : Character) do
if Message = Ascii.Cr then
Bottom_Col := 1;
Window_Io.Position_Cursor
(Window, Next_Bottom_Line, Bottom_Col);
Window_Io.Delete (Window,
Window_Io.Line_Length (Window));
if Bottom_Line = Last_Line - 1 then
Bottom_Line := Bottom_Line + 1;
Next_Bottom_Line := Middle_Line + 1;
elsif Bottom_Line = Last_Line then
Bottom_Line := Middle_Line + 1;
Next_Bottom_Line := Bottom_Line + 1;
else
Bottom_Line := Bottom_Line + 1;
Next_Bottom_Line := Bottom_Line + 1;
end if;
else
Window_Io.Position_Cursor
(Window, Bottom_Line, Bottom_Col);
Window_Io.Overwrite (Window, Message);
Bottom_Col := Bottom_Col + 1;
end if;
end Write_To_Bottom;
or
accept Delete_Char_Top do
if Top_Col /= 1 then
Window_Io.Position_Cursor
(Window, Top_Line, Top_Col - 1);
Window_Io.Overwrite (Window, ' ');
Top_Col := Top_Col - 1;
else
Window_Io.Bell (Window);
end if;
end Delete_Char_Top;
or
accept Delete_Char_Bottom do
if Bottom_Col /= 1 then
Window_Io.Position_Cursor
(Window, Bottom_Line, Bottom_Col - 1);
Window_Io.Overwrite (Window, ' ');
Bottom_Col := Bottom_Col - 1;
else
Window_Io.Bell (Window);
end if;
end Delete_Char_Bottom;
end select;
end loop;
end Window_Manager;
end Split_Window;