Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
adacurses-config(1)		  User commands 	     adacurses-config(1)

NAME
     adacurses-config - configuration helper for AdaCurses libraries

SYNOPSIS
     adacurses-config [--cflags] [--libs]

     adacurses-config --version

     adacurses-config --help

DESCRIPTION
     This program development aid simplifies the process of configuring applica-
     tions to use the AdaCurses library binding to ncurses.

OPTIONS
     --cflags	reports  the  GNAT  (Ada  compiler) flags needed to compile with
		AdaCurses.

     --libs	reports the GNAT libraries needed to link with AdaCurses.

     --version	reports the release and patch date information	of  the  ncurses
		libraries  used  to configure and build AdaCurses and exits suc-
		cessfully.

     --help	issues a usage message and exits successfully.

     Omitting options implies "--cflags --libs".

EXAMPLES
     Consider a program using AdaCurses to write the message "Hello, world!"  in
     the  center of the screen and wait for the user to press the "q" key before
     exiting.  Populate a file hello.adb with the following.

	 with Terminal_Interface.Curses; use Terminal_Interface.Curses;

	 procedure Hello is
	    Visibility : Cursor_Visibility := Invisible;
	    Message : constant String := "Hello, World!";
	    done : Boolean := False;
	    c : Key_Code;
	 begin
	    Init_Screen;
	    Set_Echo_Mode (False);
	    Set_Cursor_Visibility (Visibility);
	    Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);

	    Move_Cursor (Line => Lines / 2,
			 Column => (Columns - Message'Length) / 2);
	    Add (Str => Message);

	    while not done loop
	       c := Get_Keystroke (Standard_Window);

	       case c is
		   when Character'Pos ('q') => done := True;
		   when others => null;
	       end case;

	       Nap_Milli_Seconds (50);
	    end loop;

	    End_Windows;
	 end Hello;

     Then, using
	 gnatmake `adacurses-config --cflags` hello \
	     -largs `adacurses-config --libs`
     or, more simply,
	 gnatmake hello `adacurses-config`
     you can compile and link the program.

SEE ALSO
     curses(3X)

ncurses .			   2025-04-05		     adacurses-config(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=adacurses-config&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help