X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2FMKterm.h.awk.in;h=51ffbc3d9ed64fab071fb7f294c62e5e017df7e3;hp=c0e826bf6eb25f699fec6dd793cc15877a7f5559;hb=7f0e189a3cf9bfbb89241cb41db6f2e7672f89f5;hpb=b94faec6aab7c3613c1e7d217f6df6f42d929234 diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index c0e826bf..51ffbc3d 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-2008,2009 Free Software Foundation, Inc. *" + print " * Copyright (c) 1998-2010,2011 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.53 2009/02/28 21:27:45 tom Exp $ */" + print "/* $Id: MKterm.h.awk.in,v 1.60 2011/06/25 20:51:00 tom Exp $ */" print "" print "/*" print "** term.h -- Definition of struct term" @@ -93,48 +93,17 @@ BEGIN { print "#include " print "#define TTY struct termio" print "" - print "/* Add definitions to make termio look like termios." - print " * But ifdef it, since there are some implementations" - print " * that try to do this for us in a fake ." - print " */" - print "#ifndef TCSANOW" - print "#define TCSANOW TCSETA" - print "#endif" - print "#ifndef TCSADRAIN" - print "#define TCSADRAIN TCSETAW" - print "#endif" - print "#ifndef TCSAFLUSH" - print "#define TCSAFLUSH TCSETAF" - print "#endif" - print "#ifndef tcsetattr" - print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)" - print "#endif" - print "#ifndef tcgetattr" - print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)" - print "#endif" - print "#ifndef cfgetospeed" - print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)" - print "#endif" - print "#ifndef TCIFLUSH " - print "#define TCIFLUSH 0" - print "#endif" - print "#ifndef TCOFLUSH " - print "#define TCOFLUSH 1" - print "#endif" - print "#ifndef TCIOFLUSH " - print "#define TCIOFLUSH 2" - print "#endif" - print "#ifndef tcflush" - print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)" - print "#endif" - print "" print "#else /* !HAVE_TERMIO_H */" print "" + print "#if __MINGW32__" + print "# include " + print "# define TTY struct termios" + print "#else" print "#undef TERMIOS" print "#include " print "#include " print "#define TTY struct sgttyb" - print "" + print "#endif /* MINGW32 */" print "#endif /* HAVE_TERMIO_H */" print "" print "#endif /* HAVE_TERMIOS_H */" @@ -305,6 +274,8 @@ END { print "extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */" print "#endif" print "" + print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */" + print "" print "#endif /* __NCURSES_H */" print "" print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */" @@ -317,6 +288,37 @@ END { print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));" print "#endif /* NCURSES_TERMCAP_H_incl */" print "" + print "/*" + print " * Include curses.h before term.h to enable these extensions." + print " */" + print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)" + print "" + print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);" + print "" + print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */" + print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */" + print "#else" + print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */" + print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */" + print "#endif" + print "" + print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */" + print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);" + print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);" + print "" + print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);" + print "" + print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);" + print "#endif /* NCURSES_SP_FUNCS */" + print "" print "#ifdef __cplusplus" print "}" print "#endif"