]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/MKterm.h.awk.in
ncurses 6.2 - patch 20200918
[ncurses.git] / include / MKterm.h.awk.in
index b7e2c1eb5224860b2990a33c4f48ecab6e03f6bd..a3f97c4791829409dadfbef0991caddb29d01b1a 100644 (file)
@@ -26,7 +26,8 @@ BEGIN {
        lcurl = "{";
        rcurl = "}";
        print  "/****************************************************************************"
-       print  " * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *"
+       print  " * Copyright 2018-2019,2020 Thomas E. Dickey                                *"
+       print  " * Copyright 1998-2013,2017 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            *"
@@ -59,7 +60,7 @@ BEGIN {
        print  "/*    and: Thomas E. Dickey                        1995-on                  */"
        print  "/****************************************************************************/"
        print  ""
-       print  "/* $Id: MKterm.h.awk.in,v 1.72 2019/12/14 22:31:32 tom Exp $ */"
+       print  "/* $Id: MKterm.h.awk.in,v 1.77 2020/09/05 23:08:27 tom Exp $ */"
        print  ""
        print  "/*"
        print  "**      term.h -- Definition of struct term"
@@ -126,9 +127,14 @@ BEGIN {
        print  ""
        print  "#else /* !HAVE_TERMIO_H */"
        print  ""
-       print  "#if _WIN32"
-       print  "#  include <ncurses_mingw.h>"
-       print  "#  define TTY struct termios"
+       print  "#if (defined(_WIN32) || defined(_WIN64))"
+       print  "#if @EXP_WIN32_DRIVER@"
+       print  "#include <win32_curses.h>"
+       print  "#define TTY struct winconmode"
+       print  "#else"
+       print  "#include <ncurses_mingw.h>"
+       print  "#define TTY struct termios"
+       print  "#endif"
        print  "#else"
        print  "#undef TERMIOS"
        print  "#include <sgtty.h>"
@@ -142,11 +148,18 @@ BEGIN {
        print  "#ifdef TERMIOS"
        print  "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
        print  "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
+       print  "#elif @EXP_WIN32_DRIVER@ && (defined(_WIN32) || defined(_WIN64))"
+       print  "#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)"
+       print  "#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),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  "#ifndef GCC_NORETURN"
+       print  "#define GCC_NORETURN /* nothing */"
+       print  "#endif"
+       print  ""
        print  "#define NAMESIZE 256"
        print  ""
        print  "/* The cast works because TERMTYPE is the first data in TERMINAL */"
@@ -293,6 +306,7 @@ END {
        print  "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);"
        print  "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
        print  "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
+       print  "extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);"
        print  ""
        print  "#endif /* NCURSES_INTERNALS */"
        print  ""
@@ -325,7 +339,6 @@ END {
        print  "extern NCURSES_EXPORT(char *) tparm (const char *, ...);        /* special */"
        print  "#else"
        print  "extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long);       /* special */"
-       print  "extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...);        /* special */"
        print  "#endif"
        print  ""
        print  "extern NCURSES_EXPORT(char *) tiparm (const char *, ...);               /* special */"
@@ -356,7 +369,6 @@ END {
        print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...);     /* special */"
        print  "#else"
        print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long);    /* special */"
-       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm_varargs) (SCREEN*, const char *, ...);     /* special */"
        print  "#endif"
        print  ""
        print  "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"