X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest.priv.h;h=f0b660f434ce78c4cda936d3c5b1f7107eeb3671;hp=50ec1996411333446071686fe6562c69ea1776ef;hb=a6ff7e087fd944fd0035075d0bb528e95e498d81;hpb=e656c0ca01fc196f0eb66972af7fc51cb83d9651 diff --git a/test/test.priv.h b/test/test.priv.h index 50ec1996..f0b660f4 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. * + * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.180 2019/03/30 20:19:38 tom Exp $ */ +/* $Id: test.priv.h,v 1.185 2020/02/02 23:34:34 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -473,8 +474,16 @@ extern int optind; #define slk_clear() /* nothing */ #endif +#ifndef HAVE_CURSES_DATA_TABSIZE +#define HAVE_CURSES_DATA_TABSIZE 0 +#endif + #if !NCURSES_EXT_FUNCS +#if HAVE_CURSES_DATA_TABSIZE #define set_tabsize(n) TABSIZE = (n) +#else +#define set_tabsize(n) /* nothing */ +#endif #endif #if HAVE_TPUTS_SP @@ -725,12 +734,37 @@ extern "C" { #define _nc_SLIMIT(n) /* nothing */ #endif +/* + * X/Open Curses does not define the arrays of terminfo/termcap names as SVr4 + * curses did, and some implementations provide them anyway, but undeclared. + */ #ifdef DECL_CURSES_DATA_BOOLNAMES extern char *boolnames[], *boolcodes[], *boolfnames[]; extern char *numnames[], *numcodes[], *numfnames[]; extern char *strnames[], *strcodes[], *strfnames[]; #endif +/* + * Again, an SVr4 curses feature latent in the libraries but not in headers. + */ +#ifndef DECL_CURSES_DATA_TABSIZE +#define DECL_CURSES_DATA_TABSIZE 0 +#endif + +#if DECL_CURSES_DATA_TABSIZE +extern int TABSIZE; +#undef HAVE_CURSES_DATA_TABSIZE +#define HAVE_CURSES_DATA_TABSIZE 1 +#endif + +#ifndef HAVE_CURSES_DATA_TABSIZE +#define HAVE_CURSES_DATA_TABSIZE 0 +#endif + +/* + * X/Open Curses provides termname(), whose return value is analogous to the + * SVr4 curses variable ttytype[]. + */ #ifndef HAVE_CURSES_DATA_TTYTYPE #define HAVE_CURSES_DATA_TTYTYPE 0 #endif @@ -852,9 +886,9 @@ extern char *strnames[], *strcodes[], *strfnames[]; * ncurses restores the cursor in endwin(). Other libraries may not. */ #ifdef NCURSES_VERSION -#define exit_curses() endwin() +#define stop_curses() endwin() #else -#define exit_curses() do { endwin(); curs_set(1); } while (0) +#define stop_curses() do { endwin(); curs_set(1); } while (0) #endif /* ncurses implements tparm() with varargs, X/Open with a fixed-parameter list @@ -871,7 +905,7 @@ extern char *strnames[], *strcodes[], *strfnames[]; #include #if HAVE_NC_FREEALL && defined(USE_TINFO) #undef ExitProgram -#define ExitProgram(code) _nc_free_tinfo(code) +#define ExitProgram(code) exit_terminfo(code) #endif #else #define typeMalloc(type,n) (type *) malloc((size_t)(n) * sizeof(type)) @@ -943,9 +977,9 @@ extern char *strnames[], *strcodes[], *strfnames[]; #endif #if !HAVE_STRSTR -extern char * _nc_strstr (const char *, const char *); +extern char *_nc_strstr(const char *, const char *); #define strstr(a,b) _nc_strstr((a),(b)) -#endif /* !HAVE_STRSTR */ +#endif /* !HAVE_STRSTR */ /* Use this to quiet gcc's -Wwrite-strings warnings, but accommodate SVr4 * curses which doesn't have const parameters declared (so far) in the places @@ -1096,7 +1130,7 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */ if ((_nc_tracing & TRACE_MAXIMUM) == 0) { \ int t = _nc_getenv_num("NCURSES_TRACE"); \ if (t >= 0) \ - trace((unsigned) t); \ + curses_trace((unsigned) t); \ } extern unsigned _nc_tracing; extern int _nc_getenv_num(const char *);