X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=a9d2e128b1e558b54669027532aaea2ce73303b0;hp=81716e79b18a8d1cf833b5bddcbfd4b00ea9a202;hb=bd75bb126bdbd8300fe73e8e8b2fe97bd07eef75;hpb=48c8a4fe456e83238533fb42b36fd5253db22f59 diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 81716e79..a9d2e128 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $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 * @@ -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 @@ -1019,6 +1033,7 @@ struct screen { 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 */ @@ -1416,25 +1431,25 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #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]))