]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/test.priv.h
ncurses 6.0 - patch 20170819
[ncurses.git] / test / test.priv.h
index a57903580d09f697c7f15fc9a3cd260e6ae12037..cc5c1a8abe20bc8a0ad805139794adb80160c255 100644 (file)
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.143 2017/04/15 17:19:47 tom Exp $ */
+/* $Id: test.priv.h,v 1.147 2017/08/19 23:40:19 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 #define HAVE_SLK_INIT 0
 #endif
 
+#ifndef HAVE_STDINT_H
+#define HAVE_STDINT_H 0
+#endif
+
 #ifndef HAVE_SYS_IOCTL_H
 #define HAVE_SYS_IOCTL_H 0
 #endif
 #define HAVE_SYS_SELECT_H 0
 #endif
 
+#ifndef HAVE_TDESTROY
+#define HAVE_TDESTROY 0
+#endif
+
 #ifndef HAVE_TERMATTRS
 #define HAVE_TERMATTRS 0
 #endif
 #define HAVE_TPUTS_SP 0
 #endif
 
+#ifndef HAVE_TSEARCH
+#define HAVE_TSEARCH 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
@@ -906,12 +922,22 @@ 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 */