]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/test.priv.h
ncurses 6.0 - patch 20170729
[ncurses.git] / test / test.priv.h
index a30ae551b06775f69ed3291d9a4806e4dcff3976..4095df888d44c22ccf3575a1b68b27f61a98b152 100644 (file)
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.140 2017/03/06 09:43:51 tom Exp $ */
+/* $Id: test.priv.h,v 1.145 2017/06/24 14:07:38 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 #define HAVE_GETWIN 0
 #endif
 
+#ifndef HAVE_INIT_EXTENDED_COLOR
+#define HAVE_INIT_EXTENDED_COLOR 0
+#endif
+
 #ifndef HAVE_LIBFORM
 #define HAVE_LIBFORM 0
 #endif
 #define HAVE_TIGETSTR 0
 #endif
 
+#ifndef HAVE_TPUTS_SP
+#define HAVE_TPUTS_SP 0
+#endif
+
 #ifndef HAVE_TYPEAHEAD
 #define HAVE_TYPEAHEAD 0
 #endif
 #define HAVE_WRESIZE 0
 #endif
 
+#ifndef HAVE__TRACEF
+#define HAVE__TRACEF 0
+#endif
+
 #ifndef NCURSES_EXT_FUNCS
 #define NCURSES_EXT_FUNCS 0
 #endif
@@ -550,6 +562,9 @@ extern int optind;
 #define KEY_MIN 256            /* not defined in Solaris 8 */
 #endif
 
+#define HELP_KEY_1     '?'
+#define HELP_KEY_2     KEY_F(1)
+
 /* from nc_string.h, to make this stand alone */
 #if HAVE_BSD_STRING_H
 #include <bsd/string.h>
@@ -895,27 +910,39 @@ extern char *tgoto(char *, int, int);     /* available, but not prototyped */
 #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void)
 #endif
 
-#ifdef TRACE
+#if defined(TRACE) && HAVE__TRACEF
 #define Trace(p) _tracef p
 #define USE_TRACE 1
+#define START_TRACE() \
+       if ((_nc_tracing & TRACE_MAXIMUM) == 0) { \
+           int t = _nc_getenv_num("NCURSES_TRACE"); \
+           if (t >= 0) \
+               trace((unsigned) t); \
+       }
+extern unsigned _nc_tracing;
+extern int _nc_getenv_num(const char *);
 #else
+#undef TRACE
 #define Trace(p)               /* nothing */
 #define USE_TRACE 0
+#define START_TRACE()          /* nothing */
 #endif
 
 #define Trace2(p)              /* nothing */
 
-#define MvAddCh         (void) mvaddch
-#define MvWAddCh        (void) mvwaddch
-#define MvAddStr        (void) mvaddstr
-#define MvWAddStr       (void) mvwaddstr
-#define MvWAddChStr     (void) mvwaddchstr
-#define MvPrintw        (void) mvprintw
-#define MvWPrintw       (void) mvwprintw
-#define MvHLine         (void) mvhline
-#define MvWHLine        (void) mvwhline
-#define MvVLine         (void) mvvline
-#define MvWVLine        (void) mvwvline
+#define AddCh(c)               (void) addch((chtype)(c))
+#define WAddCh(w,c)            (void) waddch((w),(chtype)(c))
+#define MvAddCh(y,x,c)         (void) mvaddch((y),(x),(chtype)(c))
+#define MvWAddCh(w,y,x,c)      (void) mvwaddch((w),(y),(x),(chtype)(c))
+#define MvAddStr(y,x,s)                (void) mvaddstr((y),(x),(s))
+#define MvWAddStr(w,y,x,s)     (void) mvwaddstr((w),(y),(x),(s))
+#define MvWAddChStr(w,y,x,s)   (void) mvwaddchstr((w),(y),(x),(s))
+#define MvPrintw               (void) mvprintw
+#define MvWPrintw              (void) mvwprintw
+#define MvHLine                        (void) mvhline
+#define MvWHLine               (void) mvwhline
+#define MvVLine                        (void) mvvline
+#define MvWVLine               (void) mvwvline
 
 /*
  * The macro likely uses unsigned values, while X/Open prototype uses int.