- print "/****************************************************************************"
- print " * Copyright (c) 1998 Free Software Foundation, Inc. *"
- print " * *"
- print " * Permission is hereby granted, free of charge, to any person obtaining a *"
- print " * copy of this software and associated documentation files (the *"
- print " * "Software"), to deal in the Software without restriction, including *"
- print " * without limitation the rights to use, copy, modify, merge, publish, *"
- print " * distribute, distribute with modifications, sublicense, and/or sell *"
- print " * copies of the Software, and to permit persons to whom the Software is *"
- print " * furnished to do so, subject to the following conditions: *"
- print " * *"
- print " * The above copyright notice and this permission notice shall be included *"
- print " * in all copies or substantial portions of the Software. *"
- print " * *"
- print " * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
- print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
- print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
- print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
- print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
- print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
- print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
- print " * *"
- print " * Except as contained in this notice, the name(s) of the above copyright *"
- print " * holders shall not be used in advertising or otherwise to promote the *"
- print " * sale, use or other dealings in this Software without prior written *"
- print " * authorization. *"
- print " ****************************************************************************/"
- print ""
- print "/****************************************************************************/"
- print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
- print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
- print "/****************************************************************************/"
- print ""
- print "/* $Id: MKterm.h.awk.in,v 1.23 1998/02/11 12:13:46 tom Exp $ */"
- print ""
- print "/*"
- print "** term.h -- Definition of struct term"
- print "*/"
- print ""
- print "#ifndef _TERM_H"
- print "#define _TERM_H"
- print ""
- print "#undef NCURSES_VERSION"
- print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
- print ""
- print "#ifdef __cplusplus"
- print "extern \"C\" {"
- print "#endif"
- print ""
- print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
- print " * and BROKEN_LINKER definition (based on the system for which this was configured)."
- print " */"
- print ""
- print "#ifndef HAVE_TERMIOS_H"
- print "#define HAVE_TERMIOS_H 1/*default*/"
- print "#endif"
- print ""
- print "#ifndef HAVE_TERMIO_H"
- print "#define HAVE_TERMIO_H 0/*default*/"
- print "#endif"
- print ""
- print "#ifndef HAVE_TCGETATTR"
- print "#define HAVE_TCGETATTR 1/*default*/"
- print "#endif"
- print ""
- print "#ifndef BROKEN_LINKER"
- print "#define BROKEN_LINKER 0/*default*/"
- print "#endif"
- print ""
- print "#ifndef NCURSES_CONST"
- print "#define NCURSES_CONST /* nothing */"
- print "#endif"
- print ""
- print "/* Assume Posix termio if we have the header and function */"
- print "#if HAVE_TERMIOS_H && HAVE_TCGETATTR"
- print "#ifndef TERMIOS"
- print "#define TERMIOS 1"
- print "#endif"
- print "#include <termios.h>"
- print "#define TTY struct termios"
- print ""
- print "#else /* !HAVE_TERMIOS_H */"
- print ""
- print "#if HAVE_TERMIO_H"
- print "#ifndef TERMIOS"
- print "#define TERMIOS 1"
- print "#endif"
- print "#include <termio.h>"
- print "#define TTY struct termio"
- print "#define TCSANOW TCSETA"
- print "#define TCSADRAIN TCSETAW"
- print "#define TCSAFLUSH TCSETAF"
- print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)"
- print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)"
- print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)"
- print "#define TCIFLUSH 0"
- print "#define TCOFLUSH 1"
- print "#define TCIOFLUSH 2"
- print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)"
- print ""
- print "#else /* !HAVE_TERMIO_H */"
- print ""
- print "#undef TERMIOS"
- print "#include <sgtty.h>"
- print "#include <sys/ioctl.h>"
- print "#define TTY struct sgttyb"
- print ""
- print "#endif /* HAVE_TERMIO_H */"
- print ""
- print "#endif /* HAVE_TERMIOS_H */"
- print ""
- print "#ifdef TERMIOS"
- print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
- print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
- print "#else"
- print "#define GET_TTY(fd, buf) gtty(fd, buf)"
- print "#define SET_TTY(fd, buf) stty(fd, buf)"
- print "#endif"
- print ""
- print "extern char ttytype[];"
- print "#define NAMESIZE 256"
- print ""
- print "#define CUR cur_term->type."
- print ""
+ print "/****************************************************************************"
+ print " * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *"
+ print " * *"
+ print " * Permission is hereby granted, free of charge, to any person obtaining a *"
+ print " * copy of this software and associated documentation files (the *"
+ print " * \"Software\"), to deal in the Software without restriction, including *"
+ print " * without limitation the rights to use, copy, modify, merge, publish, *"
+ print " * distribute, distribute with modifications, sublicense, and/or sell *"
+ print " * copies of the Software, and to permit persons to whom the Software is *"
+ print " * furnished to do so, subject to the following conditions: *"
+ print " * *"
+ print " * The above copyright notice and this permission notice shall be included *"
+ print " * in all copies or substantial portions of the Software. *"
+ print " * *"
+ print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
+ print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
+ print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
+ print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
+ print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
+ print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
+ print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
+ print " * *"
+ print " * Except as contained in this notice, the name(s) of the above copyright *"
+ print " * holders shall not be used in advertising or otherwise to promote the *"
+ print " * sale, use or other dealings in this Software without prior written *"
+ print " * authorization. *"
+ print " ****************************************************************************/"
+ print ""
+ print "/****************************************************************************/"
+ print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
+ print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
+ print "/* and: Thomas E. Dickey 1995-on */"
+ print "/****************************************************************************/"
+ print ""
+ print "/* $Id: MKterm.h.awk.in,v 1.49 2007/08/18 11:44:26 tom Exp $ */"
+ print ""
+ print "/*"
+ print "** term.h -- Definition of struct term"
+ print "*/"
+ print ""
+ print "#ifndef NCURSES_TERM_H_incl"
+ print "#define NCURSES_TERM_H_incl 1"
+ print ""
+ print "#undef NCURSES_VERSION"
+ print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
+ print ""
+ print "#include <ncurses_dll.h>"
+ print ""
+ print "#ifdef __cplusplus"
+ print "extern \"C\" {"
+ print "#endif"
+ print ""
+ print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
+ print " * definition (based on the system for which this was configured)."
+ print " */"
+ print ""
+ print "#undef NCURSES_CONST"
+ print "#define NCURSES_CONST @NCURSES_CONST@"
+ print ""
+ print "#undef NCURSES_SBOOL"
+ print "#define NCURSES_SBOOL @NCURSES_SBOOL@"
+ print ""
+ print "#undef NCURSES_XNAMES"
+ print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
+ print ""
+ print "/* We will use these symbols to hide differences between"
+ print " * termios/termio/sgttyb interfaces."
+ print " */"
+ print "#undef TTY"
+ print "#undef SET_TTY"
+ print "#undef GET_TTY"
+ print ""
+ print "/* Assume POSIX termio if we have the header and function */"
+ print "/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */"
+ print "#if @HAVE_TERMIOS_H@ && @HAVE_TCGETATTR@"
+ print ""
+ print "#undef TERMIOS"
+ print "#define TERMIOS 1"
+ print ""
+ print "#include <termios.h>"
+ print "#define TTY struct termios"
+ print ""
+ print "#else /* !HAVE_TERMIOS_H */"
+ print ""
+ print "/* #if HAVE_TERMIO_H */"
+ print "#if @HAVE_TERMIO_H@"
+ print ""
+ print "#undef TERMIOS"
+ print "#define TERMIOS 1"
+ print ""
+ print "#include <termio.h>"
+ print "#define TTY struct termio"
+ print ""
+ print "/* Add definitions to make termio look like termios."
+ print " * But ifdef it, since there are some implementations"
+ print " * that try to do this for us in a fake <termio.h>."
+ print " */"
+ print "#ifndef TCSANOW"
+ print "#define TCSANOW TCSETA"
+ print "#endif"
+ print "#ifndef TCSADRAIN"
+ print "#define TCSADRAIN TCSETAW"
+ print "#endif"
+ print "#ifndef TCSAFLUSH"
+ print "#define TCSAFLUSH TCSETAF"
+ print "#endif"
+ print "#ifndef tcsetattr"
+ print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)"
+ print "#endif"
+ print "#ifndef tcgetattr"
+ print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)"
+ print "#endif"
+ print "#ifndef cfgetospeed"
+ print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)"
+ print "#endif"
+ print "#ifndef TCIFLUSH "
+ print "#define TCIFLUSH 0"
+ print "#endif"
+ print "#ifndef TCOFLUSH "
+ print "#define TCOFLUSH 1"
+ print "#endif"
+ print "#ifndef TCIOFLUSH "
+ print "#define TCIOFLUSH 2"
+ print "#endif"
+ print "#ifndef tcflush"
+ print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)"
+ print "#endif"
+ print ""
+ print "#else /* !HAVE_TERMIO_H */"
+ print ""
+ print "#undef TERMIOS"
+ print "#include <sgtty.h>"
+ print "#include <sys/ioctl.h>"
+ print "#define TTY struct sgttyb"
+ print ""
+ print "#endif /* HAVE_TERMIO_H */"
+ print ""
+ print "#endif /* HAVE_TERMIOS_H */"
+ print ""
+ print "#ifdef TERMIOS"
+ print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
+ print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
+ print "#else"
+ print "#define GET_TTY(fd, buf) gtty(fd, buf)"
+ print "#define SET_TTY(fd, buf) stty(fd, buf)"
+ print "#endif"
+ print ""
+ print "#define NAMESIZE 256"
+ print ""
+ print "#define CUR cur_term->type."
+ print ""