IP : 3.149.248.93Hostname : host45.registrar-servers.comKernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
../
usr/
include/
sys/
../
libpng16/
../
rpc/
../
event2/
./
../
ncurses.h/
/
/**************************************************************************** * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/
/**************************************************************************** * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * * and: Eric S. Raymond <esr@snark.thyrsus.com> * * and: Thomas E. Dickey 1996-on * ****************************************************************************/
/* $Id: curses.h.in,v 1.257 2017/11/21 00:11:37 tom Exp $ */
#ifndef __NCURSES_H #define __NCURSES_H
#define CURSES 1 #define CURSES_H 1
/* These are defined only in curses.h, and are used for conditional compiles */ #define NCURSES_VERSION_MAJOR 6 #define NCURSES_VERSION_MINOR 1 #define NCURSES_VERSION_PATCH 20180224
/* This is defined in more than one ncurses header, for identification */ #undef NCURSES_VERSION #define NCURSES_VERSION "6.1"
/* * Definitions to facilitate DLL's. */ #include <ncurses_dll.h>
#if 1 #include <stdint.h> #endif
/* * User-definable tweak to disable the include of <stdbool.h>. */ #ifndef NCURSES_ENABLE_STDBOOL_H #define NCURSES_ENABLE_STDBOOL_H 1 #endif
/* * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses * configured using --disable-macros. */ #ifndef NCURSES_ATTR_T #define NCURSES_ATTR_T int #endif
/* * Expands to 'const' if ncurses is configured using --enable-const. Note that * doing so makes it incompatible with other implementations of X/Open Curses. */ #undef NCURSES_CONST #define NCURSES_CONST const
/* * The standard type used for color values, and for color-pairs. The latter * allows the curses library to enumerate the combinations of foreground and * background colors used by an application, and is normally the product of the * total foreground and background colors. * * X/Open uses "short" for both of these types, ultimately because they are * numbers from the SVr4 terminal database, which uses 16-bit signed values. */ #undef NCURSES_COLOR_T #define NCURSES_COLOR_T short
#undef NCURSES_PAIRS_T #define NCURSES_PAIRS_T short
/* * Definitions used to make WINDOW and similar structs opaque. */ #ifndef NCURSES_INTERNALS #define NCURSES_OPAQUE 0 #define NCURSES_OPAQUE_FORM 0 #define NCURSES_OPAQUE_MENU 0 #define NCURSES_OPAQUE_PANEL 0 #endif
/* * Definition used to optionally suppress wattr* macros to help with the * transition from ncurses5 to ncurses6 by allowing the header files to * be shared across development packages for ncursesw in both ABIs. */ #ifndef NCURSES_WATTR_MACROS #define NCURSES_WATTR_MACROS 0 #endif
/* * The reentrant code relies on the opaque setting, but adds features. */ #ifndef NCURSES_REENTRANT #define NCURSES_REENTRANT 0 #endif
/* * Control whether bindings for interop support are added. */ #undef NCURSES_INTEROP_FUNCS #define NCURSES_INTEROP_FUNCS 1
/* * The internal type used for window dimensions. */ #undef NCURSES_SIZE_T #define NCURSES_SIZE_T short
/* * Control whether tparm() supports varargs or fixed-parameter list. */ #undef NCURSES_TPARM_VARARGS #define NCURSES_TPARM_VARARGS 1
/* * Control type used for tparm's arguments. While X/Open equates long and * char* values, this is not always workable for 64-bit platforms. */ #undef NCURSES_TPARM_ARG #define NCURSES_TPARM_ARG intptr_t
/* * Control whether ncurses uses wcwidth() for checking width of line-drawing * characters. */ #undef NCURSES_WCWIDTH_GRAPHICS #define NCURSES_WCWIDTH_GRAPHICS 1
/* * NCURSES_CH_T is used in building the library, but not used otherwise in * this header file, since that would make the normal/wide-character versions * of the header incompatible. */ #undef NCURSES_CH_T #define NCURSES_CH_T cchar_t
/* * We need FILE, etc. Include this before checking any feature symbols. */ #include <stdio.h>
/* * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or * conflicting) when _XOPEN_SOURCE is 500 or greater. If NCURSES_WIDECHAR is * not already defined, e.g., if the platform relies upon nonstandard feature * test macros, define it at this point if the standard feature test macros * indicate that it should be defined. */ #ifndef NCURSES_WIDECHAR #if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) #define NCURSES_WIDECHAR 1 #else #define NCURSES_WIDECHAR 0 #endif #endif /* NCURSES_WIDECHAR */
#include <stdarg.h> /* we need va_list */ #if NCURSES_WIDECHAR #include <stddef.h> /* we want wchar_t */ #endif
/* X/Open and SVr4 specify that curses implements 'bool'. However, C++ may also * implement it. If so, we must use the C++ compiler's type to avoid conflict * with other interfaces. * * A further complication is that <stdbool.h> may declare 'bool' to be a * different type, such as an enum which is not necessarily compatible with * C++. If we have <stdbool.h>, make 'bool' a macro, so users may #undef it. * Otherwise, let it remain a typedef to avoid conflicts with other #define's. * In either case, make a typedef for NCURSES_BOOL which can be used if needed * from either C or C++. */
#undef TRUE #define TRUE 1
#undef FALSE #define FALSE 0
typedef unsigned char NCURSES_BOOL;
#if defined(__cplusplus) /* __cplusplus, etc. */
/* use the C++ compiler's bool type */ #define NCURSES_BOOL bool
#else /* c89, c99, etc. */
#if NCURSES_ENABLE_STDBOOL_H #include <stdbool.h> /* use whatever the C compiler decides bool really is */ #define NCURSES_BOOL bool #else /* there is no predefined bool - use our own */ #undef bool #define bool NCURSES_BOOL #endif
/* VT100 symbols begin here */ #define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */ #define ACS_LLCORNER NCURSES_ACS('m') /* lower left corner */ #define ACS_URCORNER NCURSES_ACS('k') /* upper right corner */ #define ACS_LRCORNER NCURSES_ACS('j') /* lower right corner */ #define ACS_LTEE NCURSES_ACS('t') /* tee pointing right */ #define ACS_RTEE NCURSES_ACS('u') /* tee pointing left */ #define ACS_BTEE NCURSES_ACS('v') /* tee pointing up */ #define ACS_TTEE NCURSES_ACS('w') /* tee pointing down */ #define ACS_HLINE NCURSES_ACS('q') /* horizontal line */ #define ACS_VLINE NCURSES_ACS('x') /* vertical line */ #define ACS_PLUS NCURSES_ACS('n') /* large plus or crossover */ #define ACS_S1 NCURSES_ACS('o') /* scan line 1 */ #define ACS_S9 NCURSES_ACS('s') /* scan line 9 */ #define ACS_DIAMOND NCURSES_ACS('`') /* diamond */ #define ACS_CKBOARD NCURSES_ACS('a') /* checker board (stipple) */ #define ACS_DEGREE NCURSES_ACS('f') /* degree symbol */ #define ACS_PLMINUS NCURSES_ACS('g') /* plus/minus */ #define ACS_BULLET NCURSES_ACS('~') /* bullet */ /* Teletype 5410v1 symbols begin here */ #define ACS_LARROW NCURSES_ACS(',') /* arrow pointing left */ #define ACS_RARROW NCURSES_ACS('+') /* arrow pointing right */ #define ACS_DARROW NCURSES_ACS('.') /* arrow pointing down */ #define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */ #define ACS_BOARD NCURSES_ACS('h') /* board of squares */ #define ACS_LANTERN NCURSES_ACS('i') /* lantern symbol */ #define ACS_BLOCK NCURSES_ACS('0') /* solid square block */ /* * These aren't documented, but a lot of System Vs have them anyway * (you can spot pprryyzz{{||}} in a lot of AT&T terminfo strings). * The ACS_names may not match AT&T's, our source didn't know them. */ #define ACS_S3 NCURSES_ACS('p') /* scan line 3 */ #define ACS_S7 NCURSES_ACS('r') /* scan line 7 */ #define ACS_LEQUAL NCURSES_ACS('y') /* less/equal */ #define ACS_GEQUAL NCURSES_ACS('z') /* greater/equal */ #define ACS_PI NCURSES_ACS('{') /* Pi */ #define ACS_NEQUAL NCURSES_ACS('|') /* not equal */ #define ACS_STERLING NCURSES_ACS('}') /* UK pound sign */
/* * Line drawing ACS names are of the form ACS_trbl, where t is the top, r * is the right, b is the bottom, and l is the left. t, r, b, and l might * be B (blank), S (single), D (double), or T (thick). The subset defined * here only uses B and S. */ #define ACS_BSSB ACS_ULCORNER #define ACS_SSBB ACS_LLCORNER #define ACS_BBSS ACS_URCORNER #define ACS_SBBS ACS_LRCORNER #define ACS_SBSS ACS_RTEE #define ACS_SSSB ACS_LTEE #define ACS_SSBS ACS_BTEE #define ACS_BSSS ACS_TTEE #define ACS_BSBS ACS_HLINE #define ACS_SBSB ACS_VLINE #define ACS_SSSS ACS_PLUS
#undef ERR #define ERR (-1)
#undef OK #define OK (0)
/* values for the _flags member */ #define _SUBWIN 0x01 /* is this a sub-window? */ #define _ENDLINE 0x02 /* is the window flush right? */ #define _FULLWIN 0x04 /* is the window full-screen? */ #define _SCROLLWIN 0x08 /* bottom edge is at screen bottom? */ #define _ISPAD 0x10 /* is this window a pad? */ #define _HASMOVED 0x20 /* has cursor moved since last refresh? */ #define _WRAPPED 0x40 /* cursor was just wrappped */
/* * this value is used in the firstchar and lastchar fields to mark * unchanged lines */ #define _NOCHANGE -1
/* * this value is used in the oldindex field to mark lines created by insertions * and scrolls. */ #define _NEWINDEX -1
typedef chtype attr_t; /* ...must be at least as wide as chtype */
#if NCURSES_WIDECHAR
#if 0 #ifdef mblen /* libutf8.h defines it w/o undefining first */ #undef mblen #endif #include <libutf8.h> #endif
#if 1 #include <wchar.h> /* ...to get mbstate_t, etc. */ #endif
#if 0 typedef unsigned short wchar_t1; #endif
#if 0 typedef unsigned int wint_t1; #endif
/* * cchar_t stores an array of CCHARW_MAX wide characters. The first is * normally a spacing character. The others are non-spacing. If those * (spacing and nonspacing) do not fill the array, a null L'\0' follows. * Otherwise, a null is assumed to follow when extracting via getcchar(). */ #define CCHARW_MAX 5 typedef struct { attr_t attr; wchar_t chars[CCHARW_MAX]; #if 1 #undef NCURSES_EXT_COLORS #define NCURSES_EXT_COLORS 20180224 int ext_color; /* color pair, must be more than 16-bits */ #endif } cchar_t;
#endif /* NCURSES_WIDECHAR */
#if !NCURSES_OPAQUE struct ldat;
struct _win_st { NCURSES_SIZE_T _cury, _curx; /* current cursor position */
/* window location and size */ NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */ NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */
short _flags; /* window state flags */
/* attribute tracking */ attr_t _attrs; /* current attribute for non-space character */ chtype _bkgd; /* current background char/attribute pair */
/* option values set by user */ bool _notimeout; /* no time out on function-key entry? */ bool _clear; /* consider all data in the window invalid? */ bool _leaveok; /* OK to not reset cursor on exit? */ bool _scroll; /* OK to scroll this window? */ bool _idlok; /* OK to use insert/delete line? */ bool _idcok; /* OK to use insert/delete char? */ bool _immed; /* window in immed mode? (not yet used) */ bool _sync; /* window in sync mode? */ bool _use_keypad; /* process function keys into KEY_ symbols? */ int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */
struct ldat *_line; /* the actual line data */
/* global screen state */ NCURSES_SIZE_T _regtop; /* top line of scrolling region */ NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */
/* these are used only if this is a sub-window */ int _parx; /* x coordinate of this window in parent */ int _pary; /* y coordinate of this window in parent */ WINDOW *_parent; /* pointer to parent if a sub-window */
/* these are used only if this is a pad */ struct pdat { NCURSES_SIZE_T _pad_y, _pad_x; NCURSES_SIZE_T _pad_top, _pad_left; NCURSES_SIZE_T _pad_bottom, _pad_right; } _pad;
NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */
#if NCURSES_WIDECHAR cchar_t _bkgrnd; /* current background char/attribute pair */ #if 1 int _color; /* current color-pair for non-space character */ #endif #endif }; #endif /* NCURSES_OPAQUE */
/* * This is an extension to support events... */ #if 1 #ifdef NCURSES_WGETCH_EVENTS #if !defined(__BEOS__) || defined(__HAIKU__) /* Fix _nc_timed_wait() on BEOS... */ # define NCURSES_EVENT_VERSION 1 #endif /* !defined(__BEOS__) */
/* * Bits to set in _nc_event.data.flags */ # define _NC_EVENT_TIMEOUT_MSEC 1 # define _NC_EVENT_FILE 2 # define _NC_EVENT_FILE_READABLE 2 # if 0 /* Not supported yet... */ # define _NC_EVENT_FILE_WRITABLE 4 # define _NC_EVENT_FILE_EXCEPTION 8 # endif
typedef struct { int type; union { long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ struct { unsigned int flags; int fd; unsigned int result; } fev; /* _NC_EVENT_FILE */ } data; } _nc_event;
typedef struct { int count; int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ _nc_event *events[1]; } _nc_eventlist;
/* * GCC (and some other compilers) define '__attribute__'; we're using this * macro to alert the compiler to flag inconsistencies in printf/scanf-like * function calls. Just in case '__attribute__' isn't defined, make a dummy. * Old versions of G++ do not accept it anyway, at least not consistently with * GCC. */ #if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) #define __attribute__(p) /* nothing */ #endif
/* * We cannot define these in ncurses_cfg.h, since they require parameters to be * passed (that is non-portable). If you happen to be using gcc with warnings * enabled, define * GCC_PRINTF * GCC_SCANF * to improve checking of calls to printw(), etc. */ #ifndef GCC_PRINTFLIKE #if defined(GCC_PRINTF) && !defined(printf) #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) #else #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ #endif #endif
/* * Curses uses a helper function. Define our type for this to simplify * extending it for the sp-funcs feature. */ typedef int (*NCURSES_OUTC)(int);
/* * Function prototypes. This is the complete X/Open Curses list of required * functions. Those marked `generated' will have sources generated from the * macro definitions later in this file, in order to satisfy XPG4.2 * requirements. */
/* * Extra extension-functions, which pass a SCREEN pointer rather than using * a global variable SP. */ #if 1 #undef NCURSES_SP_FUNCS #define NCURSES_SP_FUNCS 20180224 #define NCURSES_SP_NAME(name) name##_sp
/* Define the sp-funcs helper function */ #define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC) typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
/* * Most of the pseudo functions are macros that either provide compatibility * with older versions of curses, or provide inline functionality to improve * performance. */
/* * These pseudo functions are always implemented as macros: */
#define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) #define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) #define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) #define getparyx(win,y,x) (y = getpary(win), x = getparx(win))
#define getsyx(y,x) do { if (newscr) { \ if (is_leaveok(newscr)) \ (y) = (x) = -1; \ else \ getyx(newscr,(y), (x)); \ } \ } while(0)
/* * These apply to the first 256 color pairs. */ #define COLOR_PAIR(n) (NCURSES_BITS((n), 0) & A_COLOR) #define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,(a)) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
/* * Some wide-character functions can be implemented without the extensions. */ #if !NCURSES_OPAQUE #define getbkgd(win) (NCURSES_OK_ADDR(win) ? ((win)->_bkgd) : 0) #endif /* NCURSES_OPAQUE */
/* * X/Open curses deprecates SVr4 vwprintw/vwscanw, which are supposed to use * varargs.h. It adds new calls vw_printw/vw_scanw, which are supposed to * use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already * use stdarg.h, so... */ #define vw_printw vwprintw #define vw_scanw vwscanw
/* * Export fallback function for use in C++ binding. */ #if !1 #define vsscanf(a,b,c) _nc_vsscanf(a,b,c) NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); #endif
/* * Public variables. * * Notes: * a. ESCDELAY was an undocumented feature under AIX curses. * It gives the ESC expire time in milliseconds. * b. ttytype is needed for backward compatibility */ #if NCURSES_REENTRANT
#define KEY_MAX 0777 /* Maximum key value is 0633 */ /* $Id: curses.wide,v 1.50 2017/03/26 16:05:21 tom Exp $ */ /* * vile:cmode: * This file is part of ncurses, designed to be appended after curses.h.in * (see that file for the relevant copyright). */ #define _XOPEN_CURSES 1
/* * Function prototypes for wide-character operations. * * "generated" comments should include ":WIDEC" to make the corresponding * functions ifdef'd in lib_gen.c * * "implemented" comments do not need this marker. */
#endif /* NCURSES_WIDECHAR */ /* $Id: curses.tail,v 1.23 2016/02/13 16:37:45 tom Exp $ */ /* * vile:cmode: * This file is part of ncurses, designed to be appended after curses.h.in * (see that file for the relevant copyright). */
/* * In 32 bits the version-1 scheme does not provide enough space for a 5th * button, unless we choose to change the ABI by omitting the reserved-events. */ #if NCURSES_MOUSE_VERSION > 1
typedef struct { short id; /* ID to distinguish multiple devices */ int x, y, z; /* event coordinates (character-cell) */ mmask_t bstate; /* button state bits */ } MEVENT;
extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */ extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */
#if NCURSES_SP_FUNCS extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */ #endif