/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: test.priv.h,v 1.210 2023/02/25 21:26:04 tom Exp $ */
+/* $Id: test.priv.h,v 1.217 2023/11/11 00:23:26 tom Exp $ */
#ifndef __TEST_PRIV_H
#define __TEST_PRIV_H 1
#define HAVE_TIGETSTR 0
#endif
+#ifndef HAVE_TIPARM
+#define HAVE_TIPARM 0
+#endif
+
+#ifndef HAVE_TIPARM_S
+#define HAVE_TIPARM_S 0
+#endif
+
+#ifndef HAVE_TISCAN_S
+#define HAVE_TISCAN_S 0
+#endif
+
#ifndef HAVE_TPUTS_SP
#define HAVE_TPUTS_SP 0
#endif
#define NO_LEAKS 0
#endif
+#ifndef HAVE__NC_TPARM_ANALYZE
+#define HAVE__NC_TPARM_ANALYZE 0
+#endif
+
/*
* Workaround for HPUX
*/
#include <assert.h>
#include <ctype.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#define my_intptr_t intptr_t
+#else
+#define my_intptr_t long
+#endif
+
#if defined(_MSC_VER)
#undef popen
#define popen(s,n) _popen(s,n)
#define VERSION_COMMON() \
static char *version_common(char **argv) { \
char *base = argv[0]; \
- char *leaf = strrchr(base, '/'); \
+ char *part = strrchr(base, '/'); \
char *result = malloc(strlen(base) + 80); \
- if (result == NULL) { \
- static char unknown[] = "?"; \
- result = unknown; \
- } else { \
- if (leaf++ == NULL) leaf = base; \
- sprintf(result, "%.20s: ", leaf); \
+ if (result != NULL) { \
+ if (part++ == NULL) part = base; \
+ sprintf(result, "%.20s: ", part); \
format_version(result + strlen(result)); \
} \
return result; \
#define UChar(c) ((unsigned char)(c))
+#ifndef SIZEOF
#define SIZEOF(table) (sizeof(table)/sizeof(table[0]))
+#endif
#if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H
#include <nc_alloc.h>