]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/test.priv.h
ncurses 6.3 - patch 20220521
[ncurses.git] / test / test.priv.h
index 924b297d88756a825822cd90b9686b1b3f1a7654..125477f169d9e389e9e3ee7e5810bf7784d5693b 100644 (file)
@@ -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.196 2021/03/20 19:02:18 tom Exp $ */
+/* $Id: test.priv.h,v 1.201 2022/05/21 20:37:38 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 #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
@@ -549,8 +553,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 */
@@ -748,10 +756,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
 
@@ -924,7 +932,7 @@ extern int TABSIZE;
 
 #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H
 #include <nc_alloc.h>
-#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
@@ -1148,6 +1156,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.
  */