X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fcurses.h.in;h=6acf2d03fe0b6f7d98429e17e50e775b66250f5a;hp=c516b22c1fe4407e27327503c64ddc1f007facb9;hb=3d46d7e9d3e210417f34acf3b469378558398d07;hpb=a7e05fb9806cc1255b6ba4fb29e15d337f35b2ad diff --git a/include/curses.h.in b/include/curses.h.in index c516b22c..6acf2d03 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,11 +33,39 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: curses.h.in,v 1.269 2020/08/17 14:14:12 tom Exp $ */ +/* $Id: curses.h.in,v 1.277 2021/09/24 16:07:37 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H +/* + The symbols beginning NCURSES_ or USE_ are configuration choices. + A few of the former can be overridden by applications at compile-time. + Most of the others correspond to configure-script options (or checks + by the configure-script for features of the system on which it is built). + + These symbols can be overridden by applications at compile-time: + NCURSES_NOMACROS suppresses macro definitions in favor of functions + NCURSES_WATTR_MACROS suppresses wattr_* macro definitions + NCURSES_WIDECHAR is an alternative for declaring wide-character functions. + + These symbols are used only when building ncurses: + NCURSES_ATTR_T + NCURSES_FIELD_INTERNALS + NCURSES_INTERNALS + + These symbols are set by the configure script: + NCURSES_ENABLE_STDBOOL_H + NCURSES_EXPANDED + NCURSES_EXT_COLORS + NCURSES_EXT_FUNCS + NCURSES_EXT_PUTWIN + NCURSES_NO_PADDING + NCURSES_OSPEED_COMPAT + NCURSES_PATHSEP + NCURSES_REENTRANT + */ + #define CURSES 1 #define CURSES_H 1 @@ -60,10 +88,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 . */ @@ -391,7 +431,14 @@ extern NCURSES_EXPORT_VAR(chtype) acs_map[]; */ #define _NEWINDEX -1 +#ifdef NCURSES_INTERNALS +#undef SCREEN +#define SCREEN struct screen +SCREEN; +#else typedef struct screen SCREEN; +#endif + typedef struct _win_st WINDOW; typedef chtype attr_t; /* ...must be at least as wide as chtype */ @@ -510,14 +557,10 @@ struct _win_st /* * 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. + * passed (that is non-portable). */ #ifndef GCC_PRINTFLIKE -#if defined(GCC_PRINTF) && !defined(printf) +#ifndef printf #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) #else #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ @@ -525,7 +568,7 @@ struct _win_st #endif #ifndef GCC_SCANFLIKE -#if defined(GCC_SCANF) && !defined(scanf) +#ifndef scanf #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) #else #define GCC_SCANFLIKE(fmt,var) /*nothing*/ @@ -773,10 +816,14 @@ extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */ extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */ extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */ extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */ -extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list) GCC_DEPRECATED(use vw_printw); /* implemented */ -extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* implemented */ -extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *,va_list) GCC_DEPRECATED(use vw_scanw); /* implemented */ -extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *,va_list); /* implemented */ +extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_printw) /* implemented */ + GCC_PRINTFLIKE(2,0); +extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *, va_list) /* implemented */ + GCC_PRINTFLIKE(2,0); +extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_scanw) /* implemented */ + GCC_SCANFLIKE(2,0); +extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *, va_list) /* implemented */ + GCC_SCANFLIKE(2,0); extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */ extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */ extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */