~ubuntu-branches/debian/sid/ncurses/sid-200908151543

« back to all changes in this revision

Viewing changes to Ada95/samples/ncurses2-util.adb

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-12-14 21:06:00 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081214210600-2rdjwvpplgvh3zeb
Tags: 5.7+20081213-1
MergingĀ upstreamĀ versionĀ 5.7+20081213.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
--                                 B O D Y                                  --
8
8
--                                                                          --
9
9
------------------------------------------------------------------------------
 
10
-- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc.              --
10
11
--                                                                          --
11
12
-- Permission is hereby granted, free of charge, to any person obtaining a  --
12
13
-- copy of this software and associated documentation files (the            --
35
35
------------------------------------------------------------------------------
36
36
--  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
37
37
--  Version Control
 
38
--  $Revision: 1.7 $
 
39
--  $Date: 2008/07/26 18:51:20 $
38
40
--  Binding Version 01.00
39
41
------------------------------------------------------------------------------
40
 
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
41
 
 
42
 
with Ada.Text_IO;
43
 
 
44
 
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
 
42
with Ada.Text_IO; use Ada.Text_IO;
 
43
 
45
44
pragma Warnings (Off);
46
45
with Terminal_Interface.Curses.Aux;
47
46
pragma Warnings (On);
48
47
 
49
48
with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace;
50
49
 
51
 
with Ada.Text_IO; use Ada.Text_IO;
52
 
 
53
50
with Interfaces.C;
54
51
with Interfaces.C.Strings;
55
52
 
59
54
 
60
55
with ncurses2.genericPuts;
61
56
 
62
 
 
63
57
package body ncurses2.util is
64
58
 
65
59
   --  #defines from C
111
105
      end if;
112
106
   end Getchar;
113
107
 
114
 
 
115
108
   procedure Pause is
116
109
   begin
117
110
      Move_Cursor (Line => Lines - 1, Column => 0);
119
112
      Getchar;
120
113
   end Pause;
121
114
 
122
 
 
123
115
   procedure Cannot (s : String) is
124
116
      use Interfaces.C;
125
117
      use Interfaces.C.Strings;
163
155
      Refresh;
164
156
   end ShellOut;
165
157
 
166
 
 
167
 
 
168
158
   function Is_Digit (c : Key_Code) return Boolean is
169
159
   begin
170
160
      if c >= 16#100# then
180
170
      Add (Ch => newl);
181
171
   end P;
182
172
 
183
 
 
184
173
   function Code_To_Char (c : Key_Code) return Character is
185
174
   begin
186
175
      if c > Character'Pos (Character'Last) then