X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=d2b5b1b99b029767b1fbb2303508cd5b3c4f77f4;hp=66d15944e516c291d7762fbc9e2a6314f4a7104d;hb=603f0cb25b7acc8f04f4b18d2a2fe6f90039829a;hpb=a84fd46191c61f1151a7258e1539b89c395e61f9 diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 66d15944..d2b5b1b9 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * 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 * @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.546 2014/11/01 13:52:34 tom Exp $ + * $Id: curses.priv.h,v 1.552 2016/02/13 16:37:24 tom Exp $ * * curses.priv.h * @@ -1428,11 +1428,11 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; 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) { \ @@ -1630,7 +1630,10 @@ extern NCURSES_EXPORT(void) _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE #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 : "") +typedef void VoidFunc(void); + +#define TR_FUNC(value) ((const char*) &(value)) +#define NonNull(s) ((s) != 0 ? s : "") #define returnAttr(code) TRACE_RETURN(code,attr_t) #define returnBits(code) TRACE_RETURN(code,unsigned) @@ -1681,6 +1684,10 @@ extern NCURSES_EXPORT_VAR(long) _nc_outchars; 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); @@ -1947,9 +1954,10 @@ extern NCURSES_EXPORT(void) _nc_tinfo_cmdch(TERMINAL *, 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);\ @@ -1959,7 +1967,7 @@ extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int)); #define ret_error0(code, msg) if (errret) {\ *errret = code;\ - returnCode(ERR);\ + returnCode(SETUP_FAIL);\ } else {\ fprintf(stderr, msg);\ exit(EXIT_FAILURE);\