]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/MKada_config.in
ncurses 6.4 - patch 20231001
[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.28 2023/09/30 23:55:34 tom Exp $
31 .TH adacurses@USE_CFG_SUFFIX@\-config 1 2023-09-30 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
32 .ds C adacurses@USE_CFG_SUFFIX@\-config
33 .ie n .ds CW R
34 .el   \{
35 .ie \n(.g .ds CW CR
36 .el       .ds CW CW
37 .\}
38 .
39 .nr mE 0 \" in an example (EX/EE)?
40 .
41 .\" Start example.
42 .if !\n(.g \{\
43 .de EX
44 .  br
45 .  if !\\n(mE \{\
46 .    nr mF \\n(.f
47 .    nr mP \\n(PD
48 .    nr PD 1v
49 .    nf
50 .    ft \\*(CW
51 .    nr mE 1
52 .  \}
53 ..
54 .\}
55 .
56 .\" End example.
57 .if !\n(.g \{\
58 .de EE
59 .  br
60 .  if \\n(mE \{\
61 .    ft \\n(mF
62 .    nr PD \\n(mP
63 .    fi
64 .    nr mE 0
65 .  \}
66 ..
67 .\}
68 .
69 .ie \n(.g \{\
70 .ds `` \(lq
71 .ds '' \(rq
72 .ds '  \(aq
73 .\}
74 .el \{\
75 .ie t .ds `` ``
76 .el   .ds `` ""
77 .ie t .ds '' ''
78 .el   .ds '' ""
79 .ie t .ds '  \(aq
80 .el   .ds '  '
81 .\}
82 .
83 .SH NAME
84 \fB\%adacurses@USE_CFG_SUFFIX@\-config\fP \-
85 configuration helper for \fI@ADA_LIBNAME@\fP libraries
86 .SH SYNOPSIS
87 .B \*C
88 .RB [ \-\-cflags ]
89 .RB [ \-\-libs ]
90 .PP
91 .B \*C \-\-version
92 .PP
93 .B \*C \-\-help
94 .SH DESCRIPTION
95 This program development aid simplifies the process of configuring
96 applications to use the \fI@ADA_LIBNAME@\fP library binding to
97 \fIncurses\fP.
98 .SH OPTIONS
99 .TP 11 \" "--version" + 2n
100 \fB\-\-cflags\fP
101 reports the GNAT (Ada compiler) flags needed to compile with
102 \fI@ADA_LIBNAME@\fP.
103 .TP
104 \fB\-\-libs\fP
105 reports the GNAT libraries needed to link with \fI@ADA_LIBNAME@\fP.
106 .TP
107 \fB\-\-version\fP
108 reports the release and patch date information of the \fIncurses\fP
109 libraries used to configure and build \fI@ADA_LIBNAME@\fP and exits
110 successfully.
111 .TP
112 \fB\-\-help\fP
113 issues a usage message and exits successfully.
114 .PP
115 Omitting options implies \*(``\fB\-\-cflags \-\-libs\fP\*(''.
116 .SH EXAMPLE
117 Consider a program using \fI@ADA_LIBNAME@\fP to write the message
118 \*(``Hello, world!\*('' in the center of the screen and wait for the
119 user to press the \*(``q\*('' key before exiting.
120 Populate a file \fIhello.adb\fP with the following.
121 .PP
122 .RS 4
123 .EX
124 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
125
126 procedure Hello is
127    Visibility : Cursor_Visibility := Invisible;
128    Message : constant String := "Hello, World!";
129    done : Boolean := False;
130    c : Key_Code;
131 begin
132    Init_Screen;
133    Set_Echo_Mode (False);
134    Set_Cursor_Visibility (Visibility);
135    Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
136
137    Move_Cursor (Line => Lines / 2,
138                 Column => (Columns \- Message\*'Length) / 2);
139    Add (Str => Message);
140
141    while not done loop
142       c := Get_Keystroke (Standard_Window);
143
144       case c is
145           when Character\*'Pos (\*'q\*') => done := True;
146           when others => null;
147       end case;
148
149       Nap_Milli_Seconds (50);
150    end loop;
151
152    End_Windows;
153 end Hello;
154 .EE
155 .RE
156 .br
157 .ne 2
158 .PP
159 Then, using
160 .RS 4
161 .EX
162 gnatmake \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-cflags\(ga hello \e
163     \-largs \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-libs\(ga
164 .EE
165 .RE
166 or, more simply,
167 .RS 4
168 .EX
169 gnatmake hello \(gaadacurses@USE_CFG_SUFFIX@\-config\(ga
170 .EE
171 .RE
172 you can compile and link the program.
173 .SH "SEE ALSO"
174 \fB\%curses\fP(3X)