]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/MKada_config.in
ncurses 6.1 - patch 20180721
[ncurses.git] / man / MKada_config.in
1 .\"***************************************************************************
2 .\" Copyright (c) 2010-2014,2016 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: MKada_config.in,v 1.10 2016/11/05 21:08:21 tom Exp $
30 .ds C adacurses@USE_CFG_SUFFIX@\-config
31 .TH ADACURSES "1" "" "" "User Commands"
32 .SH NAME
33 adacurses@USE_CFG_SUFFIX@\-config \- helper script for AdaCurses libraries
34 .SH SYNOPSIS
35 .B \*C
36 [\fIoptions\fR]
37 .SH DESCRIPTION
38 This is a shell script which simplifies configuring an application to use
39 the AdaCurses library binding to ncurses.
40 .SH OPTIONS
41 .TP
42 \fB\-\-cflags\fR
43 echos the gnat (Ada compiler) flags needed to compile with AdaCurses.
44 .TP
45 \fB\-\-libs\fR
46 echos the gnat libraries needed to link with AdaCurses.
47 .TP
48 \fB\-\-version\fR
49 echos the release+patchdate version of the ncurses libraries used
50 to configure and build AdaCurses.
51 .TP
52 \fB\-\-help\fR
53 prints a list of the \fB\*C\fP script's options.
54 .PP
55 If no options are given, \fB\*C\fP prints the combination
56 of 
57 \fB\-\-cflags\fR and
58 \fB\-\-libs\fR
59 that \fBgnatmake\fP expects (see example).
60 .SH EXAMPLE
61 .PP
62 For example, supposing that you want to compile the "Hello World!"
63 program for AdaCurses.
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\fR(3X)
121 .PP
122 This describes \fBncurses\fR
123 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).