]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/MKada_config.in
ncurses 6.4 - patch 20230917
[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.22 2023/09/17 08:29:17 tom Exp $
31 .TH ADACURSES 1 2023-09-17 "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 .SH NAME
39 \fB\%adacurses@USE_CFG_SUFFIX@\-config\fP \-
40 helper script for @ADA_LIBNAME@ libraries
41 .SH SYNOPSIS
42 .B \*C
43 [\fIoptions\fP]
44 .SH DESCRIPTION
45 This is a shell script which simplifies configuring an application to use
46 the @ADA_LIBNAME@ library binding to ncurses.
47 .SH OPTIONS
48 .TP
49 \fB\-\-cflags\fP
50 echos the gnat (Ada compiler) flags needed to compile with @ADA_LIBNAME@.
51 .TP
52 \fB\-\-libs\fP
53 echos the gnat libraries needed to link with @ADA_LIBNAME@.
54 .TP
55 \fB\-\-version\fP
56 echos the release+patchdate version of the ncurses libraries used
57 to configure and build @ADA_LIBNAME@.
58 .TP
59 \fB\-\-help\fP
60 prints a list of the \fB\*C\fP script's options.
61 .PP
62 If no options are given, \fB\*C\fP prints the combination
63 of
64 \fB\-\-cflags\fP and
65 \fB\-\-libs\fP
66 that \fBgnatmake\fP expects (see example).
67 .SH EXAMPLE
68 For example, supposing that you want to compile the "Hello World!"
69 program for @ADA_LIBNAME@.
70 Make a file named "hello.adb":
71 .RS
72 .nf
73 .ft \*(CW
74 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
75
76 procedure Hello is
77
78    Visibility : Cursor_Visibility := Invisible;
79    done : Boolean := False;
80    c : Key_Code;
81
82 begin
83
84    Init_Screen;
85    Set_Echo_Mode (False);
86
87    Set_Cursor_Visibility (Visibility);
88    Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
89
90    Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2);
91    Add (Str => "Hello World!");
92
93    while not done loop
94
95       c := Get_Keystroke (Standard_Window);
96       case c is
97       when Character'Pos ('q') => done := True;
98       when others => null;
99       end case;
100
101       Nap_Milli_Seconds (50);
102    end loop;
103
104    End_Windows;
105
106 end Hello;
107 .fi
108 .RE
109 .PP
110 Then, using
111 .RS
112 .ft \*(CW
113 gnatmake `adacurses-config --cflags` hello -largs `adacurses-config --libs`
114 .ft
115 .RE
116 .PP
117 or (simpler):
118 .RS
119 .ft \*(CW
120 gnatmake hello `adacurses-config`
121 .ft
122 .RE
123 .PP
124 you will compile and link the program.
125 .SH "SEE ALSO"
126 \fBcurses\fP(3X)
127 .PP
128 This describes \fBncurses\fP
129 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).