+#include <nc_access.h>
+
+#if HAVE_NC_FREEALL
+#undef ExitProgram
+#ifdef USE_LIBTINFO
+#define ExitProgram(code) exit_terminfo(code)
+#else
+#define ExitProgram(code) _nc_free_tic(code)
+#endif
+#endif
+
+#define VtoTrace(opt) (unsigned) ((opt > 0) ? opt : (opt == 0))
+
+/* error-returns for tput */
+#define ErrUsage 2
+#define ErrTermType 3
+#define ErrCapName 4
+#define ErrSystem(n) (4 + (n))
+
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define IGNORE_RC(func) errno = (int) func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */