cmCursesStandardIncludes.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCursesStandardIncludes_h
  14. #define cmCursesStandardIncludes_h
  15. #if defined(__sun__) && defined(__GNUC__)
  16. #define _MSE_INT_H
  17. #endif
  18. #if defined(__hpux)
  19. #define _BOOL_DEFINED
  20. #include <sys/time.h>
  21. #define _XOPEN_SOURCE_EXTENDED
  22. #include <curses.h>
  23. #include <form.h>
  24. #undef _XOPEN_SOURCE_EXTENDED
  25. #else
  26. #include <curses.h>
  27. #include <form.h>
  28. #endif
  29. #ifndef getmaxyx
  30. #define getmaxyx(w,y,x) ((y) = getmaxy(w), (x) = getmaxx(w))
  31. #endif
  32. // on some machines move erase and clear conflict with stl
  33. // so remove them from the namespace
  34. inline void curses_move(unsigned int x, unsigned int y)
  35. {
  36. move(x,y);
  37. }
  38. inline void curses_clear()
  39. {
  40. erase();
  41. clearok(stdscr, TRUE);
  42. }
  43. #undef move
  44. #undef erase
  45. #undef clear
  46. #endif // cmCursesStandardIncludes_h