X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=inline;f=Ada95%2Fsamples%2Fncurses2-util.adb;h=0352fa12539900c39d232245417a1727a0da6860;hb=33b3156f43919fb75726db2647d3364037d9e1d5;hp=907dcef9c7aa846a53c9607f61c33d395321ba4b;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01;p=ncurses.git diff --git a/Ada95/samples/ncurses2-util.adb b/Ada95/samples/ncurses2-util.adb index 907dcef9..0352fa12 100644 --- a/Ada95/samples/ncurses2-util.adb +++ b/Ada95/samples/ncurses2-util.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000 Free Software Foundation, Inc. -- +-- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -35,14 +35,14 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.1 $ +-- $Revision: 1.6 $ +-- $Date: 2006/06/25 14:24:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses; use Terminal_Interface.Curses; +with Terminal_Interface.Curses; with Ada.Text_IO; -with Terminal_Interface.Curses; use Terminal_Interface.Curses; pragma Warnings (Off); with Terminal_Interface.Curses.Aux; pragma Warnings (On); @@ -58,7 +58,6 @@ with Ada.Characters.Handling; with ncurses2.genericPuts; - package body ncurses2.util is -- #defines from C @@ -104,12 +103,12 @@ package body ncurses2.util is end Getchar; procedure Getchar (win : Window := Standard_Window) is - x : Key_Code; begin - x := Getchar (win); + if Getchar (win) < 0 then + Beep; + end if; end Getchar; - procedure Pause is begin Move_Cursor (Line => Lines - 1, Column => 0); @@ -117,7 +116,6 @@ package body ncurses2.util is Getchar; end Pause; - procedure Cannot (s : String) is use Interfaces.C; use Interfaces.C.Strings; @@ -161,8 +159,6 @@ package body ncurses2.util is Refresh; end ShellOut; - - function Is_Digit (c : Key_Code) return Boolean is begin if c >= 16#100# then @@ -178,7 +174,6 @@ package body ncurses2.util is Add (Ch => newl); end P; - function Code_To_Char (c : Key_Code) return Character is begin if c > Character'Pos (Character'Last) then