X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2Fncurses2-m.adb;h=13a3199ab5067ad7f49f50890b1318434c0e8cf0;hp=d4f2b8a03286421c7d4e51239ab5360b2a970316;hb=c4d90db4f4e50bb8a971955ce4812262da4a50bc;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/Ada95/samples/ncurses2-m.adb b/Ada95/samples/ncurses2-m.adb index d4f2b8a0..13a3199a 100644 --- a/Ada95/samples/ncurses2-m.adb +++ b/Ada95/samples/ncurses2-m.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,7 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.1 $ +-- $Revision: 1.7 $ +-- $Date: 2007/05/05 18:02:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- TODO use Default_Character where appropriate @@ -55,7 +56,6 @@ with Ada.Command_Line; use Ada.Command_Line; with Ada.Strings.Unbounded; - with ncurses2.util; use ncurses2.util; with ncurses2.getch_test; with ncurses2.attr_test; @@ -174,7 +174,6 @@ package body ncurses2.m is return 0; -- Curses_OK; end rip_footer; - function rip_header ( Win : Window; Columns : Column_Count) return Integer; @@ -236,7 +235,6 @@ package body ncurses2.m is Set_KeyPad_Mode (SwitchOn => True); end Set_Terminal_Modes; - nap_msec : Integer := 1; function Do_Single_Test (c : Character) return Boolean is @@ -289,7 +287,6 @@ package body ncurses2.m is return True; end Do_Single_Test; - command : Character; my_e_param : Soft_Label_Key_Format := Four_Four; assumed_colors : Boolean := False; @@ -302,7 +299,6 @@ package body ncurses2.m is c : Integer; c2 : Character; optind : Integer := 1; -- must be initialized to one. - type stringa is access String; optarg : getopt.stringa; length : Integer; @@ -333,7 +329,7 @@ package body ncurses2.m is default_colors := True; when 'e' => myio.Get (optarg.all, tmpi, length); - if Integer (tmpi) > 3 then + if tmpi > 3 then usage; return 1; end if; @@ -359,7 +355,6 @@ package body ncurses2.m is save_trace_set := To_trace (save_trace); Trace_On (save_trace_set); - Init_Soft_Label_Keys (my_e_param); Init_Screen; @@ -447,14 +442,8 @@ package body ncurses2.m is exit when command = 'q'; end loop; + Curses_Free_All; return 0; -- TODO ExitProgram(EXIT_SUCCESS); end main; end ncurses2.m; - - - - - - -