****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.476 2011/04/16 15:31:02 tom Exp $
+ * $Id: curses.priv.h,v 1.480 2011/06/25 20:36:52 tom Exp $
*
* curses.priv.h
*
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#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
*/
#endif
#include <term.h>
+#include <nc_termios.h>
/*
* Reduce dependency on cur_term global by using terminfo data from SCREEN's
int _pair_count; /* count of color pairs */
int _pair_limit; /* actual limit of color-pairs */
#if NCURSES_EXT_FUNCS
+ bool _assumed_color; /* use assumed colors */
bool _default_color; /* use default colors */
bool _has_sgr_39_49; /* has ECMA default color support */
int _default_fg; /* assumed default foreground */
#define CHANGED_CELL(line,col) \
if (line->firstchar == _NOCHANGE) \
- line->firstchar = line->lastchar = (NCURSES_SIZE_T) col; \
+ line->firstchar = line->lastchar = (NCURSES_SIZE_T) (col); \
else if ((col) < line->firstchar) \
- line->firstchar = (NCURSES_SIZE_T) col; \
+ line->firstchar = (NCURSES_SIZE_T) (col); \
else if ((col) > line->lastchar) \
- line->lastchar = (NCURSES_SIZE_T) col
+ line->lastchar = (NCURSES_SIZE_T) (col)
#define CHANGED_RANGE(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
- line->firstchar = (NCURSES_SIZE_T) start; \
+ line->firstchar = (NCURSES_SIZE_T) (start); \
if (line->lastchar == _NOCHANGE \
|| line->lastchar < (end)) \
- line->lastchar = (NCURSES_SIZE_T) end
+ line->lastchar = (NCURSES_SIZE_T) (end)
#define CHANGED_TO_EOL(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
- line->firstchar = (NCURSES_SIZE_T) start; \
- line->lastchar = (NCURSES_SIZE_T) end
+ line->firstchar = (NCURSES_SIZE_T) (start); \
+ line->lastchar = (NCURSES_SIZE_T) (end)
#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))