print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
- print "/* $Id: MKterm.h.awk.in,v 1.79 2021/03/20 16:08:03 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 ""