X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=309c3e82a3fd75238376e0d26df8cf42fb8efc77;hp=533fc73d7f659d6d584baa7d769e4c39b10a7224;hb=f3eb40315f9e5eff503a172aed6d325b4e1f20c6;hpb=3f20704179ae1f625bd7bc75829929ccf46b25c3 diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 533fc73d..309c3e82 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.478 2011/05/14 17:36:15 tom Exp $ + * $Id: curses.priv.h,v 1.483 2011/09/17 19:08:20 tom Exp $ * * curses.priv.h * @@ -69,6 +69,7 @@ extern "C" { #include #include #include +#include #if HAVE_UNISTD_H #include @@ -195,6 +196,18 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); #define end_va_copy(dst) /* nothing */ #endif +/* + * Either/both S_ISxxx and/or S_IFxxx are defined in sys/types.h; some systems + * lack one or the other. + */ +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG) +#endif + /* * Scroll hints are useless when hashmap is used */ @@ -329,6 +342,7 @@ color_t; #endif #include +#include /* * Reduce dependency on cur_term global by using terminfo data from SCREEN's @@ -780,7 +794,7 @@ typedef struct { bool init_signals; bool init_screen; - const char *comp_sourcename; + char *comp_sourcename; char *comp_termtype; bool have_tic_directory; @@ -1061,6 +1075,7 @@ struct screen { int _mouse_fd; /* file-descriptor, if any */ bool _mouse_active; /* true if initialized */ mmask_t _mouse_mask; + mmask_t _mouse_bstate; NCURSES_CONST char *_mouse_xtermcap; /* string to enable/disable mouse */ MEVENT _mouse_events[EV_MAX]; /* hold the last mouse event seen */ MEVENT *_mouse_eventp; /* next free slot in event queue */ @@ -1827,6 +1842,25 @@ extern NCURSES_EXPORT(void) _nc_tinfo_cmdch(TERMINAL *, char); /* lib_set_term.c */ extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int)); +/* lib_setup.c */ +#define ret_error(code, fmt, arg) if (errret) {\ + *errret = code;\ + returnCode(ERR);\ + } else {\ + fprintf(stderr, fmt, arg);\ + exit(EXIT_FAILURE);\ + } + +#define ret_error1(code, fmt, arg) ret_error(code, "'%s': " fmt, arg) + +#define ret_error0(code, msg) if (errret) {\ + *errret = code;\ + returnCode(ERR);\ + } else {\ + fprintf(stderr, msg);\ + exit(EXIT_FAILURE);\ + } + /* lib_tstp.c */ #if USE_SIGWINCH extern NCURSES_EXPORT(int) _nc_handle_sigwinch(SCREEN *);