| curses.h | | curses.h | |
| /**************************************************************************
** | | /**************************************************************************
** | |
|
| * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.
* | | * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
* | |
| *
* | | *
* | |
| * Permission is hereby granted, free of charge, to any person obtaining a
* | | * Permission is hereby granted, free of charge, to any person obtaining a
* | |
| * copy of this software and associated documentation files (the
* | | * copy of this software and associated documentation files (the
* | |
| * "Software"), to deal in the Software without restriction, including
* | | * "Software"), to deal in the Software without restriction, including
* | |
| * without limitation the rights to use, copy, modify, merge, publish,
* | | * without limitation the rights to use, copy, modify, merge, publish,
* | |
| * distribute, distribute with modifications, sublicense, and/or sell
* | | * distribute, distribute with modifications, sublicense, and/or sell
* | |
| * copies of the Software, and to permit persons to whom the Software is
* | | * copies of the Software, and to permit persons to whom the Software is
* | |
| * furnished to do so, subject to the following conditions:
* | | * furnished to do so, subject to the following conditions:
* | |
| *
* | | *
* | |
| * The above copyright notice and this permission notice shall be included
* | | * The above copyright notice and this permission notice shall be included
* | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| * sale, use or other dealings in this Software without prior written
* | | * sale, use or other dealings in this Software without prior written
* | |
| * authorization.
* | | * authorization.
* | |
| **************************************************************************
**/ | | **************************************************************************
**/ | |
| | | | |
| /**************************************************************************
** | | /**************************************************************************
** | |
| * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
* | | * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
* | |
| * and: Eric S. Raymond <esr@snark.thyrsus.com>
* | | * and: Eric S. Raymond <esr@snark.thyrsus.com>
* | |
| * and: Thomas E. Dickey 1996-on
* | | * and: Thomas E. Dickey 1996-on
* | |
| **************************************************************************
**/ | | **************************************************************************
**/ | |
| | | | |
|
| /* $Id: curses.h.in,v 1.157 2005/07/02 16:58:28 tom Exp $ */ | | /* $Id: curses.h.in,v 1.167 2006/11/26 01:14:54 tom Exp $ */ | |
| | | | |
| #ifndef __NCURSES_H | | #ifndef __NCURSES_H | |
| #define __NCURSES_H | | #define __NCURSES_H | |
| | | | |
| #define CURSES 1 | | #define CURSES 1 | |
| #define CURSES_H 1 | | #define CURSES_H 1 | |
| | | | |
| /* This should be defined for the enhanced functionality to be visible. | | /* This should be defined for the enhanced functionality to be visible. | |
| * However, some of the wide-character (enhanced) functionality is missing. | | * However, some of the wide-character (enhanced) functionality is missing. | |
| * So we do not define it (yet). | | * So we do not define it (yet). | |
| #define _XOPEN_CURSES 1 | | #define _XOPEN_CURSES 1 | |
| */ | | */ | |
| | | | |
| /* These are defined only in curses.h, and are used for conditional compile
s */ | | /* These are defined only in curses.h, and are used for conditional compile
s */ | |
| #define NCURSES_VERSION_MAJOR 5 | | #define NCURSES_VERSION_MAJOR 5 | |
|
| #define NCURSES_VERSION_MINOR 5 | | #define NCURSES_VERSION_MINOR 6 | |
| #define NCURSES_VERSION_PATCH 20051010 | | #define NCURSES_VERSION_PATCH 20061217 | |
| | | | |
| /* This is defined in more than one ncurses header, for identification */ | | /* This is defined in more than one ncurses header, for identification */ | |
| #undef NCURSES_VERSION | | #undef NCURSES_VERSION | |
|
| #define NCURSES_VERSION "5.5" | | #define NCURSES_VERSION "5.6" | |
| | | | |
| /* | | /* | |
| * Identify the mouse encoding version. | | * Identify the mouse encoding version. | |
| */ | | */ | |
| #define NCURSES_MOUSE_VERSION 1 | | #define NCURSES_MOUSE_VERSION 1 | |
| | | | |
| /* | | /* | |
| * Definitions to facilitate DLL's. | | * Definitions to facilitate DLL's. | |
| */ | | */ | |
| #include <ncurses/ncurses_dll.h> | | #include <ncurses/ncurses_dll.h> | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 80 | |
| */ | | */ | |
| #ifndef NCURSES_ENABLE_STDBOOL_H | | #ifndef NCURSES_ENABLE_STDBOOL_H | |
| #define NCURSES_ENABLE_STDBOOL_H 1 | | #define NCURSES_ENABLE_STDBOOL_H 1 | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses | | * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses | |
| * configured using --disable-macros. | | * configured using --disable-macros. | |
| */ | | */ | |
| #ifdef NCURSES_NOMACROS | | #ifdef NCURSES_NOMACROS | |
|
| | | #ifndef NCURSES_ATTR_T | |
| #define NCURSES_ATTR_T attr_t | | #define NCURSES_ATTR_T attr_t | |
| #endif | | #endif | |
|
| | | #endif /* NCURSES_NOMACROS */ | |
| | | | |
| #ifndef NCURSES_ATTR_T | | #ifndef NCURSES_ATTR_T | |
| #define NCURSES_ATTR_T int | | #define NCURSES_ATTR_T int | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * Expands to 'const' if ncurses is configured using --enable-const. Note
that | | * Expands to 'const' if ncurses is configured using --enable-const. Note
that | |
| * doing so makes it incompatible with other implementations of X/Open Curs
es. | | * doing so makes it incompatible with other implementations of X/Open Curs
es. | |
| */ | | */ | |
| #undef NCURSES_CONST | | #undef NCURSES_CONST | |
| #define NCURSES_CONST /*nothing*/ | | #define NCURSES_CONST /*nothing*/ | |
| | | | |
|
| | | #undef NCURSES_INLINE | |
| | | #define NCURSES_INLINE inline | |
| | | | |
| /* | | /* | |
| * The internal type used for color values | | * The internal type used for color values | |
| */ | | */ | |
| #undef NCURSES_COLOR_T | | #undef NCURSES_COLOR_T | |
| #define NCURSES_COLOR_T short | | #define NCURSES_COLOR_T short | |
| | | | |
| /* | | /* | |
| * The internal type used for window dimensions. | | * The internal type used for window dimensions. | |
| */ | | */ | |
| #undef NCURSES_SIZE_T | | #undef NCURSES_SIZE_T | |
| #define NCURSES_SIZE_T short | | #define NCURSES_SIZE_T short | |
| | | | |
| /* | | /* | |
|
| | | * Control whether tparm() supports varargs or fixed-parameter list. | |
| | | */ | |
| | | #undef NCURSES_TPARM_VARARGS | |
| | | #define NCURSES_TPARM_VARARGS 1 | |
| | | | |
| | | /* | |
| * NCURSES_CH_T is used in building the library, but not used otherwise in | | * 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 versio
ns | | * this header file, since that would make the normal/wide-character versio
ns | |
| * of the header incompatible. | | * of the header incompatible. | |
| */ | | */ | |
| #undef NCURSES_CH_T | | #undef NCURSES_CH_T | |
| #define NCURSES_CH_T chtype | | #define NCURSES_CH_T chtype | |
| | | | |
| #if 0 && defined(_LP64) | | #if 0 && defined(_LP64) | |
| typedef unsigned chtype; | | typedef unsigned chtype; | |
| typedef unsigned mmask_t; | | typedef unsigned mmask_t; | |
| | | | |
| skipping to change at line 415 | | skipping to change at line 426 | |
| | | | |
| extern NCURSES_EXPORT_VAR(int) LINES; | | extern NCURSES_EXPORT_VAR(int) LINES; | |
| extern NCURSES_EXPORT_VAR(int) COLS; | | extern NCURSES_EXPORT_VAR(int) COLS; | |
| extern NCURSES_EXPORT_VAR(int) TABSIZE; | | extern NCURSES_EXPORT_VAR(int) TABSIZE; | |
| | | | |
| /* | | /* | |
| * This global was an undocumented feature under AIX curses. | | * This global was an undocumented feature under AIX curses. | |
| */ | | */ | |
| extern NCURSES_EXPORT_VAR(int) ESCDELAY; /* ESC expire time in millis
econds */ | | extern NCURSES_EXPORT_VAR(int) ESCDELAY; /* ESC expire time in millis
econds */ | |
| | | | |
|
| extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compa | | | |
| tibility */ | | | |
| | | | |
| /* | | /* | |
| * These functions are extensions - not in XSI Curses. | | * These functions are extensions - not in XSI Curses. | |
| */ | | */ | |
| #if 1 | | #if 1 | |
| extern NCURSES_EXPORT(bool) is_term_resized (int, int); | | extern NCURSES_EXPORT(bool) is_term_resized (int, int); | |
| extern NCURSES_EXPORT(char *) keybound (int, int); | | extern NCURSES_EXPORT(char *) keybound (int, int); | |
| extern NCURSES_EXPORT(const char *) curses_version (void); | | extern NCURSES_EXPORT(const char *) curses_version (void); | |
| extern NCURSES_EXPORT(int) assume_default_colors (int, int); | | extern NCURSES_EXPORT(int) assume_default_colors (int, int); | |
| extern NCURSES_EXPORT(int) define_key (const char *, int); | | extern NCURSES_EXPORT(int) define_key (const char *, int); | |
| extern NCURSES_EXPORT(int) key_defined (const char *); | | extern NCURSES_EXPORT(int) key_defined (const char *); | |
| extern NCURSES_EXPORT(int) keyok (int, bool); | | extern NCURSES_EXPORT(int) keyok (int, bool); | |
| extern NCURSES_EXPORT(int) resize_term (int, int); | | extern NCURSES_EXPORT(int) resize_term (int, int); | |
| extern NCURSES_EXPORT(int) resizeterm (int, int); | | extern NCURSES_EXPORT(int) resizeterm (int, int); | |
| extern NCURSES_EXPORT(int) use_default_colors (void); | | extern NCURSES_EXPORT(int) use_default_colors (void); | |
| extern NCURSES_EXPORT(int) use_extended_names (bool); | | extern NCURSES_EXPORT(int) use_extended_names (bool); | |
|
| | | extern NCURSES_EXPORT(int) use_legacy_coding (int); | |
| extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); | | extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); | |
|
| | | extern NCURSES_EXPORT(void) nofilter(void); | |
| #else | | #else | |
| #define curses_version() NCURSES_VERSION | | #define curses_version() NCURSES_VERSION | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * This is an extension to support events... | | * This is an extension to support events... | |
| */ | | */ | |
| #if 1 | | #if 1 | |
| #ifdef NCURSES_WGETCH_EVENTS | | #ifdef NCURSES_WGETCH_EVENTS | |
| #if !defined(__BEOS__) /* Fix _nc_timed_wait() on BEOS... */ | | #if !defined(__BEOS__) /* Fix _nc_timed_wait() on BEOS... */ | |
| | | | |
| skipping to change at line 498 | | skipping to change at line 509 | |
| * function calls. Just in case '__attribute__' isn't defined, make a dumm
y. | | * function calls. Just in case '__attribute__' isn't defined, make a dumm
y. | |
| * Old versions of G++ do not accept it anyway, at least not consistently w
ith | | * Old versions of G++ do not accept it anyway, at least not consistently w
ith | |
| * GCC. | | * GCC. | |
| */ | | */ | |
| #if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) | | #if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) | |
| #define __attribute__(p) /* nothing */ | | #define __attribute__(p) /* nothing */ | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * We cannot define these in ncurses_cfg.h, since they require parameters t
o be | | * We cannot define these in ncurses_cfg.h, since they require parameters t
o be | |
|
| * passed (that's non-portable). | | * passed (that is non-portable). If you happen to be using gcc with warni | |
| | | ngs | |
| | | * enabled, define | |
| | | * GCC_PRINTF | |
| | | * GCC_SCANF | |
| | | * to improve checking of calls to printw(), etc. | |
| */ | | */ | |
| #ifndef GCC_PRINTFLIKE | | #ifndef GCC_PRINTFLIKE | |
| #if defined(GCC_PRINTF) && !defined(printf) | | #if defined(GCC_PRINTF) && !defined(printf) | |
| #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) | | #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) | |
| #else | | #else | |
| #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ | | #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| #ifndef GCC_SCANFLIKE | | #ifndef GCC_SCANFLIKE | |
| | | | |
| skipping to change at line 688 | | skipping to change at line 703 | |
| extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* i
mplemented */ | | extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* i
mplemented */ | | extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* i
mplemented */ | | extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) pair_content (short,short*,short*); /* i
mplemented */ | | extern NCURSES_EXPORT(int) pair_content (short,short*,short*); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* g
enerated */ | | extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* i
mplemented */ | | extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/
* implemented */ | | extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/
* implemented */ | |
| extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int);
/* implemented */ | | extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int);
/* implemented */ | |
| extern NCURSES_EXPORT(int) printw (const char *,...) /* i
mplemented */ | | extern NCURSES_EXPORT(int) printw (const char *,...) /* i
mplemented */ | |
| GCC_PRINTFLIKE(1,2); | | GCC_PRINTFLIKE(1,2); | |
|
| extern NCURSES_EXPORT(int) putp (const char *);
/* implemented */ | | | |
| extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* i
mplemented */ | | extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* i
mplemented */ | |
| extern NCURSES_EXPORT(void) qiflush (void); /* i
mplemented */ | | extern NCURSES_EXPORT(void) qiflush (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) raw (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) raw (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* g
enerated */ | | extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) refresh (void); /* g
enerated */ | | extern NCURSES_EXPORT(int) refresh (void); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) resetty (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) resetty (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) reset_prog_mode (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) reset_prog_mode (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) reset_shell_mode (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) reset_shell_mode (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* i
mplemented */ | | extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) savetty (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) savetty (void); /* i
mplemented */ | |
| | | | |
| skipping to change at line 734 | | skipping to change at line 748 | |
| extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* i
mplemented */ | | extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) slk_touch (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) slk_touch (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) standout (void); /* g
enerated */ | | extern NCURSES_EXPORT(int) standout (void); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) standend (void); /* g
enerated */ | | extern NCURSES_EXPORT(int) standend (void); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) start_color (void); /* i
mplemented */ | | extern NCURSES_EXPORT(int) start_color (void); /* i
mplemented */ | |
| extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* i
mplemented */ | | extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *,int,int,int,int); /* i
mplemented */ | | extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *,int,int,int,int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* i
mplemented */ | | extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* i
mplemented */ | |
| extern NCURSES_EXPORT(chtype) termattrs (void);
/* implemented */ | | extern NCURSES_EXPORT(chtype) termattrs (void);
/* implemented */ | |
| extern NCURSES_EXPORT(char *) termname (void); /* i
mplemented */ | | extern NCURSES_EXPORT(char *) termname (void); /* i
mplemented */ | |
|
| extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* i | | | |
| mplemented */ | | | |
| extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* i | | | |
| mplemented */ | | | |
| extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* i | | | |
| mplemented */ | | | |
| extern NCURSES_EXPORT(void) timeout (int); /* g
enerated */ | | extern NCURSES_EXPORT(void) timeout (int); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* g
enerated */ | | extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) touchwin (WINDOW *);
/* generated */ | | extern NCURSES_EXPORT(int) touchwin (WINDOW *);
/* generated */ | |
|
| extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* i
mplemented */ | | | |
| extern NCURSES_EXPORT(int) typeahead (int); /* i
mplemented */ | | extern NCURSES_EXPORT(int) typeahead (int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) ungetch (int); /* i
mplemented */ | | extern NCURSES_EXPORT(int) ungetch (int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* g
enerated */ | | extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* g
enerated */ | |
| extern NCURSES_EXPORT(void) use_env (bool); /* i
mplemented */ | | extern NCURSES_EXPORT(void) use_env (bool); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) vidattr (chtype); /* i
mplemented */ | | extern NCURSES_EXPORT(int) vidattr (chtype); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int)); /* i
mplemented */ | | extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int)); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) vline (chtype, int);
/* generated */ | | extern NCURSES_EXPORT(int) vline (chtype, int);
/* generated */ | |
| extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* i
mplemented */ | | extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* g
enerated */ | | extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list)
; /* implemented */ | | extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list)
; /* implemented */ | |
| | | | |
| skipping to change at line 810 | | skipping to change at line 820 | |
| extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* i
mplemented */ | | extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* g
enerated */ | | extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* g
enerated */ | |
| extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* g
enerated */ | | extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* g
enerated */ | |
| extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* i
mplemented */ | | extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* i
mplemented */ | |
| extern NCURSES_EXPORT(void) wsyncup (WINDOW *);
/* implemented */ | | extern NCURSES_EXPORT(void) wsyncup (WINDOW *);
/* implemented */ | |
| extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* i
mplemented */ | | extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* i
mplemented */ | | extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* i
mplemented */ | |
| extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* i
mplemented */ | | extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* i
mplemented */ | |
| | | | |
| /* | | /* | |
|
| * vid_attr() was implemented originally based on the draft of XSI curses. | | * These are also declared in <ncurses/term.h>: | |
| | | */ | |
| | | extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* i | |
| | | mplemented */ | |
| | | extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* i | |
| | | mplemented */ | |
| | | extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* i | |
| | | mplemented */ | |
| | | extern NCURSES_EXPORT(int) putp (const char *); | |
| | | /* implemented */ | |
| | | | |
| | | #if NCURSES_TPARM_VARARGS | |
| | | extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* i | |
| | | mplemented */ | |
| | | #else | |
| | | extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,l | |
| | | ong,long,long,long,long,long); /* implemented */ | |
| | | extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); | |
| | | /* implemented */ | |
| | | #endif | |
| | | | |
| | | extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compa | |
| | | tibility */ | |
| | | | |
| | | /* | |
| | | * These functions are not in X/Open, but we use them in macro definitions: | |
| | | */ | |
| | | extern NCURSES_EXPORT(int) getcurx (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getcury (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getbegx (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getbegy (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getmaxx (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getmaxy (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getparx (const WINDOW *); /* g | |
| | | enerated */ | |
| | | extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* g | |
| | | enerated */ | |
| | | | |
| | | /* | |
| | | * vid_attr() was implemented originally based on a draft of XSI curses. | |
| */ | | */ | |
| #ifndef _XOPEN_SOURCE_EXTENDED | | #ifndef _XOPEN_SOURCE_EXTENDED | |
| #define vid_attr(a,pair,opts) vidattr(a) | | #define vid_attr(a,pair,opts) vidattr(a) | |
| #endif | | #endif | |
| | | | |
| /* attributes */ | | /* attributes */ | |
| | | | |
| #define NCURSES_ATTR_SHIFT 8 | | #define NCURSES_ATTR_SHIFT 8 | |
| #define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT)) | | #define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT)) | |
| | | | |
| | | | |
| skipping to change at line 842 | | skipping to change at line 881 | |
| #define A_INVIS NCURSES_BITS(1UL,15) | | #define A_INVIS NCURSES_BITS(1UL,15) | |
| #define A_PROTECT NCURSES_BITS(1UL,16) | | #define A_PROTECT NCURSES_BITS(1UL,16) | |
| #define A_HORIZONTAL NCURSES_BITS(1UL,17) | | #define A_HORIZONTAL NCURSES_BITS(1UL,17) | |
| #define A_LEFT NCURSES_BITS(1UL,18) | | #define A_LEFT NCURSES_BITS(1UL,18) | |
| #define A_LOW NCURSES_BITS(1UL,19) | | #define A_LOW NCURSES_BITS(1UL,19) | |
| #define A_RIGHT NCURSES_BITS(1UL,20) | | #define A_RIGHT NCURSES_BITS(1UL,20) | |
| #define A_TOP NCURSES_BITS(1UL,21) | | #define A_TOP NCURSES_BITS(1UL,21) | |
| #define A_VERTICAL NCURSES_BITS(1UL,22) | | #define A_VERTICAL NCURSES_BITS(1UL,22) | |
| | | | |
| /* | | /* | |
|
| * These apply to the first 256 color pairs. | | * Most of the pseudo functions are macros that either provide compatibilit | |
| | | y | |
| | | * with older versions of curses, or provide inline functionality to improv | |
| | | e | |
| | | * performance. | |
| */ | | */ | |
|
| #define COLOR_PAIR(n) NCURSES_BITS(n, 0) | | | |
| #define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_S | | | |
| HIFT))) | | | |
| | | | |
| /* | | /* | |
|
| * pseudo functions | | * These pseudo functions are always implemented as macros: | |
| */ | | */ | |
|
| #define wgetstr(w, s) wgetnstr(w, s, -1) | | | |
| #define getnstr(s, n) wgetnstr(stdscr, s, n) | | | |
| | | | |
| #define setterm(term) setupterm(term, 1, (int *)0) | | | |
| | | | |
| #define fixterm() reset_prog_mode() | | | |
| #define resetterm() reset_shell_mode() | | | |
| #define saveterm() def_prog_mode() | | | |
| #define crmode() cbreak() | | | |
| #define nocrmode() nocbreak() | | | |
| #define gettmode() | | | |
| | | | |
| #define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) | | #define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) | |
| #define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) | | #define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) | |
| #define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) | | #define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) | |
| #define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) | | #define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) | |
| | | | |
| #define getsyx(y,x) do { if(newscr->_leaveok) (y)=(x)=-1; \ | | #define getsyx(y,x) do { if(newscr->_leaveok) (y)=(x)=-1; \ | |
| else getyx(newscr,(y),(x)); \ | | else getyx(newscr,(y),(x)); \ | |
| } while(0) | | } while(0) | |
| #define setsyx(y,x) do { if((y)==-1 && (x)==-1) newscr->_leaveok=TRUE; \ | | #define setsyx(y,x) do { if((y)==-1 && (x)==-1) newscr->_leaveok=TRUE; \ | |
| else {newscr->_leaveok=FALSE;wmove(newscr,(y),(x));
} \ | | else {newscr->_leaveok=FALSE;wmove(newscr,(y),(x));
} \ | |
| } while(0) | | } while(0) | |
| | | | |
|
| | | #ifndef NCURSES_NOMACROS | |
| | | | |
| | | /* | |
| | | * These miscellaneous pseudo functions are provided for compatibility: | |
| | | */ | |
| | | | |
| | | #define wgetstr(w, s) wgetnstr(w, s, -1) | |
| | | #define getnstr(s, n) wgetnstr(stdscr, s, n) | |
| | | | |
| | | #define setterm(term) setupterm(term, 1, (int *)0) | |
| | | | |
| | | #define fixterm() reset_prog_mode() | |
| | | #define resetterm() reset_shell_mode() | |
| | | #define saveterm() def_prog_mode() | |
| | | #define crmode() cbreak() | |
| | | #define nocrmode() nocbreak() | |
| | | #define gettmode() | |
| | | | |
| /* It seems older SYSV curses versions define these */ | | /* It seems older SYSV curses versions define these */ | |
| #define getattrs(win) ((win)?(win)->_attrs:A_NORMAL) | | #define getattrs(win) ((win)?(win)->_attrs:A_NORMAL) | |
| #define getcurx(win) ((win)?(win)->_curx:ERR) | | #define getcurx(win) ((win)?(win)->_curx:ERR) | |
| #define getcury(win) ((win)?(win)->_cury:ERR) | | #define getcury(win) ((win)?(win)->_cury:ERR) | |
| #define getbegx(win) ((win)?(win)->_begx:ERR) | | #define getbegx(win) ((win)?(win)->_begx:ERR) | |
| #define getbegy(win) ((win)?(win)->_begy:ERR) | | #define getbegy(win) ((win)?(win)->_begy:ERR) | |
| #define getmaxx(win) ((win)?((win)->_maxx + 1):ERR) | | #define getmaxx(win) ((win)?((win)->_maxx + 1):ERR) | |
| #define getmaxy(win) ((win)?((win)->_maxy + 1):ERR) | | #define getmaxy(win) ((win)?((win)->_maxy + 1):ERR) | |
| #define getparx(win) ((win)?(win)->_parx:ERR) | | #define getparx(win) ((win)?(win)->_parx:ERR) | |
| #define getpary(win) ((win)?(win)->_pary:ERR) | | #define getpary(win) ((win)?(win)->_pary:ERR) | |
| | | | |
| #define wstandout(win) (wattrset(win,A_STANDOUT)) | | #define wstandout(win) (wattrset(win,A_STANDOUT)) | |
| #define wstandend(win) (wattrset(win,A_NORMAL)) | | #define wstandend(win) (wattrset(win,A_NORMAL)) | |
| | | | |
| #define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, a
t), NULL) | | #define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, a
t), NULL) | |
| #define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NUL
L) | | #define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NUL
L) | |
| | | | |
|
| #if 0 | | #if defined(_XOPEN_SOURCE_EXTENDED) && 0 | |
| #define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \ | | #define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \ | |
| (win)->_attrs = (at)) | | (win)->_attrs = (at)) | |
| #else | | #else | |
| #define wattrset(win,at) ((win)->_attrs = (at)) | | #define wattrset(win,at) ((win)->_attrs = (at)) | |
| #endif | | #endif | |
| | | | |
| #define scroll(win) wscrl(win,1) | | #define scroll(win) wscrl(win,1) | |
| | | | |
| #define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) | | #define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) | |
| #define touchline(win, s, c) wtouchln((win), s, c, 1) | | #define touchline(win, s, c) wtouchln((win), s, c, 1) | |
| | | | |
| skipping to change at line 918 | | skipping to change at line 964 | |
| | | | |
| #define winstr(w, s) winnstr(w, s, -1) | | #define winstr(w, s) winnstr(w, s, -1) | |
| #define winchstr(w, s) winchnstr(w, s, -1) | | #define winchstr(w, s) winchnstr(w, s, -1) | |
| #define winsstr(w, s) winsnstr(w, s, -1) | | #define winsstr(w, s) winsnstr(w, s, -1) | |
| | | | |
| #define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1) | | #define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1) | |
| #define waddstr(win,str) waddnstr(win,str,-1) | | #define waddstr(win,str) waddnstr(win,str,-1) | |
| #define waddchstr(win,str) waddchnstr(win,str,-1) | | #define waddchstr(win,str) waddchnstr(win,str,-1) | |
| | | | |
| /* | | /* | |
|
| | | * These apply to the first 256 color pairs. | |
| | | */ | |
| | | #define COLOR_PAIR(n) NCURSES_BITS(n, 0) | |
| | | #define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_S | |
| | | HIFT))) | |
| | | | |
| | | /* | |
| * pseudo functions for standard screen | | * pseudo functions for standard screen | |
| */ | | */ | |
| | | | |
| #define addch(ch) waddch(stdscr,ch) | | #define addch(ch) waddch(stdscr,ch) | |
| #define addchnstr(str,n) waddchnstr(stdscr,str,n) | | #define addchnstr(str,n) waddchnstr(stdscr,str,n) | |
| #define addchstr(str) waddchstr(stdscr,str) | | #define addchstr(str) waddchstr(stdscr,str) | |
| #define addnstr(str,n) waddnstr(stdscr,str,n) | | #define addnstr(str,n) waddnstr(stdscr,str,n) | |
| #define addstr(str) waddnstr(stdscr,str,-1) | | #define addstr(str) waddnstr(stdscr,str,-1) | |
| #define attroff(at) wattroff(stdscr,at) | | #define attroff(at) wattroff(stdscr,at) | |
| #define attron(at) wattron(stdscr,at) | | #define attron(at) wattron(stdscr,at) | |
| | | | |
| skipping to change at line 1020 | | skipping to change at line 1072 | |
| #define mvvline(y,x,c,n) mvwvline(stdscr,y,x,c,n) | | #define mvvline(y,x,c,n) mvwvline(stdscr,y,x,c,n) | |
| | | | |
| /* | | /* | |
| * Some wide-character functions can be implemented without the extensions. | | * Some wide-character functions can be implemented without the extensions. | |
| */ | | */ | |
| #define getbkgd(win) ((win)->_bkgd) | | #define getbkgd(win) ((win)->_bkgd) | |
| | | | |
| #define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) | | #define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) | |
| #define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) | | #define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) | |
| | | | |
|
| #if 0 | | #if defined(_XOPEN_SOURCE_EXTENDED) && 0 | |
| #define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_C
OLOR), \ | | #define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_C
OLOR), \ | |
| (win)->_color = (p), \ | | (win)->_color = (p), \ | |
| OK) | | OK) | |
| #define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) =
(win)->_attrs)), \ | | #define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) =
(win)->_attrs)), \ | |
| (void)((p) != 0 && (*(p) = (win)->_
color)), \ | | (void)((p) != 0 && (*(p) = (win)->_
color)), \ | |
| OK) | | OK) | |
| #else | | #else | |
| #define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_
COLOR) | COLOR_PAIR(p)), OK) | | #define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_
COLOR) | COLOR_PAIR(p)), OK) | |
| #define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) =
(win)->_attrs)), \ | | #define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) =
(win)->_attrs)), \ | |
| (void)((p) != 0 && (*(p) = PAIR_NUM
BER((win)->_attrs))), \ | | (void)((p) != 0 && (*(p) = PAIR_NUM
BER((win)->_attrs))), \ | |
| | | | |
| skipping to change at line 1051 | | skipping to change at line 1103 | |
| #define vw_scanw vwscanw | | #define vw_scanw vwscanw | |
| | | | |
| /* | | /* | |
| * Export fallback function for use in C++ binding. | | * Export fallback function for use in C++ binding. | |
| */ | | */ | |
| #if !1 | | #if !1 | |
| #define vsscanf(a,b,c) _nc_vsscanf(a,b,c) | | #define vsscanf(a,b,c) _nc_vsscanf(a,b,c) | |
| NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); | | NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); | |
| #endif | | #endif | |
| | | | |
|
| | | #endif /* NCURSES_NOMACROS */ | |
| | | | |
| /* | | /* | |
| * Pseudo-character tokens outside ASCII range. The curses wgetch() functi
on | | * Pseudo-character tokens outside ASCII range. The curses wgetch() functi
on | |
| * will return any given one of these only if the corresponding k- capabili
ty | | * will return any given one of these only if the corresponding k- capabili
ty | |
| * is defined in your terminal's terminfo entry. | | * is defined in your terminal's terminfo entry. | |
| * | | * | |
| * Some keys (KEY_A1, etc) are arranged like this: | | * Some keys (KEY_A1, etc) are arranged like this: | |
| * a1 up a3 | | * a1 up a3 | |
| * left b2 right | | * left b2 right | |
| * c1 down c3 | | * c1 down c3 | |
| * | | * | |
| | | | |
| skipping to change at line 1163 | | skipping to change at line 1217 | |
| #define KEY_SSAVE 0624 /* shifted save key */ | | #define KEY_SSAVE 0624 /* shifted save key */ | |
| #define KEY_SSUSPEND 0625 /* shifted suspend key */ | | #define KEY_SSUSPEND 0625 /* shifted suspend key */ | |
| #define KEY_SUNDO 0626 /* shifted undo key */ | | #define KEY_SUNDO 0626 /* shifted undo key */ | |
| #define KEY_SUSPEND 0627 /* suspend key */ | | #define KEY_SUSPEND 0627 /* suspend key */ | |
| #define KEY_UNDO 0630 /* undo key */ | | #define KEY_UNDO 0630 /* undo key */ | |
| #define KEY_MOUSE 0631 /* Mouse event has occurred */ | | #define KEY_MOUSE 0631 /* Mouse event has occurred */ | |
| #define KEY_RESIZE 0632 /* Terminal resize event */ | | #define KEY_RESIZE 0632 /* Terminal resize event */ | |
| #define KEY_EVENT 0633 /* We were interrupted by an event *
/ | | #define KEY_EVENT 0633 /* We were interrupted by an event *
/ | |
| | | | |
| #define KEY_MAX 0777 /* Maximum key value is 0633
*/ | | #define KEY_MAX 0777 /* Maximum key value is 0633
*/ | |
|
| /* $Id: curses.tail,v 1.12 2005/03/27 00:09:51 tom Exp $ */ | | /* | |
| | | * This file is part of ncurses, designed to be appended after curses.h.in | |
| | | * (see that file for the relevant copyright). | |
| | | */ | |
| | | /* $Id: curses.tail,v 1.14 2006/05/27 16:28:29 tom Exp $ */ | |
| | | | |
| /* mouse interface */ | | /* mouse interface */ | |
| | | | |
| #if NCURSES_MOUSE_VERSION > 1 | | #if NCURSES_MOUSE_VERSION > 1 | |
| #define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5)) | | #define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5)) | |
| #else | | #else | |
| #define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6)) | | #define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6)) | |
| #endif | | #endif | |
| | | | |
| #define NCURSES_BUTTON_RELEASED 001L | | #define NCURSES_BUTTON_RELEASED 001L | |
| | | | |
| skipping to change at line 1313 | | skipping to change at line 1371 | |
| #define TRACE_ICALLS 0x0200 /* trace internal/nested calls */ | | #define TRACE_ICALLS 0x0200 /* trace internal/nested calls */ | |
| #define TRACE_CCALLS 0x0400 /* trace per-character calls */ | | #define TRACE_CCALLS 0x0400 /* trace per-character calls */ | |
| #define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data
*/ | | #define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data
*/ | |
| #define TRACE_ATTRS 0x1000 /* trace attribute updates */ | | #define TRACE_ATTRS 0x1000 /* trace attribute updates */ | |
| | | | |
| #define TRACE_SHIFT 13 /* number of bits in the trace masks */ | | #define TRACE_SHIFT 13 /* number of bits in the trace masks */ | |
| #define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */ | | #define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */ | |
| | | | |
| #if defined(TRACE) || defined(NCURSES_TEST) | | #if defined(TRACE) || defined(NCURSES_TEST) | |
| extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable op
timizations */ | | extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable op
timizations */ | |
|
| #ifdef _XOPEN_SOURCE_EXTENDED | | | |
| extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *); | | | |
| extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *); | | | |
| #endif | | | |
| extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); | | extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); | |
| #define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ | | #define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ | |
| #define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ | | #define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ | |
| #define OPTIMIZE_SCROLL 0x04 /* scroll optimization */ | | #define OPTIMIZE_SCROLL 0x04 /* scroll optimization */ | |
| #define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) *
/ | | #define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) *
/ | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| | | | |
|
| | | #ifndef NCURSES_NOMACROS | |
| | | | |
| /* these names conflict with STL */ | | /* these names conflict with STL */ | |
| #undef box | | #undef box | |
| #undef clear | | #undef clear | |
| #undef erase | | #undef erase | |
| #undef move | | #undef move | |
| #undef refresh | | #undef refresh | |
| | | | |
|
| | | #endif /* NCURSES_NOMACROS */ | |
| | | | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* __NCURSES_H */ | | #endif /* __NCURSES_H */ | |
| | | | |
End of changes. 29 change blocks. |
| 41 lines changed or deleted | | 114 lines changed or added | |
|
| term.h | | term.h | |
| /**************************************************************************
** | | /**************************************************************************
** | |
|
| * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc.
* | | * Copyright (c) 1998-2003,2006 Free Software Foundation, Inc.
* | |
| *
* | | *
* | |
| * Permission is hereby granted, free of charge, to any person obtaining a
* | | * Permission is hereby granted, free of charge, to any person obtaining a
* | |
| * copy of this software and associated documentation files (the
* | | * copy of this software and associated documentation files (the
* | |
| * "Software"), to deal in the Software without restriction, including
* | | * "Software"), to deal in the Software without restriction, including
* | |
| * without limitation the rights to use, copy, modify, merge, publish,
* | | * without limitation the rights to use, copy, modify, merge, publish,
* | |
| * distribute, distribute with modifications, sublicense, and/or sell
* | | * distribute, distribute with modifications, sublicense, and/or sell
* | |
| * copies of the Software, and to permit persons to whom the Software is
* | | * copies of the Software, and to permit persons to whom the Software is
* | |
| * furnished to do so, subject to the following conditions:
* | | * furnished to do so, subject to the following conditions:
* | |
| *
* | | *
* | |
| * The above copyright notice and this permission notice shall be included
* | | * The above copyright notice and this permission notice shall be included
* | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| *
* | | *
* | |
| * Except as contained in this notice, the name(s) of the above copyright
* | | * 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
* | | * holders shall not be used in advertising or otherwise to promote the
* | |
| * sale, use or other dealings in this Software without prior written
* | | * sale, use or other dealings in this Software without prior written
* | |
| * authorization.
* | | * authorization.
* | |
| **************************************************************************
**/ | | **************************************************************************
**/ | |
| | | | |
| /**************************************************************************
**/ | | /**************************************************************************
**/ | |
| /* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
*/ | | /* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
*/ | |
| /* and: Eric S. Raymond <esr@snark.thyrsus.com>
*/ | | /* and: Eric S. Raymond <esr@snark.thyrsus.com>
*/ | |
|
| /* and: Thomas E. Dickey 1995-2003
*/ | | /* and: Thomas E. Dickey 1995-on
*/ | |
| /**************************************************************************
**/ | | /**************************************************************************
**/ | |
| | | | |
|
| /* $Id: MKterm.h.awk.in,v 1.42 2003/12/27 19:09:16 tom Exp $ */ | | /* $Id: MKterm.h.awk.in,v 1.47 2006/11/26 01:18:23 tom Exp $ */ | |
| | | | |
| /* | | /* | |
| ** term.h -- Definition of struct term | | ** term.h -- Definition of struct term | |
| */ | | */ | |
| | | | |
| #ifndef NCURSES_TERM_H_incl | | #ifndef NCURSES_TERM_H_incl | |
| #define NCURSES_TERM_H_incl 1 | | #define NCURSES_TERM_H_incl 1 | |
| | | | |
| #undef NCURSES_VERSION | | #undef NCURSES_VERSION | |
|
| #define NCURSES_VERSION "5.5" | | #define NCURSES_VERSION "5.6" | |
| | | | |
| #include <ncurses/ncurses_dll.h> | | #include <ncurses/ncurses_dll.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* Make this file self-contained by providing defaults for the HAVE_TERMIO[
S]_H | | /* Make this file self-contained by providing defaults for the HAVE_TERMIO[
S]_H | |
| * definition (based on the system for which this was configured). | | * definition (based on the system for which this was configured). | |
| */ | | */ | |
| | | | |
|
| #undef HAVE_TERMIOS_H | | | |
| #define HAVE_TERMIOS_H 1 | | | |
| | | | |
| #undef HAVE_TCGETATTR | | | |
| #define HAVE_TCGETATTR 1 | | | |
| | | | |
| #undef NCURSES_CONST | | #undef NCURSES_CONST | |
| #define NCURSES_CONST /*nothing*/ | | #define NCURSES_CONST /*nothing*/ | |
| | | | |
|
| | | #undef NCURSES_SBOOL | |
| | | #define NCURSES_SBOOL char | |
| | | | |
| #undef NCURSES_XNAMES | | #undef NCURSES_XNAMES | |
| #define NCURSES_XNAMES 1 | | #define NCURSES_XNAMES 1 | |
| | | | |
| /* We will use these symbols to hide differences between | | /* We will use these symbols to hide differences between | |
| * termios/termio/sgttyb interfaces. | | * termios/termio/sgttyb interfaces. | |
| */ | | */ | |
| #undef TTY | | #undef TTY | |
| #undef SET_TTY | | #undef SET_TTY | |
| #undef GET_TTY | | #undef GET_TTY | |
| | | | |
| /* Assume POSIX termio if we have the header and function */ | | /* Assume POSIX termio if we have the header and function */ | |
|
| #if HAVE_TERMIOS_H && HAVE_TCGETATTR | | /* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */ | |
| | | #if 1 && 1 | |
| | | | |
| #undef TERMIOS | | #undef TERMIOS | |
| #define TERMIOS 1 | | #define TERMIOS 1 | |
| | | | |
| #include <termios.h> | | #include <termios.h> | |
| #define TTY struct termios | | #define TTY struct termios | |
| | | | |
| #else /* !HAVE_TERMIOS_H */ | | #else /* !HAVE_TERMIOS_H */ | |
| | | | |
|
| #if 1 /* HAVE_TERMIO_H */ | | /* #if HAVE_TERMIO_H */ | |
| | | #if 1 | |
| | | | |
| #undef TERMIOS | | #undef TERMIOS | |
| #define TERMIOS 1 | | #define TERMIOS 1 | |
| | | | |
| #include <termio.h> | | #include <termio.h> | |
| #define TTY struct termio | | #define TTY struct termio | |
| | | | |
| /* Add definitions to make termio look like termios. | | /* Add definitions to make termio look like termios. | |
| * But ifdef it, since there are some implementations | | * But ifdef it, since there are some implementations | |
| * that try to do this for us in a fake <termio.h>. | | * that try to do this for us in a fake <termio.h>. | |
| | | | |
| skipping to change at line 676 | | skipping to change at line 675 | |
| #define BOOLCOUNT 44 | | #define BOOLCOUNT 44 | |
| #define NUMCOUNT 39 | | #define NUMCOUNT 39 | |
| #define STRCOUNT 414 | | #define STRCOUNT 414 | |
| | | | |
| /* used by code for comparing entries */ | | /* used by code for comparing entries */ | |
| #define acs_chars_index 146 | | #define acs_chars_index 146 | |
| | | | |
| typedef struct termtype { /* in-core form of terminfo data */ | | typedef struct termtype { /* in-core form of terminfo data */ | |
| char *term_names; /* str_table offset of term names */ | | char *term_names; /* str_table offset of term names */ | |
| char *str_table; /* pointer to string table */ | | char *str_table; /* pointer to string table */ | |
|
| char *Booleans; /* array of boolean values */ | | NCURSES_SBOOL *Booleans; /* array of boolean values */ | |
| short *Numbers; /* array of integer values */ | | short *Numbers; /* array of integer values */ | |
| char **Strings; /* array of string offsets */ | | char **Strings; /* array of string offsets */ | |
| | | | |
| #if NCURSES_XNAMES | | #if NCURSES_XNAMES | |
| char *ext_str_table; /* pointer to extended string table */ | | char *ext_str_table; /* pointer to extended string table */ | |
| char **ext_Names; /* corresponding names */ | | char **ext_Names; /* corresponding names */ | |
| | | | |
| unsigned short num_Booleans;/* count total Booleans */ | | unsigned short num_Booleans;/* count total Booleans */ | |
| unsigned short num_Numbers; /* count total Numbers */ | | unsigned short num_Numbers; /* count total Numbers */ | |
| unsigned short num_Strings; /* count total Strings */ | | unsigned short num_Strings; /* count total Strings */ | |
| | | | |
| skipping to change at line 746 | | skipping to change at line 745 | |
| extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[]; | | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[]; | |
| extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[]; | | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[]; | |
| | | | |
| #endif | | #endif | |
| | | | |
| /* internals */ | | /* internals */ | |
| extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf); | | extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf); | |
| extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf); | | extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf); | |
| extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const
, TERMTYPE *const); | | extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const
, TERMTYPE *const); | |
| extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE
*); | | extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE
*); | |
|
| | | extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, char *, int); | |
| extern NCURSES_EXPORT(char *) _nc_first_name (const char *const); | | extern NCURSES_EXPORT(char *) _nc_first_name (const char *const); | |
| extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *c
onst, const char *const); | | extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *c
onst, const char *const); | |
|
| extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMT
YPE *const); | | | |
| extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *); | | extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *); | |
| | | | |
| /* entry points */ | | /* entry points */ | |
| extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *); | | extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *); | |
| extern NCURSES_EXPORT(int) del_curterm (TERMINAL *); | | extern NCURSES_EXPORT(int) del_curterm (TERMINAL *); | |
| | | | |
| /* miscellaneous entry points */ | | /* miscellaneous entry points */ | |
| extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *); | | extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *); | |
| extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *); | | extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *); | |
| | | | |
| /* terminfo entry points, also declared in curses.h */ | | /* terminfo entry points, also declared in curses.h */ | |
| #if !defined(__NCURSES_H) | | #if !defined(__NCURSES_H) | |
| extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); | | extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); | |
|
| extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); | | | |
| extern NCURSES_EXPORT_VAR(char) ttytype[]; | | extern NCURSES_EXPORT_VAR(char) ttytype[]; | |
| extern NCURSES_EXPORT(int) putp (const char *); | | extern NCURSES_EXPORT(int) putp (const char *); | |
| extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); | | extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); | |
| extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); | | extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); | |
|
| | | | |
| | | #if 1 /* NCURSES_TPARM_VARARGS */ | |
| | | extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* i | |
| | | mplemented */ | |
| | | #else | |
| | | extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,l | |
| | | ong,long,long,long,long,long); /* implemented */ | |
| | | extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); | |
| | | /* implemented */ | |
| | | #endif | |
| | | | |
| #endif /* __NCURSES_H */ | | #endif /* __NCURSES_H */ | |
| | | | |
| /* termcap database emulation (XPG4 uses const only for 2nd param of tgeten
t) */ | | /* termcap database emulation (XPG4 uses const only for 2nd param of tgeten
t) */ | |
| #if !defined(NCURSES_TERMCAP_H_incl) | | #if !defined(NCURSES_TERMCAP_H_incl) | |
| extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **); | | extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **); | |
| extern NCURSES_EXPORT(char *) tgoto (const char *, int, int); | | extern NCURSES_EXPORT(char *) tgoto (const char *, int, int); | |
| extern NCURSES_EXPORT(int) tgetent (char *, const char *); | | extern NCURSES_EXPORT(int) tgetent (char *, const char *); | |
| extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *); | | extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *); | |
| extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *); | | extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *); | |
| extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int)); | | extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int)); | |
| | | | |
End of changes. 13 change blocks. |
| 15 lines changed or deleted | | 24 lines changed or added | |
|