This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[rfa/tui] Include <ncurses.h> when available.


Hello,

The attatched twiddles gdb/tui so that it will include <ncurses.h> when
available.  I've found <ncurses.h> to be more complete than <curses.h>
on some systems.  The patch also eliminates a few stray <curses.h>
includes.

For those that are wondering, yes, this patch has the potential to clash
with utils.c:#include<curses.h> ("tui.h" can be included by defs.h). 
Since the TUI is still HP only that doesn't occure in the field.  Longer
term I hope to see defs.h:#include<tui.h> replaced.

	ok?
		Andrew
Index: ChangeLog
Thu May 25 16:56:05 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* configure.in (AC_CHECK_HEADERS): Check for ncurses.h.
	* config.in, configure: Re-generate.
	
Index: tui/ChangeLog
Thu May 25 16:58:01 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* tui.h: Include <ncurses.h> when available.
	* tui.c, tuiGeneralWin.c: Do not include <curses.h>.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.27
diff -p -r1.27 configure.in
*** configure.in	2000/05/25 06:49:01	1.27
--- configure.in	2000/05/25 07:31:38
*************** case $host_os in solaris2.7) case "$GCC"
*** 97,109 ****
      AC_DEFINE(_MSE_INT_H)
  esac; esac
  
! AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h thread_db.h proc_service.h \
  	memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
  	string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
  	term.h termio.h termios.h unistd.h wait.h sys/wait.h \
  	wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
  	time.h sys/ioctl.h sys/user.h \
! 	dirent.h sys/ndir.h sys/dir.h ndir.h)
  AC_HEADER_STAT
  
  AC_C_CONST
--- 97,110 ----
      AC_DEFINE(_MSE_INT_H)
  esac; esac
  
! AC_CHECK_HEADERS(ctype.h endian.h link.h thread_db.h proc_service.h \
  	memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
  	string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
  	term.h termio.h termios.h unistd.h wait.h sys/wait.h \
  	wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
  	time.h sys/ioctl.h sys/user.h \
! 	dirent.h sys/ndir.h sys/dir.h ndir.h \
! 	curses.h ncurses.h)
  AC_HEADER_STAT
  
  AC_C_CONST
Index: tui/tui.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.c,v
retrieving revision 1.1.1.3
diff -p -r1.1.1.3 tui.c
*** tui.c	1999/10/19 02:46:42	1.1.1.3
--- tui.c	2000/05/25 07:31:45
***************
*** 7,13 ****
  #include <stdlib.h>
  #include <ctype.h>
  #include <malloc.h>
- #include <curses.h>
  #ifdef HAVE_TERM_H
  #include <term.h>
  #endif
--- 7,12 ----
Index: tui/tui.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.h,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 tui.h
*** tui.h	1999/07/07 20:19:08	1.1.1.2
--- tui.h	2000/05/25 07:31:45
***************
*** 2,8 ****
--- 2,12 ----
  
  #ifndef TUI_H
  #define TUI_H
+ #if defined (HAVE_NCURSES_H)
+ #include <ncurses.h>
+ #elif defined (HAVE_CURSES_H)
  #include <curses.h>
+ #endif
  
  #ifdef ANSI_PROTOTYPES
  #include <stdarg.h>
Index: tui/tuiGeneralWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiGeneralWin.c,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 tuiGeneralWin.c
*** tuiGeneralWin.c	1999/07/07 20:19:19	1.1.1.2
--- tuiGeneralWin.c	2000/05/25 07:31:45
***************
*** 3,9 ****
     ** This module supports general window behavior
   */
  
- #include <curses.h>
  #include "defs.h"
  #include "tui.h"
  #include "tuiData.h"
--- 3,8 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]