X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Ftest.priv.h;h=a577da12ecac9f216f948aaa2255a5a771f35f38;hb=00351a08b43e8b1c62e2c2d79b62ddca8531cfba;hp=b360c8a9bb77a6aa14750a92f583a2d927a6c057;hpb=21b36e89c00f2188954d680bf9fea60328b4538c;p=ncurses.git diff --git a/test/test.priv.h b/test/test.priv.h index b360c8a9..a577da12 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.193 2021/03/07 00:38:34 tom Exp $ */ +/* $Id: test.priv.h,v 1.204 2022/08/20 16:34:24 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -67,16 +67,8 @@ #define HAVE_ASSUME_DEFAULT_COLORS 0 #endif -#ifndef HAVE_BSD_STRING_H -#define HAVE_BSD_STRING_H 0 -#endif - -#ifndef HAVE_CURSES_VERSION -#define HAVE_CURSES_VERSION 0 -#endif - -#ifndef HAVE_CURSCR -#define HAVE_CURSCR 0 +#ifndef HAVE_CFMAKERAW +#define HAVE_CFMAKERAW 0 #endif #ifndef HAVE_CHGAT @@ -95,6 +87,18 @@ #define HAVE_COLOR_SET 0 #endif +#ifndef HAVE_BSD_STRING_H +#define HAVE_BSD_STRING_H 0 +#endif + +#ifndef HAVE_CURSES_VERSION +#define HAVE_CURSES_VERSION 0 +#endif + +#ifndef HAVE_CURSCR +#define HAVE_CURSCR 0 +#endif + #ifndef HAVE_DELSCREEN #define HAVE_DELSCREEN 0 #endif @@ -123,6 +127,10 @@ #define HAVE_GETMAXX 0 #endif +#ifndef HAVE_GETTIMEOFDAY +#define HAVE_GETTIMEOFDAY 0 +#endif + #ifndef HAVE_GETOPT_H #define HAVE_GETOPT_H 0 #endif @@ -163,6 +171,10 @@ #define HAVE_LOCALE_H 0 #endif +#ifndef HAVE_MATH_FUNCS +#define HAVE_MATH_FUNCS 0 +#endif + #ifndef HAVE_MATH_H #define HAVE_MATH_H 0 #endif @@ -243,6 +255,10 @@ #define HAVE_STDINT_H 0 #endif +#ifndef HAVE_STDNORETURN_H +#define HAVE_STDNORETURN_H 0 +#endif + #ifndef HAVE_STRSTR #define HAVE_STRSTR 0 #endif @@ -299,6 +315,10 @@ #define HAVE_WINSSTR 0 #endif +#ifndef HAVE_UNGET_WCH +#define HAVE_UNGET_WCH 0 +#endif + #ifndef HAVE_USE_DEFAULT_COLORS #define HAVE_USE_DEFAULT_COLORS 0 #endif @@ -391,6 +411,12 @@ #include #endif +#if HAVE_STDNORETURN_H && !defined(NCURSES_VERSION) +#include +#undef GCC_NORETURN +#define GCC_NORETURN _Noreturn +#endif + #if !(defined(NCURSES_WGETCH_EVENTS) && defined(NEED_KEY_EVENT)) #undef KEY_EVENT /* reduce compiler-warnings with Visual C++ */ #endif @@ -539,8 +565,12 @@ extern int optind; /* workaround, to build against NetBSD's variant of the form library */ #ifdef HAVE_NETBSD_FORM_H #define form_getyx(form, y, x) y = (int)current_field(form)->cursor_ypos, x = (int)current_field(form)->cursor_xpos -#else +#define form_field_row(field) (field)->form_row +#define form_field_col(field) (field)->form_col +#else /* e.g., SVr4, ncurses */ #define form_getyx(form, y, x) y = (int)(form)->currow, x = (int)(form)->curcol +#define form_field_row(field) (field)->frow +#define form_field_col(field) (field)->fcol #endif /* workaround, to build against NetBSD's variant of the form library */ @@ -708,10 +738,18 @@ extern int optind; #define HAVE_SNPRINTF 0 #endif +#ifndef HAVE_STRDUP +#define HAVE_STRDUP 0 +#endif + #ifndef USE_STRING_HACKS #define USE_STRING_HACKS 0 #endif +#ifndef HAVE_STRSTR +#define HAVE_STRSTR 0 +#endif + #ifndef NCURSES_CAST #ifdef __cplusplus extern "C" { @@ -738,10 +776,10 @@ extern "C" { #endif #if USE_STRING_HACKS && HAVE_SNPRINTF -#define _nc_SPRINTF NCURSES_VOID snprintf +#define _nc_SPRINTF NCURSES_VOID (snprintf) #define _nc_SLIMIT(n) NCURSES_CAST(size_t,n), #else -#define _nc_SPRINTF NCURSES_VOID sprintf +#define _nc_SPRINTF NCURSES_VOID (sprintf) #define _nc_SLIMIT(n) /* nothing */ #endif @@ -914,7 +952,7 @@ extern int TABSIZE; #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H #include -#if HAVE_EXIT_TERMINFO && (defined(USE_TERMINFO) || defined(USE_TINFO)) +#if HAVE_EXIT_TERMINFO && !defined(USE_CURSES) && (defined(USE_TERMINFO) || defined(USE_TINFO)) #undef ExitProgram #define ExitProgram(code) exit_terminfo(code) #elif HAVE_EXIT_CURSES @@ -1138,6 +1176,14 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */ #define CONST_MENUS /* nothing */ #endif +#if defined(NCURSES_CONST) +#define CONST_FMT NCURSES_CONST +#elif defined(PDCURSES) +#define CONST_FMT const +#else +#define CONST_FMT /* nothing */ +#endif + /* * Simplify setting up demo of threading with these macros. */ @@ -1162,7 +1208,7 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */ #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void) #endif -#if defined(TRACE) && HAVE__TRACEF +#if defined(TRACE) && HAVE__TRACEF && HAVE_CURSES_TRACE #define Trace(p) _tracef p #define USE_TRACE 1 #define START_TRACE() \