X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2Fncurses2-genericputs.adb;h=71d1c1633f419f904839fae5ba5b96bbf7b85654;hp=f17b209878d44a50cca28492d3406a71ba2dca9e;hb=e8c3445229c546ba14ea2992da4d93a9d31914f8;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/Ada95/samples/ncurses2-genericputs.adb b/Ada95/samples/ncurses2-genericputs.adb index f17b2098..71d1c163 100644 --- a/Ada95/samples/ncurses2-genericputs.adb +++ b/Ada95/samples/ncurses2-genericputs.adb @@ -7,7 +7,8 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000 Free Software Foundation, Inc. -- +-- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2000-2008,2009 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,26 +36,19 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.1 $ +-- $Revision: 1.5 $ +-- $Date: 2020/02/02 23:34:34 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Ada.Text_IO; use Ada.Text_IO; -with Ada.Strings.Bounded; use Ada.Strings.Bounded; - with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -with Interfaces.C; use Interfaces.C; -with Interfaces.C.Strings; use Interfaces.C.Strings; - - package body ncurses2.genericPuts is - procedure myGet (Win : in Window := Standard_Window; + procedure myGet (Win : Window := Standard_Window; Str : out BS.Bounded_String; - Len : in Integer := -1) + Len : Integer := -1) is - use BS; function Wgetnstr (Win : Window; Str : char_array; Len : int) return int; @@ -79,11 +73,9 @@ package body ncurses2.genericPuts is Str := To_Bounded_String (xStr (1 .. Cnt)); end myGet; - - procedure myPut (Str : out BS.Bounded_String; i : Integer; - Base : in Number_Base := 10) is + Base : Number_Base := 10) is package Int_IO is new Integer_IO (Integer); use Int_IO; tmp : String (1 .. BS.Max_Length); begin @@ -98,7 +90,7 @@ package body ncurses2.genericPuts is end myAdd; -- from ncurses-aux - procedure Fill_String (Cp : in chars_ptr; + procedure Fill_String (Cp : chars_ptr; Str : out BS.Bounded_String) is -- Fill the string with the characters referenced by the