]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/MKada_config.in
ncurses 6.4 - patch 20231125
[ncurses.git] / man / MKada_config.in
1 .\"***************************************************************************
2 .\" Copyright 2019-2021,2023 Thomas E. Dickey                                *
3 .\" Copyright 2010-2014,2016 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: MKada_config.in,v 1.31 2023/11/25 19:51:50 tom Exp $
31 .TH adacurses@USE_CFG_SUFFIX@\-config 1 2023-11-25 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
32 .ds C adacurses@USE_CFG_SUFFIX@\-config
33 .ie \n(.g \{\
34 .ds `` \(lq
35 .ds '' \(rq
36 .ds '  \(aq
37 .\}
38 .el \{\
39 .ie t .ds `` ``
40 .el   .ds `` ""
41 .ie t .ds '' ''
42 .el   .ds '' ""
43 .ie t .ds '  \(aq
44 .el   .ds '  '
45 .\}
46 .SH NAME
47 \fB\%adacurses@USE_CFG_SUFFIX@\-config\fP \-
48 configuration helper for \fI@ADA_LIBNAME@\fP libraries
49 .SH SYNOPSIS
50 .B \*C
51 .RB [ \-\-cflags ]
52 .RB [ \-\-libs ]
53 .PP
54 .B \*C \-\-version
55 .PP
56 .B \*C \-\-help
57 .SH DESCRIPTION
58 This program development aid simplifies the process of configuring
59 applications to use the \fI@ADA_LIBNAME@\fP library binding to
60 \fIncurses\fP.
61 .SH OPTIONS
62 .TP 11 \" "--version" + 2n
63 \fB\-\-cflags\fP
64 reports the GNAT (Ada compiler) flags needed to compile with
65 \fI@ADA_LIBNAME@\fP.
66 .TP
67 \fB\-\-libs\fP
68 reports the GNAT libraries needed to link with \fI@ADA_LIBNAME@\fP.
69 .TP
70 \fB\-\-version\fP
71 reports the release and patch date information of the \fIncurses\fP
72 libraries used to configure and build \fI@ADA_LIBNAME@\fP and exits
73 successfully.
74 .TP
75 \fB\-\-help\fP
76 issues a usage message and exits successfully.
77 .PP
78 Omitting options implies \*(``\fB\-\-cflags \-\-libs\fP\*(''.
79 .SH EXAMPLES
80 Consider a program using \fI@ADA_LIBNAME@\fP to write the message
81 \*(``Hello, world!\*('' in the center of the screen and wait for the
82 user to press the \*(``q\*('' key before exiting.
83 Populate a file \fIhello.adb\fP with the following.
84 .PP
85 .RS 4
86 .EX
87 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
88
89 procedure Hello is
90    Visibility : Cursor_Visibility := Invisible;
91    Message : constant String := "Hello, World!";
92    done : Boolean := False;
93    c : Key_Code;
94 begin
95    Init_Screen;
96    Set_Echo_Mode (False);
97    Set_Cursor_Visibility (Visibility);
98    Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
99
100    Move_Cursor (Line => Lines / 2,
101                 Column => (Columns \- Message\*'Length) / 2);
102    Add (Str => Message);
103
104    while not done loop
105       c := Get_Keystroke (Standard_Window);
106
107       case c is
108           when Character\*'Pos (\*'q\*') => done := True;
109           when others => null;
110       end case;
111
112       Nap_Milli_Seconds (50);
113    end loop;
114
115    End_Windows;
116 end Hello;
117 .EE
118 .RE
119 .ne 2
120 .PP
121 Then, using
122 .RS 4
123 .EX
124 gnatmake \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-cflags\(ga hello \e
125     \-largs \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-libs\(ga
126 .EE
127 .RE
128 or, more simply,
129 .RS 4
130 .EX
131 gnatmake hello \(gaadacurses@USE_CFG_SUFFIX@\-config\(ga
132 .EE
133 .RE
134 you can compile and link the program.
135 .SH "SEE ALSO"
136 \fB\%curses\fP(3X)