X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2FMKterm.h.awk.in;h=a030c2510fd075395751dbf4596adb346c14085c;hp=51ffbc3d9ed64fab071fb7f294c62e5e017df7e3;hb=3eda6f30a84d53844d2ebceadb457e2e7e9cfbf3;hpb=bd75bb126bdbd8300fe73e8e8b2fe97bd07eef75 diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index 51ffbc3d..a030c251 100644 --- a/include/MKterm.h.awk.in +++ b/include/MKterm.h.awk.in @@ -1,7 +1,7 @@ # vile:awkmode BEGIN { print "/****************************************************************************" - print " * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *" + print " * Copyright (c) 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 *" @@ -34,7 +34,7 @@ BEGIN { print "/* and: Thomas E. Dickey 1995-on */" print "/****************************************************************************/" print "" - print "/* $Id: MKterm.h.awk.in,v 1.60 2011/06/25 20:51:00 tom Exp $ */" + print "/* $Id: MKterm.h.awk.in,v 1.65 2017/03/18 20:05:53 tom Exp $ */" print "" print "/*" print "** term.h -- Definition of struct term" @@ -62,6 +62,12 @@ BEGIN { print "#undef NCURSES_SBOOL" print "#define NCURSES_SBOOL @NCURSES_SBOOL@" print "" + print "#undef NCURSES_USE_DATABASE" + print "#define NCURSES_USE_DATABASE @NCURSES_USE_DATABASE@" + print "" + print "#undef NCURSES_USE_TERMCAP" + print "#define NCURSES_USE_TERMCAP @NCURSES_USE_TERMCAP@" + print "" print "#undef NCURSES_XNAMES" print "#define NCURSES_XNAMES @NCURSES_XNAMES@" print "" @@ -118,7 +124,8 @@ BEGIN { print "" print "#define NAMESIZE 256" print "" - print "#define CUR cur_term->type." + print "/* The cast works because TERMTYPE is the first data in TERMINAL */" + print "#define CUR ((TERMTYPE *)(cur_term))->" print "" } @@ -188,14 +195,24 @@ END { print "" print "} TERMTYPE;" print "" + print "/*" + 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 "#ifdef NCURSES_INTERNALS" 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 " Nttyb; /* current state of the terminal */" + 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() */" + print " char * _termname; /* used for termname() */" print "} TERMINAL;" + print "#else" + print "typedef struct term TERMINAL;" + print "#endif /* NCURSES_INTERNALS */" + print "" print "" print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@" print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;" @@ -241,17 +258,28 @@ END { print "" print "#endif" print "" - print "/* internals */" + print "/*" + print " * These entrypoints are used only by the ncurses utilities such as tic." + print " */" + print "#ifdef NCURSES_INTERNALS" + print "" print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);" - print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);" - print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);" print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);" + print "extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE *const);" print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, 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 "" + print "#endif /* NCURSES_INTERNALS */" + print "" + print "" + print "/*" + print " * These entrypoints are used by tack." + print " */" print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);" + print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);" print "" - print "/* entry points */" + print "/* Normal entry points */" print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);" print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);" print ""