****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.603 2018/06/30 21:46:25 tom Exp $
+ * $Id: curses.priv.h,v 1.607 2018/11/24 17:27:36 tom Exp $
*
* curses.priv.h
*
#include <unistd.h>
#endif
-#if HAVE_SYS_BSDTYPES_H) && !(defined(_WIN32) || defined(_WIN64))
+#if HAVE_SYS_BSDTYPES_H && !(defined(_WIN32) || defined(_WIN64))
#include <sys/bsdtypes.h> /* needed for ISC */
#endif
int slk_format;
+ int getstr_limit; /* getstr_limit based on POSIX LINE_MAX */
+
char *safeprint_buf;
size_t safeprint_used;
#define N_RIPS 5
+/* The limit reserves one byte for a terminating NUL */
+#define my_getstr_limit (_nc_globals.getstr_limit - 1)
+#define _nc_getstr_limit(n) \
+ (((n) < 0) \
+ ? my_getstr_limit \
+ : (((n) > my_getstr_limit) \
+ ? my_getstr_limit \
+ : (n)))
+
#ifdef USE_PTHREADS
typedef struct _prescreen_list {
struct _prescreen_list *next;
#define TR_FUNC(value) ((const char*) (value))
#define NonNull(s) ((s) != 0 ? s : "<null>")
+#define NonEmpty(s) ((s) != 0 && *(s) != '\0')
#define returnAttr(code) TRACE_RETURN(code,attr_t)
#define returnBits(code) TRACE_RETURN(code,unsigned)