summaryrefslogtreecommitdiff
path: root/Ada95/samples
diff options
context:
space:
mode:
Diffstat (limited to 'Ada95/samples')
-rw-r--r--Ada95/samples/Makefile.in7
-rw-r--r--Ada95/samples/ncurses2-demo_forms.adb11
-rw-r--r--Ada95/samples/ncurses2-demo_pad.adb12
-rw-r--r--Ada95/samples/ncurses2-getch_test.adb12
-rw-r--r--Ada95/samples/ncurses2-overlap_test.adb11
-rw-r--r--Ada95/samples/ncurses2-trace_set.adb51
-rw-r--r--Ada95/samples/ncurses2-util.adb11
-rw-r--r--Ada95/samples/sample-explanation.adb12
-rw-r--r--Ada95/samples/sample-header_handler.adb13
9 files changed, 81 insertions, 59 deletions
diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in
index aa839ff..8949862 100644
--- a/Ada95/samples/Makefile.in
+++ b/Ada95/samples/Makefile.in
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2011,2012 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 "Software"), #
@@ -28,7 +28,7 @@
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.46 2011/03/28 23:45:08 tom Exp $
+# $Id: Makefile.in,v 1.48 2012/10/06 19:00:42 tom Exp $
#
.SUFFIXES:
@@ -36,12 +36,13 @@ SHELL = /bin/sh
VPATH = @srcdir@
THIS = Makefile
-x = @PROG_EXT@
+x = @EXEEXT@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
+datarootdir = @datarootdir@
datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
diff --git a/Ada95/samples/ncurses2-demo_forms.adb b/Ada95/samples/ncurses2-demo_forms.adb
index 1afbb88..0eeeb5e 100644
--- a/Ada95/samples/ncurses2-demo_forms.adb
+++ b/Ada95/samples/ncurses2-demo_forms.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2011/03/23 00:44:12 $
+-- $Revision: 1.7 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -317,8 +317,9 @@ procedure ncurses2.demo_forms is
function my_form_driver (f : Form; c : Key_Code) return Boolean is
flag : constant Driver_Result := Driver (f, F_Validate_Field);
begin
- if c = Form_Request_Code'Last + 1
- and flag = Form_Ok then
+ if c = Form_Request_Code'Last + 1 and
+ flag = Form_Ok
+ then
return True;
else
Beep;
diff --git a/Ada95/samples/ncurses2-demo_pad.adb b/Ada95/samples/ncurses2-demo_pad.adb
index b1b72ae..062ec53 100644
--- a/Ada95/samples/ncurses2-demo_pad.adb
+++ b/Ada95/samples/ncurses2-demo_pad.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.8 $
--- $Date: 2011/03/23 00:44:12 $
+-- $Revision: 1.9 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -437,7 +437,8 @@ procedure ncurses2.demo_pad is
-- pan rightwards
-- if (basex + portx - (pymax > porty) < pxmax)
if basex + portx -
- Column_Position (greater (pymax, porty)) < pxmax then
+ Column_Position (greater (pymax, porty)) < pxmax
+ then
-- if basex + portx < pxmax or
-- (pymax > porty and basex + portx - 1 < pxmax) then
basex := basex + 1;
@@ -457,7 +458,8 @@ procedure ncurses2.demo_pad is
-- pan downwards
-- same as if (basey + porty - (pxmax > portx) < pymax)
if basey + porty -
- Line_Position (greater (pxmax, portx)) < pymax then
+ Line_Position (greater (pxmax, portx)) < pymax
+ then
-- if (basey + porty < pymax) or
-- (pxmax > portx and basey + porty - 1 < pymax) then
basey := basey + 1;
diff --git a/Ada95/samples/ncurses2-getch_test.adb b/Ada95/samples/ncurses2-getch_test.adb
index 2802cfb..8f020e7 100644
--- a/Ada95/samples/ncurses2-getch_test.adb
+++ b/Ada95/samples/ncurses2-getch_test.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2008,2009 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2009,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.8 $
--- $Date: 2009/12/26 17:38:58 $
+-- $Revision: 1.9 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Character input test
@@ -210,8 +210,10 @@ begin
end;
elsif c = Character'Pos ('s') then
ShellOut (True);
- elsif c = Character'Pos ('x') or c = Character'Pos ('q') or
- (c = Key_None and blockflag = Blocking) then
+ elsif c = Character'Pos ('x') or
+ c = Character'Pos ('q') or
+ (c = Key_None and blockflag = Blocking)
+ then
exit;
elsif c = Character'Pos ('?') then
Add (Str => "Type any key to see its keypad value. Also:");
diff --git a/Ada95/samples/ncurses2-overlap_test.adb b/Ada95/samples/ncurses2-overlap_test.adb
index ddf8a9a..cba93c4 100644
--- a/Ada95/samples/ncurses2-overlap_test.adb
+++ b/Ada95/samples/ncurses2-overlap_test.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.5 $
--- $Date: 2011/03/19 12:07:18 $
+-- $Revision: 1.6 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -72,8 +72,9 @@ procedure ncurses2.overlap_test is
Get_Size (win, y1, x1);
for y in 0 .. y1 - 1 loop
for x in 0 .. x1 - 1 loop
- if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3))
- or (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3))) then
+ if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3)) or
+ (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3)))
+ then
Move_Cursor (win, y, x);
Add (win, Ch => ch);
end if;
diff --git a/Ada95/samples/ncurses2-trace_set.adb b/Ada95/samples/ncurses2-trace_set.adb
index 7537afe..df4468b 100644
--- a/Ada95/samples/ncurses2-trace_set.adb
+++ b/Ada95/samples/ncurses2-trace_set.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.5 $
--- $Date: 2011/03/23 00:40:33 $
+-- $Revision: 1.6 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -141,7 +141,8 @@ procedure ncurses2.trace_set is
(super.Internal_Calls or not sub.Internal_Calls) and
(super.Character_Calls or not sub.Character_Calls) and
(super.Termcap_TermInfo or not sub.Termcap_TermInfo) and
- True then
+ True
+ then
return True;
else
return False;
@@ -250,93 +251,107 @@ procedure ncurses2.trace_set is
else
if subset (tlevel,
- Trace_Attribute_Set'(Times => True, others => False)) then
+ Trace_Attribute_Set'(Times => True, others => False))
+ then
Append (buf, "Times");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Attribute_Set'(Tputs => True, others => False)) then
+ Trace_Attribute_Set'(Tputs => True, others => False))
+ then
Append (buf, "Tputs");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Attribute_Set'(Update => True, others => False)) then
+ Trace_Attribute_Set'(Update => True, others => False))
+ then
Append (buf, "Update");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Cursor_Move => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Cursor_Move");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Character_Output => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Character_Output");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Ordinary) then
+ Trace_Ordinary)
+ then
Append (buf, "Ordinary");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Attribute_Set'(Calls => True, others => False)) then
+ Trace_Attribute_Set'(Calls => True, others => False))
+ then
Append (buf, "Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Virtual_Puts => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Virtual_Puts");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Input_Events => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Input_Events");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(TTY_State => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "TTY_State");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Internal_Calls => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Internal_Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Character_Calls => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Character_Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Termcap_TermInfo => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Termcap_TermInfo");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Maximum) then
+ Trace_Maximum)
+ then
Append (buf, "Maximium");
Append (buf, ", ");
end if;
diff --git a/Ada95/samples/ncurses2-util.adb b/Ada95/samples/ncurses2-util.adb
index 8ae3272..e0f3d35 100644
--- a/Ada95/samples/ncurses2-util.adb
+++ b/Ada95/samples/ncurses2-util.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2008,2014 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,16 +35,12 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2008/07/26 18:51:20 $
+-- $Revision: 1.9 $
+-- $Date: 2014/05/24 21:32:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
-pragma Warnings (Off);
-with Terminal_Interface.Curses.Aux;
-pragma Warnings (On);
-
with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace;
with Interfaces.C;
@@ -115,7 +111,6 @@ package body ncurses2.util is
procedure Cannot (s : String) is
use Interfaces.C;
use Interfaces.C.Strings;
- use Terminal_Interface.Curses.Aux;
function getenv (x : char_array) return chars_ptr;
pragma Import (C, getenv, "getenv");
tmp1 : char_array (0 .. 10);
diff --git a/Ada95/samples/sample-explanation.adb b/Ada95/samples/sample-explanation.adb
index 5587099..a2d1822 100644
--- a/Ada95/samples/sample-explanation.adb
+++ b/Ada95/samples/sample-explanation.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.26 $
--- $Date: 2011/03/26 22:33:29 $
+-- $Revision: 1.27 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Poor mans help system. This scans a sequential file for key lines and
@@ -321,8 +321,10 @@ package body Sample.Explanation is
Outer :
loop
exit Outer when not Next_Line;
- if Last = (1 + Key'Length) and then Key = Buffer (2 .. Last)
- and then Buffer (1) = '#' then
+ if Last = (1 + Key'Length)
+ and then Key = Buffer (2 .. Last)
+ and then Buffer (1) = '#'
+ then
loop
exit when not Next_Line;
exit when Buffer (1) = '#';
diff --git a/Ada95/samples/sample-header_handler.adb b/Ada95/samples/sample-header_handler.adb
index ad60caf..f552e20 100644
--- a/Ada95/samples/sample-header_handler.adb
+++ b/Ada95/samples/sample-header_handler.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 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,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.19 $
--- $Date: 2011/03/22 23:54:38 $
+-- $Revision: 1.20 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Calendar; use Ada.Calendar;
@@ -121,8 +121,11 @@ package body Sample.Header_Handler is
D : constant Day_Number := Day (Now);
begin
if Header_Window /= Null_Window then
- if Minute /= Display_Min or else Hour /= Display_Hour
- or else Display_Day /= D or else Display_Month /= Mon then
+ if Minute /= Display_Min
+ or else Hour /= Display_Hour
+ or else Display_Day /= D
+ or else Display_Month /= Mon
+ then
Move_Cursor (Header_Window, 0, 0);
N_Out (D); Add (Header_Window, '.');
Add (Header_Window, Month_Names (Mon));