Category : Miscellaneous Language Source Code
Archive   : ADATUT12.ZIP
Filename : UNIX.ADA

 
Output of file : UNIX.ADA contained in archive : ADATUT12.ZIP
-- UNIX.ADA Ver. 1.20 21-DEC-1988
-- Copyright 1988 John J. Herro
-- Software Innovations Technology
-- 1083 Mandarin Drive NE, Palm Bay, FL 32905-4706 (407)951-0233
--
-- Compile this before compiling ADA-TUTR.ADA on a UNIX based system. You must
-- also compile ONECHAR.C with a C compiler before linking. See first page of
-- ADA-TUTR.ADA for more details.
--
with TEXT_IO;
package CUSTOM_IO is
type COLOR is (BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE);
FOREGRND_COLOR : COLOR := WHITE; -- Default values in case
BACKGRND_COLOR : COLOR := BLUE; -- ADA-TUTR finds no User
BORDER_COLOR : COLOR := BLUE; -- File.
FORE_COLOR_DIGIT : CHARACTER := CHARACTER'VAL(COLOR'POS(FOREGRND_COLOR)+48);
BACK_COLOR_DIGIT : CHARACTER := CHARACTER'VAL(COLOR'POS(BACKGRND_COLOR)+48);
NORMAL_COLORS : STRING(1 .. 10) := ASCII.ESC & "[0;3" &
FORE_COLOR_DIGIT & ";4" & BACK_COLOR_DIGIT & "m";
CLEAR_SCRN : constant STRING := ASCII.ESC & "[H" & ASCII.ESC & "[2J";

procedure SET_BORDER_COLOR (TO : in COLOR);
procedure GET (CHAR : out CHARACTER);
procedure PUT (CHAR : in CHARACTER) renames TEXT_IO.PUT;
procedure PUT (STR : in STRING) renames TEXT_IO.PUT;
procedure PUT_LINE (STR : in STRING) renames TEXT_IO.PUT_LINE;
procedure GET_LINE (STR : out STRING;
LAST : out NATURAL) renames TEXT_IO.GET_LINE;
procedure NEW_LINE (SPACING : in TEXT_IO.COUNT := 1)
renames TEXT_IO.NEW_LINE;
end CUSTOM_IO;

package body CUSTOM_IO is
procedure SET_BORDER_COLOR(TO : in COLOR) is
-- Dummy procedure for computers other than PCs.
begin
null;
end SET_BORDER_COLOR;

procedure GET(CHAR : out CHARACTER) is
function ONECHAR return CHARACTER;
pragma INTERFACE (C, ONECHAR);
begin

CHAR := ONECHAR;
end GET;
end CUSTOM_IO;


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : ADATUT12.ZIP
Filename : UNIX.ADA

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/