X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=include%2FMKterm.h.awk.in;h=b6062c8b87e25478b5a27a49c7f2adea179cefcd;hb=265e45e43e9917e8b9ecc2bf9d23867a3ede2ecd;hp=ee4e2b48dc1fc35a60503963f33564bc8f2dd4ae;hpb=47d2fb4537d9ad5bb14f4810561a327930ca4280;p=ncurses.git diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index ee4e2b48..b6062c8b 100644 --- a/include/MKterm.h.awk.in +++ b/include/MKterm.h.awk.in @@ -26,7 +26,7 @@ BEGIN { lcurl = "{"; rcurl = "}"; print "/****************************************************************************" - print " * Copyright 2018-2019,2020 Thomas E. Dickey *" + print " * Copyright 2018-2020,2021 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 *" @@ -60,7 +60,7 @@ BEGIN { print "/* and: Thomas E. Dickey 1995-on */" print "/****************************************************************************/" print "" - print "/* $Id: MKterm.h.awk.in,v 1.74 2020/02/02 23:34:34 tom Exp $ */" + print "/* $Id: MKterm.h.awk.in,v 1.79 2021/03/20 16:08:03 tom Exp $ */" print "" print "/*" print "** term.h -- Definition of struct term" @@ -82,6 +82,24 @@ BEGIN { print " * definition (based on the system for which this was configured)." print " */" print "" + print "#ifndef __NCURSES_H" + print "" + print "typedef struct screen SCREEN;" + print "" + print "#if @NCURSES_SP_FUNCS@" + print "#undef NCURSES_SP_FUNCS" + print "#define NCURSES_SP_FUNCS @NCURSES_PATCH@" + print "#undef NCURSES_SP_NAME" + print "#define NCURSES_SP_NAME(name) name##_sp" + print "" + print "/* Define the sp-funcs helper function */" + print "#undef NCURSES_SP_OUTC" + print "#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)" + print "typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);" + print "#endif" + print "" + print "#endif /* __NCURSES_H */" + print "" print "#undef NCURSES_CONST" print "#define NCURSES_CONST @NCURSES_CONST@" print "" @@ -127,9 +145,14 @@ BEGIN { print "" print "#else /* !HAVE_TERMIO_H */" print "" - print "#if _WIN32" - print "# include " - print "# define TTY struct termios" + print "#if (defined(_WIN32) || defined(_WIN64))" + print "#if @EXP_WIN32_DRIVER@" + print "#include " + print "#define TTY struct winconmode" + print "#else" + print "#include " + print "#define TTY struct termios" + print "#endif" print "#else" print "#undef TERMIOS" print "#include " @@ -143,6 +166,9 @@ 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)" @@ -298,6 +324,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 "" @@ -330,7 +357,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 */" @@ -361,7 +387,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) */" @@ -381,7 +406,7 @@ END { print "/*" print " * Debugging features." print " */" - print "extern NCURSES_EXPORT(void) exit_terminfo(int) GCC_NORETURN;" + print "extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);" print "" print "#ifdef __cplusplus" printf "%s\n", rcurl;