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 *"
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
- print "/* $Id: MKterm.h.awk.in,v 1.78 2020/10/31 23:14:24 tom Exp $ */"
+ print "/* $Id: MKterm.h.awk.in,v 1.82 2021/09/24 17:02:46 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
print " * The only reason these structures are visible is for read-only use."
print " * Programs which modify the data are not, never were, portable across"
print " * curses implementations."
+ print " *"
+ print " * The first field in TERMINAL is used in macros."
+ print " * The remaining fields are private."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
+ print "#undef TERMINAL"
+ print "#define TERMINAL struct term"
+ print "TERMINAL;"
+ print ""
if (@NCURSES_EXT_COLORS@) {
declare_termtype("int","2");
} else {
- print "typedef TERMTYPE TERMTYPE2;"
+ print "#undef TERMTYPE2"
+ print "#define TERMTYPE2 TERMTYPE"
}
+ print "#else"
print ""
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
- print " short Filedes; /* file description being written to */"
- print " TTY Ottyb; /* original state of the terminal */"
- print " TTY Nttyb; /* current state of the terminal */"
- print " int _baudrate; /* used to compute padding */"
- print " char * _termname; /* used for termname() */"
- if (@NCURSES_EXT_COLORS@) {
- print " TERMTYPE2 type2; /* extended terminal type description */"
- }
print "} TERMINAL;"
- print "#else"
- print "typedef struct term TERMINAL;"
+ print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
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;