diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-01-14 13:37:49 +0100 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-01-14 13:37:49 +0100 |
| commit | c5a1e08b52b2f6c05e0116d46277904b711b6bdb (patch) | |
| tree | a6ad7350d1b1100356ca59616d22c51dd29743eb /include/MKterm.h.awk.in | |
| parent | 24fa7a5107c5b75d1c197accf0305be64bc72882 (diff) | |
Vendor import ncurses 6.6vendor/ncurses/6.6vendor/ncurses
Diffstat (limited to 'include/MKterm.h.awk.in')
| -rw-r--r-- | include/MKterm.h.awk.in | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index a93d8e86e9c1..fc42dc094460 100644 --- a/include/MKterm.h.awk.in +++ b/include/MKterm.h.awk.in @@ -26,7 +26,7 @@ BEGIN { lcurl = "{"; rcurl = "}"; print "/****************************************************************************" - print " * Copyright 2018-2021,2023 Thomas E. Dickey *" + print " * Copyright 2018-2024,2025 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.85 2023/04/23 19:15:36 tom Exp $ */" + print "/* $Id: MKterm.h.awk.in,v 1.94 2025/12/26 23:33:14 tom Exp $ */" print "" print "/*" print "** term.h -- Definition of struct term" @@ -86,6 +86,7 @@ BEGIN { print "" print "typedef struct screen SCREEN;" print "" + print "/* configured with --enable-sp-funcs? */" print "#if @NCURSES_SP_FUNCS@" print "#undef NCURSES_SP_FUNCS" print "#define NCURSES_SP_FUNCS @NCURSES_PATCH@" @@ -115,65 +116,62 @@ BEGIN { print "#undef NCURSES_XNAMES" print "#define NCURSES_XNAMES @NCURSES_XNAMES@" print "" - print "/* We will use these symbols to hide differences between" + print "/* TTY, SET_TTY and GET_TTY are used internally */" + print "#ifdef NCURSES_INTERNALS" + print "" + print "/* We 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 "#if @HAVE_TERMIOS_H@ && @HAVE_TCGETATTR@ /* #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 "#elif @HAVE_TERMIO_H@ /* HAVE_TERMIO_H */" print "" print "#undef TERMIOS" print "#define TERMIOS 1" - print "" print "#include <termio.h>" print "#define TTY struct termio" print "" - print "#else /* !HAVE_TERMIO_H */" + print "#elif (defined(_WIN32) || defined(_WIN64) || defined(__MINGW32__) || defined(__MINGW64__))" + print "" + print "#include <nc_win32.h>" + print "#define TTY ConsoleMode" + print "" + print "#elif @HAVE_SGTTY_H@ /* HAVE_SGTTY_H */" print "" - 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>" print "#include <sys/ioctl.h>" print "#define TTY struct sgttyb" - print "#endif /* MINGW32 */" - print "#endif /* HAVE_TERMIO_H */" + print "" + print "#else" + print "" + print "#error no termio/termios/sgtty found" 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 "#elif @EXP_WIN32_DRIVER@ && (defined(_WIN32) || defined(_WIN64))" + print "/* configured with --enable-exp-win32? */" + print "#elif 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 "#elif @HAVE_SGTTY_H@ /* HAVE_SGTTY_H */" print "#define GET_TTY(fd, buf) gtty(fd, buf)" print "#define SET_TTY(fd, buf) stty(fd, buf)" print "#endif" print "" + print "#endif /* NCURSES_INTERNALS */" + print "" print "#ifndef GCC_NORETURN" print "#define GCC_NORETURN /* nothing */" print "#endif" @@ -255,6 +253,7 @@ END { print "TERMINAL;" print "" if (@NCURSES_EXT_COLORS@) { + print "/* configured with --enable-ext-colors */" declare_termtype("int","2"); } else { print "#undef TERMTYPE2" @@ -268,9 +267,10 @@ END { print "" print "#endif /* NCURSES_INTERNALS */" print "" - print "" + print "/* configured with --enable-broken_linker and reentrancy disabled */" print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@" print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;" + print "/* reentrancy enabled */" print "#elif @cf_cv_enable_reentrant@" print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);" print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())" @@ -278,6 +278,7 @@ END { print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;" print "#endif" print "" + print "/* configured with --enable-broken_linker or reentrancy enabled */" print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@" print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);" print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);" @@ -348,6 +349,7 @@ END { print "extern NCURSES_EXPORT(int) tigetflag (const char *);" print "extern NCURSES_EXPORT(int) tigetnum (const char *);" print "" + print "/* configured without --disable-tparm-varargs? */" print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */" print "extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */" print "#else" @@ -380,6 +382,7 @@ END { print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);" print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);" print "" + print "/* configured without --disable-tparm-varargs? */" print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */" print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */" print "#else" |
