X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=include%2FMKterm.h.awk.in;h=a030c2510fd075395751dbf4596adb346c14085c;hb=5eb177874dea59107a1a2ea44f5d8f5bb99550b2;hp=c9419bc47e8fff2bbb87e15b75ee45e917188530;hpb=4e793faf6575b2297482f77b2bc3d18105c0fc76;p=ncurses.git diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index c9419bc4..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-2011,2013 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.61 2013/05/25 20:04:51 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" @@ -124,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 "" } @@ -194,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;" @@ -247,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 ""