|
|
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: 8917 (0x22d5)
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⟧
package body Character_Set is
function Is_Alpha (Ch : Character) return Boolean is
begin
case Ch is
when 'a' .. 'z' =>
return True;
when 'A' .. 'Z' =>
return True;
when others =>
return False;
end case;
end Is_Alpha;
function Is_Alpha_Numeric (Ch : Character) return Boolean is
begin
case Ch is
when 'a' .. 'z' =>
return True;
when 'A' .. 'Z' =>
return True;
when '0' .. '9' =>
return True;
when others =>
return False;
end case;
end Is_Alpha_Numeric;
function Is_Control (Ch : Character) return Boolean is
begin
if Ch < ' ' or Ch = Ascii.Del then
return True;
else
return False;
end if;
end Is_Control;
function Is_Digit (Ch : Character) return Boolean is
begin
if Ch in '0' .. '9' then
return True;
else
return False;
end if;
end Is_Digit;
function Is_Graphic (Ch : Character) return Boolean is
begin
if Ch > ' ' and Ch < Ascii.Del then
return True;
else
return False;
end if;
end Is_Graphic;
function Is_Hexadecimal (Ch : Character) return Boolean is
begin
case Ch is
when '0' .. '9' =>
return True;
when 'A' .. 'F' | 'a' .. 'f' =>
return True;
when others =>
return False;
end case;
end Is_Hexadecimal;
function Is_Lower (Ch : Character) return Boolean is
begin
if Ch in 'a' .. 'z' then
return True;
else
return False;
end if;
end Is_Lower;
function Is_Printable (Ch : Character) return Boolean is
begin
if Ch >= ' ' and Ch < Ascii.Del then
return True;
else
return False;
end if;
end Is_Printable;
function Is_Punctuation (Ch : Character) return Boolean is
begin
if (Ch > ' ') and (Ch < Ascii.Del) and (not Is_Alpha_Numeric (Ch)) then
return True;
else
return False;
end if;
end Is_Punctuation;
function Is_Space (Ch : Character) return Boolean is
begin
case Ch is
when Ascii.Ht =>
return True;
when Ascii.Lf =>
return True;
when Ascii.Vt =>
return True;
when Ascii.Ff =>
return True;
when Ascii.Cr =>
return True;
when ' ' =>
return True;
when others =>
return False;
end case;
end Is_Space;
function Is_Upper (Ch : Character) return Boolean is
begin
if Ch in 'A' .. 'Z' then
return True;
else
return False;
end if;
end Is_Upper;
function To_Lower (Ch : Character) return Character is
begin
if Is_Upper (Ch) then
return Character'Val (Character'Pos (Ch) - Character'Pos ('A') +
Character'Pos ('a'));
else
return Ch;
end if;
end To_Lower;
procedure To_Lower (Ch : in out Character) is
begin
if Is_Upper (Ch) then
Ch := To_Lower (Ch);
end if;
end To_Lower;
procedure To_Lower (Str : in out String) is
begin
for I in Str'First .. Str'Last loop
Str (I) := To_Lower (Str (I));
end loop;
end To_Lower;
function To_Upper (Ch : Character) return Character is
begin
if Is_Lower (Ch) then
return Character'Val (Character'Pos (Ch) - Character'Pos ('a') +
Character'Pos ('A'));
else
return Ch;
end if;
end To_Upper;
procedure To_Upper (Ch : in out Character) is
begin
if Is_Lower (Ch) then
Ch := To_Upper (Ch);
end if;
end To_Upper;
procedure To_Upper (Str : in out String) is
begin
for I in Str'First .. Str'Last loop
Str (I) := To_Upper (Str (I));
end loop;
end To_Upper;
function Cc_Name_2 (Ch : Character) return Control_Character_Name_2 is
Name : Control_Character_Name_2;
begin
case Ch is
when Ascii.Nul =>
Name := "^@";
when Ascii.Soh =>
Name := "^A";
when Ascii.Stx =>
Name := "^B";
when Ascii.Etx =>
Name := "^C";
when Ascii.Eot =>
Name := "^D";
when Ascii.Enq =>
Name := "^E";
when Ascii.Ack =>
Name := "^F";
when Ascii.Bel =>
Name := "^G";
when Ascii.Bs =>
Name := "^H";
when Ascii.Ht =>
Name := "^I";
when Ascii.Lf =>
Name := "^J";
when Ascii.Vt =>
Name := "^K";
when Ascii.Ff =>
Name := "^L";
when Ascii.Cr =>
Name := "^M";
when Ascii.So =>
Name := "^N";
when Ascii.Si =>
Name := "^O";
when Ascii.Dle =>
Name := "^P";
when Ascii.Dc1 =>
Name := "^Q";
when Ascii.Dc2 =>
Name := "^R";
when Ascii.Dc3 =>
Name := "^S";
when Ascii.Dc4 =>
Name := "^T";
when Ascii.Nak =>
Name := "^U";
when Ascii.Syn =>
Name := "^V";
when Ascii.Etb =>
Name := "^W";
when Ascii.Can =>
Name := "^X";
when Ascii.Em =>
Name := "^Y";
when Ascii.Sub =>
Name := "^Z";
when Ascii.Esc =>
Name := "^[";
when Ascii.Fs =>
Name := "^\";
when Ascii.Gs =>
Name := "^]";
when Ascii.Rs =>
Name := "^^";
when Ascii.Us =>
Name := "^_";
when Ascii.Del =>
Name := "^`";
when others =>
Name := " ";
Name (2) := Ch;
end case;
return Name;
end Cc_Name_2;
function Cc_Name_3 (Ch : Character) return Control_Character_Name_3 is
Name : Control_Character_Name_3;
begin
case Ch is
when Ascii.Nul =>
Name := "NUL";
when Ascii.Soh =>
Name := "SOH";
when Ascii.Stx =>
Name := "STX";
when Ascii.Etx =>
Name := "ETX";
when Ascii.Eot =>
Name := "EOT";
when Ascii.Enq =>
Name := "ENQ";
when Ascii.Ack =>
Name := "ACK";
when Ascii.Bel =>
Name := "BEL";
when Ascii.Bs =>
Name := "BS ";
when Ascii.Ht =>
Name := "HT ";
when Ascii.Lf =>
Name := "LF ";
when Ascii.Vt =>
Name := "VT ";
when Ascii.Ff =>
Name := "FF ";
when Ascii.Cr =>
Name := "CR ";
when Ascii.So =>
Name := "SO ";
when Ascii.Si =>
Name := "SI ";
when Ascii.Dle =>
Name := "DLE";
when Ascii.Dc1 =>
Name := "DC1";
when Ascii.Dc2 =>
Name := "DC2";
when Ascii.Dc3 =>
Name := "DC3";
when Ascii.Dc4 =>
Name := "DC4";
when Ascii.Nak =>
Name := "NAK";
when Ascii.Syn =>
Name := "SYN";
when Ascii.Etb =>
Name := "ETB";
when Ascii.Can =>
Name := "CAN";
when Ascii.Em =>
Name := "EM ";
when Ascii.Sub =>
Name := "SUB";
when Ascii.Esc =>
Name := "ESC";
when Ascii.Fs =>
Name := "FS ";
when Ascii.Gs =>
Name := "GS ";
when Ascii.Rs =>
Name := "RS ";
when Ascii.Us =>
Name := "US ";
when Ascii.Del =>
Name := "DEL";
when others =>
Name := " ";
Name (2) := Ch;
end case;
return Name;
end Cc_Name_3;
end Character_Set;