Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   ncurses.3x    ( 3 )

пакет обработки и оптимизации ЭЛТ-экрана (CRT screen handling and optimization package)

  Name  |  Synopsis  |  Description  |  Return value  |  Environment  |    Alternate configurations    |  Files  |  See also  |  Extensions  |  Portability  |  Note  |

ALTERNATE CONFIGURATIONS

Several different configurations are possible, depending on the configure script options used when building ncurses. There are a few main options whose effects are visible to the applications developer using ncurses:

--disable-overwrite The standard include for ncurses is as noted in SYNOPSIS:

#include <curses.h>

This option is used to avoid filename conflicts when ncurses is not the main implementation of curses of the computer. If ncurses is installed disabling overwrite, it puts its headers in a subdirectory, e.g.,

#include <ncurses/curses.h>

It also omits a symbolic link which would allow you to use -lcurses to build executables.

--enable-widec The configure script renames the library and (if the --disable-overwrite option is used) puts the header files in a different subdirectory. All of the library names have a 'w' appended to them, i.e., instead of

-lncurses

you link with

-lncursesw

You must also enable the wide-character features in the header file when compiling for the wide-character library to use the extended (wide-character) functions. The symbol which enables these features has changed since XSI Curses, Issue 4:

• Originally, the wide-character feature required the symbol _XOPEN_SOURCE_EXTENDED but that was only valid for XPG4 (1996).

• Later, that was deemed conflicting with _XOPEN_SOURCE defined to 500.

• As of mid-2018, none of the features in this implementation require a _XOPEN_SOURCE feature greater than 600. However, X/Open Curses, Issue 7 (2009) recommends defining it to 700.

• Alternatively, you can enable the feature by defining NCURSES_WIDECHAR with the caveat that some other header file than curses.h may require a specific value for _XOPEN_SOURCE (or a system-specific symbol).

The curses.h file which is installed for the wide-character library is designed to be compatible with the normal library's header. Only the size of the WINDOW structure differs, and very few applications require more than a pointer to WINDOWs.

If the headers are installed allowing overwrite, the wide- character library's headers should be installed last, to allow applications to be built using either library from the same set of headers.

--with-pthread The configure script renames the library. All of the library names have a 't' appended to them (before any 'w' added by --enable-widec).

The global variables such as LINES are replaced by macros to allow read-only access. At the same time, setter-functions are provided to set these values. Some applications (very few) may require changes to work with this convention.

--with-shared

--with-normal

--with-debug

--with-profile The shared and normal (static) library names differ by their suffixes, e.g., libncurses.so and libncurses.a. The debug and profiling libraries add a '_g' and a '_p' to the root names respectively, e.g., libncurses_g.a and libncurses_p.a.

--with-termlib Low-level functions which do not depend upon whether the library supports wide-characters, are provided in the tinfo library.

By doing this, it is possible to share the tinfo library between wide/normal configurations as well as reduce the size of the library when only low-level functions are needed.

Those functions are described in these pages:

curs_extend(3X) - miscellaneous curses extensions

curs_inopts(3X) - curses input options

curs_kernel(3X) - low-level curses routines

curs_termattrs(3X) - curses environment query routines

curs_termcap(3X) - curses emulation of termcap

curs_terminfo(3X) - curses interfaces to terminfo database

curs_util(3X) - miscellaneous curses utility routines

--with-trace The trace function normally resides in the debug library, but it is sometimes useful to configure this in the shared library. Configure scripts should check for the function's existence rather than assuming it is always in the debug library.