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