+/*
+ * These macros are extensions - not in X/Open Curses.
+ */
+#if @NCURSES_EXT_FUNCS@
+#if !NCURSES_OPAQUE
+#define is_cleared(win) ((win)->_clear)
+#define is_idcok(win) ((win)->_idcok)
+#define is_idlok(win) ((win)->_idlok)
+#define is_immedok(win) ((win)->_immed)
+#define is_keypad(win) ((win)->_use_keypad)
+#define is_leaveok(win) ((win)->_leaveok)
+#define is_nodelay(win) ((win)->_delay == 0)
+#define is_notimeout(win) ((win)->_notimeout)
+#define is_scrollok(win) ((win)->_scroll)
+#define is_syncok(win) ((win)->_sync)
+#define wgetparent(win) ((win) ? (win)->_parent : 0)
+#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
+#endif
+#endif
+
+#endif /* NCURSES_NOMACROS */
+
+/*
+ * Public variables.
+ *
+ * Notes:
+ * a. ESCDELAY was an undocumented feature under AIX curses.
+ * It gives the ESC expire time in milliseconds.
+ * b. ttytype is needed for backward compatibility
+ */
+#if @cf_cv_enable_reentrant@
+
+NCURSES_WRAPPED_VAR(WINDOW *, curscr);
+NCURSES_WRAPPED_VAR(WINDOW *, newscr);
+NCURSES_WRAPPED_VAR(WINDOW *, stdscr);
+NCURSES_WRAPPED_VAR(char *, ttytype);
+NCURSES_WRAPPED_VAR(int, COLORS);
+NCURSES_WRAPPED_VAR(int, COLOR_PAIRS);
+NCURSES_WRAPPED_VAR(int, COLS);
+NCURSES_WRAPPED_VAR(int, ESCDELAY);
+NCURSES_WRAPPED_VAR(int, LINES);
+NCURSES_WRAPPED_VAR(int, TABSIZE);
+
+#define curscr NCURSES_PUBLIC_VAR(curscr())
+#define newscr NCURSES_PUBLIC_VAR(newscr())
+#define stdscr NCURSES_PUBLIC_VAR(stdscr())
+#define ttytype NCURSES_PUBLIC_VAR(ttytype())
+#define COLORS NCURSES_PUBLIC_VAR(COLORS())
+#define COLOR_PAIRS NCURSES_PUBLIC_VAR(COLOR_PAIRS())
+#define COLS NCURSES_PUBLIC_VAR(COLS())
+#define ESCDELAY NCURSES_PUBLIC_VAR(ESCDELAY())
+#define LINES NCURSES_PUBLIC_VAR(LINES())
+#define TABSIZE NCURSES_PUBLIC_VAR(TABSIZE())
+
+#else
+
+extern NCURSES_EXPORT_VAR(WINDOW *) curscr;
+extern NCURSES_EXPORT_VAR(WINDOW *) newscr;
+extern NCURSES_EXPORT_VAR(WINDOW *) stdscr;
+extern NCURSES_EXPORT_VAR(char) ttytype[];
+extern NCURSES_EXPORT_VAR(int) COLORS;
+extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS;
+extern NCURSES_EXPORT_VAR(int) COLS;
+extern NCURSES_EXPORT_VAR(int) ESCDELAY;
+extern NCURSES_EXPORT_VAR(int) LINES;
+extern NCURSES_EXPORT_VAR(int) TABSIZE;
+
+#endif
+