|
|
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 - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body New_Keys, seg_0046fd
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Window_Io;
with System_Utilities;
package body New_Keys is
Key_Not_Found_In_Visible_Key_Names : exception;
package Raw renames Window_Io.Raw;
function "<=" (K1, K2 : Raw.Key) return Boolean renames Raw."<=";
function ">=" (K1, K2 : Raw.Key) return Boolean renames Raw.">=";
A_Char : String (1 .. 3) := "' '";
Numeric_0 : Key_Type;
Numeric_9 : Key_Type;
Terminal_Type : constant String := System_Utilities.Terminal_Type;
subtype Lower_Case is Character range 'a' .. 'z';
subtype Upper_Case is Character range 'A' .. 'Z';
function Is_Alphabet_Key (K : Key_Type) return Boolean is
Image : Character;
begin
if K in Raw.Simple_Key then
Image := Raw.Convert (K);
if Image in Lower_Case or Image in Upper_Case then
return True;
else
return False;
end if;
else
return False;
end if;
end Is_Alphabet_Key;
function Is_Numeric_Arg_Key (K : Key_Type) return Boolean is
begin
return K >= Numeric_0 and K <= Numeric_9;
end Is_Numeric_Arg_Key;
function Numeric_Value (K : Key_Type) return Numeric_Arg is
begin
return Integer (K) - Integer (Numeric_0);
end Numeric_Value;
procedure Bind_Key (Name : String; Key : in out Key_Type) is
Found : Boolean;
begin
Raw.Value (Name, Terminal_Type, Key, Found);
if not Found then
-- raise Key_Not_Found_In_Visible_Key_Names;
--[what to do? Report the key? raising an exception]
--[during elaboration is probably not wise]
null;
end if;
end Bind_Key;
begin
Bind_Key ("Up", Up);
Bind_Key ("Down", Down);
Bind_Key ("Left", Left);
Bind_Key ("Right", Right);
Bind_Key ("S_Up", S_Up);
Bind_Key ("S_down", S_Down);
Bind_Key ("C_G", User_Interrupt);
Bind_Key ("Numeric_0", Numeric_0);
Bind_Key ("Numeric_9", Numeric_9);
Bind_Key ("Enter", Enter);
if Terminal_Type = "RATIONAL" then
Bind_Key ("begin_of", Begin_Of);
Bind_Key ("end_of", End_Of);
Bind_Key ("promot", Promote);
Bind_Key ("Delete", Delete_Char_Backward);
Bind_Key ("Window", Window);
Bind_Key ("Cm_Up", C_M_Up);
Bind_Key ("Cm_Down", C_M_Down);
Bind_Key ("F10", Definition);
elsif Terminal_Type = "FACIT" then
Bind_Key ("back_tab", Begin_Of);
Bind_Key ("tab", End_Of);
Bind_Key ("promot", Promote);
Bind_Key ("Delete", Delete_Char_Backward);
Bind_Key ("Window", Window);
Bind_Key ("F4", Definition);
elsif Terminal_Type = "VT100" then
Bind_Key ("Numeric_7", Begin_Of);
Bind_Key ("Numeric_4", End_Of);
Bind_Key ("Enter", Promote);
Bind_Key ("Delete", Delete_Char_Backward);
Bind_Key ("PF2", Window);
Bind_Key ("Numeric_8", Definition);
else
null;
end if;
for C in Printable_Characters loop
A_Char (2) := C;
Bind_Key (A_Char, Characters (C));
end loop;
end New_Keys;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=23 rec1=00 rec2=01 rec3=008
[0x01] rec0=23 rec1=00 rec2=02 rec3=00a
[0x02] rec0=1b rec1=00 rec2=03 rec3=034
[0x03] rec0=0d rec1=00 rec2=04 rec3=001
tail 0x215004ec4815c6775d948 0x42a00088462061e03