X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=Ada95%2Fsamples%2Fncurses2-demo_panels.adb;h=aa6ca369f5b20add7e269e06b20a5c5af961a9d0;hb=d61c3c6a831d18ef0ed6f797ac97d60fffc2f158;hp=6a0b60368c0fa16363ac1f0e1a3dc157e95e3c6e;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;p=ncurses.git diff --git a/Ada95/samples/ncurses2-demo_panels.adb b/Ada95/samples/ncurses2-demo_panels.adb index 6a0b6036..aa6ca369 100644 --- a/Ada95/samples/ncurses2-demo_panels.adb +++ b/Ada95/samples/ncurses2-demo_panels.adb @@ -7,7 +7,8 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000,2004 Free Software Foundation, Inc. -- +-- Copyright 2018,2020 Thomas E. Dickey -- +-- Copyright 2000-2008,2011 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 +36,8 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.4 $ --- $Date: 2004/08/21 21:37:00 $ +-- $Revision: 1.9 $ +-- $Date: 2020/02/02 23:34:34 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; @@ -47,7 +48,6 @@ with Terminal_Interface.Curses.Panels.User_Data; with ncurses2.genericPuts; procedure ncurses2.demo_panels (nap_mseci : Integer) is - use Int_IO; function mkpanel (color : Color_Number; rows : Line_Count; @@ -139,7 +139,7 @@ procedure ncurses2.demo_panels (nap_mseci : Integer) is procedure fill_panel (pan : Panel) is win : constant Window := Panel_Window (pan); - num : constant Character := Get_User_Data (pan) (2); + num : constant Character := Get_User_Data (pan).all (2); tmp6 : String (1 .. 6) := "-panx-"; maxy : Line_Count; maxx : Column_Count; @@ -151,12 +151,14 @@ procedure ncurses2.demo_panels (nap_mseci : Integer) is Clear_To_End_Of_Line (win); Box (win); Get_Size (win, maxy, maxx); - for y in 2 .. maxy - 2 loop - for x in 1 .. maxx - 2 loop + for y in 2 .. maxy - 3 loop + for x in 1 .. maxx - 3 loop Move_Cursor (win, y, x); Add (win, num); end loop; end loop; + exception + when Curses_Exception => null; end fill_panel; modstr : constant array (0 .. 5) of String (1 .. 5) :=