1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCursesStandardIncludes.h,v $
6 Date: $Date: 2007/08/27 13:01:14 $
7 Version: $Revision: 1.16 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmCursesStandardIncludes_h
18 #define cmCursesStandardIncludes_h
19 #if defined(__sun__) && defined(__GNUC__)
23 #include <cmFormConfigure.h>
26 # define _BOOL_DEFINED
27 # include <sys/time.h>
28 # define _XOPEN_SOURCE_EXTENDED
31 # undef _XOPEN_SOURCE_EXTENDED
33 /* figure out which curses.h to include */
34 # if defined(CURSES_HAVE_NCURSES_H)
36 # elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
37 # include <ncurses/ncurses.h>
38 # elif defined(CURSES_HAVE_NCURSES_CURSES_H)
39 # include <ncurses/curses.h>
47 // This is a hack to prevent warnings about these functions being
48 // declared but not referenced.
49 #if defined(__sgi) && !defined(__GNUC__)
50 class cmCursesStandardIncludesHack
55 Ref1
= sizeof(cfgetospeed(0)),
56 Ref2
= sizeof(cfgetispeed(0)),
57 Ref3
= sizeof(tcgetattr(0, 0)),
58 Ref4
= sizeof(tcsetattr(0, 0, 0)),
59 Ref5
= sizeof(cfsetospeed(0,0)),
60 Ref6
= sizeof(cfsetispeed(0,0))
66 #define getmaxyx(w,y,x) ((y) = getmaxy(w), (x) = getmaxx(w))
70 // on some machines move erase and clear conflict with stl
71 // so remove them from the namespace
72 inline void curses_move(unsigned int x
, unsigned int y
)
77 inline void curses_clear()
80 clearok(stdscr
, TRUE
);
88 #endif // cmCursesStandardIncludes_h