/****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 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 *
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.546 2014/11/01 13:52:34 tom Exp $
+ * $Id: curses.priv.h,v 1.554 2016/11/21 23:28:54 tom Exp $
*
* curses.priv.h
*
weak_symbol(pthread_mutexattr_init);
extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
# undef sigprocmask
-# define sigprocmask _nc_sigprocmask
+# define sigprocmask(a, b, c) _nc_sigprocmask(a, b, c)
# endif
#endif
weak_symbol(pthread_equal);
extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
# undef sigprocmask
-# define sigprocmask _nc_sigprocmask
+# define sigprocmask(a, b, c) _nc_sigprocmask(a, b, c)
# endif
#endif /* USE_PTHREADS_EINTR */
#endif
#ifdef TRACE
- bool init_trace;
char trace_fname[PATH_MAX];
int trace_level;
FILE *trace_fp;
+ int trace_fd;
char *tracearg_buf;
size_t tracearg_used;
NCURSES_OUTC_FUNC (NCURSES_SP_ARGx CharOf(ch)); \
COUNT_OUTCHARS(1); \
} else { \
- PUTC_INIT; \
for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) { \
PUTC_ch = (ch).chars[PUTC_i]; \
if (PUTC_ch == L'\0') \
break; \
+ PUTC_INIT; \
PUTC_n = (int) wcrtomb(PUTC_buf, \
(ch).chars[PUTC_i], &PUT_st); \
if (PUTC_n <= 0) { \
#define TRACE_RETURN2(value,dst,src) return _nc_retrace_##dst##_##src(value)
#define TRACE_RETURN_SP(value,type) return _nc_retrace_##type(SP_PARM, value)
-#define NonNull(s) ((s) != 0 ? s : "<null>")
+typedef void VoidFunc(void);
+
+#define TR_FUNC(value) ((const char*) &(value))
+#define NonNull(s) ((s) != 0 ? s : "<null>")
#define returnAttr(code) TRACE_RETURN(code,attr_t)
#define returnBits(code) TRACE_RETURN(code,unsigned)
extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+extern NCURSES_EXPORT(char *) _nc_tracebits (void);
+extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *);
+extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *);
+
#if USE_WIDEC_SUPPORT
extern NCURSES_EXPORT(const char *) _nc_viswbuf2 (int, const wchar_t *);
extern NCURSES_EXPORT(const char *) _nc_viswbufn (const wchar_t *, int);
extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int));
/* lib_setup.c */
+#define SETUP_FAIL ERR
#define ret_error(code, fmt, arg) if (errret) {\
*errret = code;\
- returnCode(ERR);\
+ returnCode(SETUP_FAIL);\
} else {\
fprintf(stderr, fmt, arg);\
exit(EXIT_FAILURE);\
#define ret_error0(code, msg) if (errret) {\
*errret = code;\
- returnCode(ERR);\
+ returnCode(SETUP_FAIL);\
} else {\
fprintf(stderr, msg);\
exit(EXIT_FAILURE);\