]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/curses.h.in
ncurses 6.2 - patch 20200912
[ncurses.git] / include / curses.h.in
index 0f95c8fe7285ec7c0392c65c5f8cbc5521d4ab8a..c516b22c1fe4407e27327503c64ddc1f007facb9 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
+ * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 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            *
@@ -32,7 +33,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.259 2018/05/05 21:28:04 tom Exp $ */
+/* $Id: curses.h.in,v 1.269 2020/08/17 14:14:12 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
 #define NCURSES_REENTRANT @cf_cv_enable_reentrant@
 #endif
 
+/*
+ * In certain environments, we must work around linker problems for data
+ */
+#undef NCURSES_BROKEN_LINKER
+#if @BROKEN_LINKER@
+#define NCURSES_BROKEN_LINKER 1
+#endif
+
 /*
  * Control whether bindings for interop support are added.
  */
@@ -488,55 +497,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
@@ -581,8 +541,8 @@ 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))
-#define GCC_DEPRECATED(msg) __attribute__((deprecated));
+#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 */
 #endif
@@ -813,10 +773,10 @@ 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);  /* implemented */
-extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */
-extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *,va_list);   /* implemented */
-extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *,va_list);  /* 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) waddch (WINDOW *, const chtype);            /* implemented */
 extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int);   /* implemented */
 extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *);                /* generated */
@@ -886,17 +846,10 @@ 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 */
 
-/*
- * X/Open says this returns a bool; SVr4 also checked for out-of-range line.
- * The macro provides compatibility:
- */
-#define is_linetouched(w,l) ((!(w) || ((l) > getmaxy(w)) || ((l) < 0)) ? ERR : (is_linetouched)((w),(l)))
-
 /*
  * These functions are not in X/Open, but we use them in macro definitions:
  */
@@ -1398,8 +1351,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);     /*
  * use POSIX stdarg.h.  The ncurses versions of vwprintw/vwscanw already
  * use stdarg.h, so...
  */
-#define vw_printw              vwprintw
-#define vw_scanw               vwscanw
+/* define vw_printw            vwprintw */
+/* define vw_scanw             vwscanw */
 
 /*
  * Export fallback function for use in C++ binding.
@@ -1432,6 +1385,12 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
 #endif
 #endif
 
+/*
+ * X/Open says this returns a bool; SVr4 also checked for out-of-range line.
+ * The macro provides compatibility:
+ */
+#define is_linetouched(w,l) ((!(w) || ((l) > getmaxy(w)) || ((l) < 0)) ? ERR : (is_linetouched)((w),(l)))
+
 #endif /* NCURSES_NOMACROS */
 
 /*