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