]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/curses.h.in
ncurses 5.7 - patch 20090117
[ncurses.git] / include / curses.h.in
index 10ef798663a209179cb9fd5a39ae8703e0ff2113..230fff051fd2e6d848041a902a0880af7263949e 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.185 2008/03/29 20:23:15 tom Exp $ */
+/* $Id: curses.h.in,v 1.190 2008/12/20 22:28:52 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
 #define CURSES 1
 #define CURSES_H 1
 
 #define CURSES 1
 #define CURSES_H 1
 
-/* This should be defined for the enhanced functionality to be visible.
- * However, some of the wide-character (enhanced) functionality is missing.
- * So we do not define it (yet).
-#define _XOPEN_CURSES 1
- */
-
 /* These are defined only in curses.h, and are used for conditional compiles */
 #define NCURSES_VERSION_MAJOR @NCURSES_MAJOR@
 #define NCURSES_VERSION_MINOR @NCURSES_MINOR@
 /* These are defined only in curses.h, and are used for conditional compiles */
 #define NCURSES_VERSION_MAJOR @NCURSES_MAJOR@
 #define NCURSES_VERSION_MINOR @NCURSES_MINOR@
@@ -423,7 +417,8 @@ struct _win_st
  */
 #if @NCURSES_EXT_FUNCS@
 #ifdef NCURSES_WGETCH_EVENTS
  */
 #if @NCURSES_EXT_FUNCS@
 #ifdef NCURSES_WGETCH_EVENTS
-#if !defined(__BEOS__)         /* Fix _nc_timed_wait() on BEOS... */
+#if !defined(__BEOS__) || defined(__HAIKU__)
+   /* Fix _nc_timed_wait() on BEOS... */
 #  define NCURSES_EVENT_VERSION        1
 #endif /* !defined(__BEOS__) */
 
 #  define NCURSES_EVENT_VERSION        1
 #endif /* !defined(__BEOS__) */
 
@@ -855,18 +850,18 @@ extern NCURSES_EXPORT(void) nofilter(void);
  * These extensions provide access to information stored in the WINDOW even
  * when NCURSES_OPAQUE is set:
  */
  * These extensions provide access to information stored in the WINDOW even
  * when NCURSES_OPAQUE is set:
  */
-extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *);   /* generated */
-extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *);       /* generated */
-extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *);         /* generated */
-extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *);         /* generated */
-extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *);       /* generated */
-extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);                /* generated */
-extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);       /* generated */
-extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);       /* generated */
-extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);     /* generated */
-extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);      /* generated */
-extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);                /* generated */
-extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generated */
+extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *);   /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *);         /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *);         /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);     /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);      /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
 
 #else
 #define curses_version() NCURSES_VERSION
 
 #else
 #define curses_version() NCURSES_VERSION
@@ -912,17 +907,21 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
 #define getmaxyx(win,y,x)      (y = getmaxy(win), x = getmaxx(win))
 #define getparyx(win,y,x)      (y = getpary(win), x = getparx(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 (is_leaveok(newscr)) \
-                           (y) = (x) = -1; \
-                        else \
-                            getyx(newscr,(y), (x)); \
+#define getsyx(y,x) do { if (newscr) { \
+                            if (is_leaveok(newscr)) \
+                               (y) = (x) = -1; \
+                            else \
+                                getyx(newscr,(y), (x)); \
+                       } \
                    } while(0)
 
                    } while(0)
 
-#define setsyx(y,x) do { if ((y) == -1 && (x) == -1) \
-                           leaveok(newscr, TRUE); \
-                        else { \
-                           leaveok(newscr, FALSE); \
-                           wmove(newscr, (y), (x)); \
+#define setsyx(y,x) do { if (newscr) { \
+                           if ((y) == -1 && (x) == -1) \
+                               leaveok(newscr, TRUE); \
+                           else { \
+                               leaveok(newscr, FALSE); \
+                               wmove(newscr, (y), (x)); \
+                           } \
                        } \
                    } while(0)
 
                        } \
                    } while(0)