X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=include%2Fcurses.h.in;h=a2f539aa89735fa8e6ac345721fe41e3803d8a2a;hb=312665d3aaaf5d8e3ba34d80fdd650abf758272a;hp=2cb3224b3ecc51fdff6884e6d7ccf62f8e108cc7;hpb=47d2fb4537d9ad5bb14f4810561a327930ca4280;p=ncurses.git diff --git a/include/curses.h.in b/include/curses.h.in index 2cb3224b..a2f539aa 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,7 +33,7 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: curses.h.in,v 1.266 2020/02/08 10:51:53 tom Exp $ */ +/* $Id: curses.h.in,v 1.271 2021/03/20 16:25:43 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -60,10 +60,22 @@ */ #include +/* + * Extra headers. + */ #if @HAVE_STDINT_H@ #include #endif +#ifdef __cplusplus +#else +#if @HAVE_STDNORETURN_H@ +#include +#undef GCC_NORETURN +#define GCC_NORETURN _Noreturn +#endif +#endif + /* * User-definable tweak to disable the include of . */ @@ -497,55 +509,6 @@ struct _win_st }; #endif /* NCURSES_OPAQUE */ -/* - * This is an extension to support events... - */ -#if @NCURSES_EXT_FUNCS@ -#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; - -extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *); /* experimental */ -extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *);/* experimental */ - -#endif /* NCURSES_WGETCH_EVENTS */ -#endif /* NCURSES_EXT_FUNCS */ - /* * GCC (and some other compilers) define '__attribute__'; we're using this * macro to alert the compiler to flag inconsistencies in printf/scanf-like @@ -590,7 +553,7 @@ extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) #endif #undef GCC_DEPRECATED -#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)) +#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)) && !defined(NCURSES_INTERNALS) #define GCC_DEPRECATED(msg) __attribute__((deprecated)) #else #define GCC_DEPRECATED(msg) /* nothing */ @@ -895,7 +858,6 @@ extern NCURSES_EXPORT(int) putp (const char *); /* implemented */ extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */ #else extern NCURSES_EXPORT(char *) tparm (const char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */ -extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */ #endif extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */