blob: ee037ff4fdc09a81853ab02d56a91042729fb525 [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2019-2023,2024 Thomas E. Dickey *
3.\" Copyright 2010-2014,2016 Free Software Foundation, Inc. *
Steve Kondikae271bc2015-11-15 02:50:53 +01004.\" *
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.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: MKada_config.in,v 1.35 2024/04/20 21:13:27 tom Exp $
31.TH adacurses@USE_CFG_SUFFIX@\-config 1 2024-04-20 "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.
47.\" Fix broken EX/EE macros on DWB troff.
48.\" Detect it: only DWB sets up a `)Y` register.
49.if !\n(.g .if \n()Y \{\
50.\" Revert the undesired changes to indentation.
51.am EX
52.in -5n
53..
54.am EE
55.in +5n
56..
57.\}
58.
Steve Kondikae271bc2015-11-15 02:50:53 +010059.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040060\fB\%adacurses@USE_CFG_SUFFIX@\-config\fP \-
61configuration helper for \fI@ADA_LIBNAME@\fP libraries
Steve Kondikae271bc2015-11-15 02:50:53 +010062.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040063.B \*C
64.RB [ \-\-cflags ]
65.RB [ \-\-libs ]
66.PP
67.B \*C \-\-version
68.PP
69.B \*C \-\-help
Steve Kondikae271bc2015-11-15 02:50:53 +010070.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040071This program development aid simplifies the process of configuring
72applications to use the \fI@ADA_LIBNAME@\fP library binding to
73\fI\%ncurses\fP.
Steve Kondikae271bc2015-11-15 02:50:53 +010074.SH OPTIONS
micky3879b9f5e72025-07-08 18:04:53 -040075.TP 11 \" "--version" + 2n
76\fB\-\-cflags\fP
77reports the GNAT (Ada compiler) flags needed to compile with
78\fI@ADA_LIBNAME@\fP.
Steve Kondikae271bc2015-11-15 02:50:53 +010079.TP
micky3879b9f5e72025-07-08 18:04:53 -040080\fB\-\-libs\fP
81reports the GNAT libraries needed to link with \fI@ADA_LIBNAME@\fP.
Steve Kondikae271bc2015-11-15 02:50:53 +010082.TP
micky3879b9f5e72025-07-08 18:04:53 -040083\fB\-\-version\fP
84reports the release and patch date information of the \fI\%ncurses\fP
85libraries used to configure and build \fI@ADA_LIBNAME@\fP and exits
86successfully.
Steve Kondikae271bc2015-11-15 02:50:53 +010087.TP
micky3879b9f5e72025-07-08 18:04:53 -040088\fB\-\-help\fP
89issues a usage message and exits successfully.
Steve Kondikae271bc2015-11-15 02:50:53 +010090.PP
micky3879b9f5e72025-07-08 18:04:53 -040091Omitting options implies \*(``\fB\-\-cflags \-\-libs\fP\*(''.
92.SH EXAMPLES
93Consider a program using \fI@ADA_LIBNAME@\fP to write the message
94\*(``Hello, world!\*('' in the center of the screen and wait for the
95user to press the \*(``q\*('' key before exiting.
96Populate a file \fIhello.adb\fP with the following.
Steve Kondikae271bc2015-11-15 02:50:53 +010097.PP
micky3879b9f5e72025-07-08 18:04:53 -040098.if \n(LL>67n .RS 4
99.EX
Steve Kondikae271bc2015-11-15 02:50:53 +0100100with Terminal_Interface.Curses; use Terminal_Interface.Curses;
101
102procedure Hello is
Steve Kondikae271bc2015-11-15 02:50:53 +0100103 Visibility : Cursor_Visibility := Invisible;
micky3879b9f5e72025-07-08 18:04:53 -0400104 Message : constant String := "Hello, World!";
Steve Kondikae271bc2015-11-15 02:50:53 +0100105 done : Boolean := False;
106 c : Key_Code;
Steve Kondikae271bc2015-11-15 02:50:53 +0100107begin
Steve Kondikae271bc2015-11-15 02:50:53 +0100108 Init_Screen;
109 Set_Echo_Mode (False);
Steve Kondikae271bc2015-11-15 02:50:53 +0100110 Set_Cursor_Visibility (Visibility);
111 Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
112
micky3879b9f5e72025-07-08 18:04:53 -0400113 Move_Cursor (Line => Lines / 2,
114 Column => (Columns \- Message\*'Length) / 2);
115 Add (Str => Message);
Steve Kondikae271bc2015-11-15 02:50:53 +0100116
117 while not done loop
Steve Kondikae271bc2015-11-15 02:50:53 +0100118 c := Get_Keystroke (Standard_Window);
micky3879b9f5e72025-07-08 18:04:53 -0400119
Steve Kondikae271bc2015-11-15 02:50:53 +0100120 case c is
micky3879b9f5e72025-07-08 18:04:53 -0400121 when Character\*'Pos (\*'q\*') => done := True;
122 when others => null;
Steve Kondikae271bc2015-11-15 02:50:53 +0100123 end case;
124
125 Nap_Milli_Seconds (50);
126 end loop;
127
128 End_Windows;
Steve Kondikae271bc2015-11-15 02:50:53 +0100129end Hello;
micky3879b9f5e72025-07-08 18:04:53 -0400130.EE
131.if \n(LL>67n .RE
132.ne 2
Steve Kondikae271bc2015-11-15 02:50:53 +0100133.PP
134Then, using
micky3879b9f5e72025-07-08 18:04:53 -0400135.RS 4
136.EX
137gnatmake \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-cflags\(ga hello \e
138 \-largs \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-libs\(ga
139.EE
Steve Kondikae271bc2015-11-15 02:50:53 +0100140.RE
micky3879b9f5e72025-07-08 18:04:53 -0400141or, more simply,
142.RS 4
143.EX
144gnatmake hello \(gaadacurses@USE_CFG_SUFFIX@\-config\(ga
145.EE
Steve Kondikae271bc2015-11-15 02:50:53 +0100146.RE
micky3879b9f5e72025-07-08 18:04:53 -0400147you can compile and link the program.
Steve Kondikae271bc2015-11-15 02:50:53 +0100148.SH "SEE ALSO"
micky3879b9f5e72025-07-08 18:04:53 -0400149\fB\%curses\fP(3X)