]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/MKterm.h.awk.in
ncurses 4.2
[ncurses.git] / include / MKterm.h.awk.in
index e65b686bcc154017b5f1362b0989ed2a9a154c33..eb7afe706c88158a0e28842f648172a4b3549e8f 100644 (file)
@@ -1,27 +1,39 @@
 
 BEGIN          {
 
 BEGIN          {
-
-                   print "/***************************************************************************"
-                   print "*                            COPYRIGHT NOTICE                              *"
-                   print "****************************************************************************"
-                   print "*                ncurses is copyright (C) 1992-1995                        *"
-                   print "*                          Zeyd M. Ben-Halim                               *"
-                   print "*                          zmbenhal@netcom.com                             *"
-                   print "*                          Eric S. Raymond                                 *"
-                   print "*                          esr@snark.thyrsus.com                           *"
-                   print "*                                                                          *"
-                   print "*        Permission is hereby granted to reproduce and distribute ncurses  *"
-                   print "*        by any means and for any fee, whether alone or as part of a       *"
-                   print "*        larger distribution, in source or in binary form, PROVIDED        *"
-                   print "*        this notice is included with any such distribution, and is not    *"
-                   print "*        removed from any of its header files. Mention of ncurses in any   *"
-                   print "*        applications linked with it is highly appreciated.                *"
-                   print "*                                                                          *"
-                   print "*        ncurses comes AS IS with no warranty, implied or expressed.       *"
-                   print "*                                                                          *"
-                   print "***************************************************************************/"
-                   print ""
-                   print "/* $Id: MKterm.h.awk.in,v 1.17 1997/02/08 21:20:22 tom Exp $ */"
+                   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 "**   term.h -- Definition of struct term"
@@ -33,6 +45,10 @@ BEGIN                {
                    print "#undef  NCURSES_VERSION"
                    print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
                    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 "/* 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 " */"
@@ -53,6 +69,9 @@ BEGIN         {
                    print "#define BROKEN_LINKER 0/*default*/"
                    print "#endif"
                    print ""
                    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 ""
                    print "/* Assume Posix termio if we have the header and function */"
                    print "#if HAVE_TERMIOS_H && HAVE_TCGETATTR"
@@ -158,15 +177,12 @@ END               {
                        print "    short        Filedes;        /* file description being written to */"
                        print "    TTY          Ottyb,          /* original state of the terminal */"
                        print "                 Nttyb;          /* current state of the terminal */"
                        print "    short        Filedes;        /* file description being written to */"
                        print "    TTY          Ottyb,          /* original state of the terminal */"
                        print "                 Nttyb;          /* current state of the terminal */"
+                       print "    int          _baudrate;      /* used to compute padding */"
                        print "} TERMINAL;"
                        print ""
                        print "extern TERMINAL  *cur_term;"
                        print ""
                        print ""
                        print "} TERMINAL;"
                        print ""
                        print "extern TERMINAL  *cur_term;"
                        print ""
                        print ""
-                       print "#ifdef __cplusplus"
-                       print "extern \"C\" {"
-                       print "#endif"
-                       print ""
                        print "#if BROKEN_LINKER"
                        print "#define boolnames  _nc_boolnames()"
                        print "#define boolcodes  _nc_boolcodes()"
                        print "#if BROKEN_LINKER"
                        print "#define boolnames  _nc_boolnames()"
                        print "#define boolcodes  _nc_boolcodes()"
@@ -178,31 +194,33 @@ END               {
                        print "#define strcodes   _nc_strcodes()"
                        print "#define strfnames  _nc_strfnames()"
                        print ""
                        print "#define strcodes   _nc_strcodes()"
                        print "#define strfnames  _nc_strfnames()"
                        print ""
-                       print "extern char * const *_nc_boolnames(void);"
-                       print "extern char * const *_nc_boolcodes(void);"
-                       print "extern char * const *_nc_boolfnames(void);"
-                       print "extern char * const *_nc_numnames(void);"
-                       print "extern char * const *_nc_numcodes(void);"
-                       print "extern char * const *_nc_numfnames(void);"
-                       print "extern char * const *_nc_strnames(void);"
-                       print "extern char * const *_nc_strcodes(void);"
-                       print "extern char * const *_nc_strfnames(void);"
+                       print "extern NCURSES_CONST char * const *_nc_boolnames(void);"
+                       print "extern NCURSES_CONST char * const *_nc_boolcodes(void);"
+                       print "extern NCURSES_CONST char * const *_nc_boolfnames(void);"
+                       print "extern NCURSES_CONST char * const *_nc_numnames(void);"
+                       print "extern NCURSES_CONST char * const *_nc_numcodes(void);"
+                       print "extern NCURSES_CONST char * const *_nc_numfnames(void);"
+                       print "extern NCURSES_CONST char * const *_nc_strnames(void);"
+                       print "extern NCURSES_CONST char * const *_nc_strcodes(void);"
+                       print "extern NCURSES_CONST char * const *_nc_strfnames(void);"
                        print ""
                        print "#else"
                        print ""
                        print ""
                        print "#else"
                        print ""
-                       print "extern char *const boolnames[];"
-                       print "extern char *const boolcodes[];"
-                       print "extern char *const boolfnames[];"
-                       print "extern char *const numnames[];"
-                       print "extern char *const numcodes[];"
-                       print "extern char *const numfnames[];"
-                       print "extern char *const strnames[];"
-                       print "extern char *const strcodes[];"
-                       print "extern char *const strfnames[];"
+                       print "extern NCURSES_CONST char *const boolnames[];"
+                       print "extern NCURSES_CONST char *const boolcodes[];"
+                       print "extern NCURSES_CONST char *const boolfnames[];"
+                       print "extern NCURSES_CONST char *const numnames[];"
+                       print "extern NCURSES_CONST char *const numcodes[];"
+                       print "extern NCURSES_CONST char *const numfnames[];"
+                       print "extern NCURSES_CONST char *const strnames[];"
+                       print "extern NCURSES_CONST char *const strcodes[];"
+                       print "extern NCURSES_CONST char *const strfnames[];"
                        print ""
                        print "#endif"
                        print ""
                        print "/* internals */"
                        print ""
                        print "#endif"
                        print ""
                        print "/* internals */"
+                       print "extern int _nc_set_curterm(TTY *buf);"
+                       print "extern int _nc_get_curterm(TTY *buf);"
                        print "extern int _nc_read_entry(const char * const, char * const, TERMTYPE *const);"
                        print "extern int _nc_read_file_entry(const char *const, TERMTYPE *);"
                        print "extern char *_nc_first_name(const char *const);"
                        print "extern int _nc_read_entry(const char * const, char * const, TERMTYPE *const);"
                        print "extern int _nc_read_file_entry(const char *const, TERMTYPE *);"
                        print "extern char *_nc_first_name(const char *const);"
@@ -214,20 +232,24 @@ END               {
                        print "extern TERMINAL *set_curterm(TERMINAL *);"
                        print "extern int del_curterm(TERMINAL *);"
                        print  ""
                        print "extern TERMINAL *set_curterm(TERMINAL *);"
                        print "extern int del_curterm(TERMINAL *);"
                        print  ""
-                       print "/* entry points */"
+                       print "/* miscellaneous entry points */"
                        print "extern int putp(const char *);"
                        print "extern int restartterm(const char *, int, int *);"
                        print "extern int setupterm(const char *,int,int *);"
                        print "extern int putp(const char *);"
                        print "extern int restartterm(const char *, int, int *);"
                        print "extern int setupterm(const char *,int,int *);"
+                       print "extern int tputs(const char *, int, int (*)(int));"
+                       print  ""
+                       print "/* terminfo entry points */"
+                       print "extern int tigetflag(const char *);"
+                       print "extern int tigetnum(const char *);"
+                       print "extern char *tigetstr(const char *);"
+                       print "extern char *tparm(const char *, ...);"
+                       print ""
+                       print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
                        print "extern int tgetent(char *, const char *);"
                        print "extern int tgetflag(const char *);"
                        print "extern int tgetnum(const char *);"
                        print "extern char *tgetstr(const char *, char **);"
                        print "extern char *tgoto(const char *, int, int);"
                        print "extern int tgetent(char *, const char *);"
                        print "extern int tgetflag(const char *);"
                        print "extern int tgetnum(const char *);"
                        print "extern char *tgetstr(const char *, char **);"
                        print "extern char *tgoto(const char *, int, int);"
-                       print "extern int tigetflag(const char *);"
-                       print "extern int tigetnum(const char *);"
-                       print "extern char *tigetstr(const char *);"
-                       print "extern char *tparm(const char *, ...);"
-                       print "extern int tputs(const char *, int, int (*)(int));"
                        print ""
                        print "#ifdef __cplusplus"
                        print "}"
                        print ""
                        print "#ifdef __cplusplus"
                        print "}"