xref: /dflybsd-src/contrib/gdb-7/gdb/gdb_curses.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* Portable <curses.h>.
25796c8dcSSimon Schubert 
3*ef5ccd6cSJohn Marino    Copyright (C) 2004-2013 Free Software Foundation, Inc.
45796c8dcSSimon Schubert 
55796c8dcSSimon Schubert    This file is part of GDB.
65796c8dcSSimon Schubert 
75796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
85796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
95796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
105796c8dcSSimon Schubert    (at your option) any later version.
115796c8dcSSimon Schubert 
125796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
135796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
145796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
155796c8dcSSimon Schubert    GNU General Public License for more details.
165796c8dcSSimon Schubert 
175796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
185796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
195796c8dcSSimon Schubert 
205796c8dcSSimon Schubert #ifndef GDB_CURSES_H
215796c8dcSSimon Schubert #define GDB_CURSES_H 1
225796c8dcSSimon Schubert 
23a45ae5f8SJohn Marino #ifdef __MINGW32__
24a45ae5f8SJohn Marino /* Windows API headers, included e.g. by serial.h, define MOUSE_MOVED,
25a45ae5f8SJohn Marino    and so does PDCurses's curses.h, but for an entirely different
26a45ae5f8SJohn Marino    purpose.  Since we don't use the Windows semantics of MOUSE_MOVED
27a45ae5f8SJohn Marino    anywhere, avoid compiler warnings by undefining MOUSE_MOVED before
28a45ae5f8SJohn Marino    including curses.h.  */
29a45ae5f8SJohn Marino #undef MOUSE_MOVED
30*ef5ccd6cSJohn Marino /* Likewise, KEY_EVENT is defined by ncurses.h, but also by Windows
31*ef5ccd6cSJohn Marino    API headers.  */
32*ef5ccd6cSJohn Marino #undef KEY_EVENT
33a45ae5f8SJohn Marino #endif
34*ef5ccd6cSJohn Marino 
35*ef5ccd6cSJohn Marino #if defined (HAVE_NCURSES_NCURSES_H)
36*ef5ccd6cSJohn Marino #include <ncurses/ncurses.h>
37*ef5ccd6cSJohn Marino #elif defined (HAVE_NCURSES_H)
38*ef5ccd6cSJohn Marino #include <ncurses.h>
39*ef5ccd6cSJohn Marino #elif defined (HAVE_CURSESX_H)
40*ef5ccd6cSJohn Marino #include <cursesX.h>
41*ef5ccd6cSJohn Marino #elif defined (HAVE_CURSES_H)
425796c8dcSSimon Schubert #include <curses.h>
435796c8dcSSimon Schubert #endif
445796c8dcSSimon Schubert 
455796c8dcSSimon Schubert #if defined (HAVE_NCURSES_TERM_H)
465796c8dcSSimon Schubert #include <ncurses/term.h>
475796c8dcSSimon Schubert #elif defined (HAVE_TERM_H)
485796c8dcSSimon Schubert #include <term.h>
495796c8dcSSimon Schubert #else
505796c8dcSSimon Schubert /* On MinGW, a real termcap library is usually not present.  Stub versions
515796c8dcSSimon Schubert    of the termcap functions will be built from windows-termcap.c.  Readline
525796c8dcSSimon Schubert    provides its own extern declarations when there's no termcap.h; do the
535796c8dcSSimon Schubert    same here for the termcap functions used in GDB.  */
545796c8dcSSimon Schubert extern int tgetnum (const char *);
555796c8dcSSimon Schubert #endif
565796c8dcSSimon Schubert 
575796c8dcSSimon Schubert #endif /* gdb_curses.h */
58