aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tinfo/lib_kernel.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/ncurses/tinfo/lib_kernel.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/lib_kernel.c')
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_kernel.c72
1 files changed, 34 insertions, 38 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/lib_kernel.c b/contrib/ncurses/ncurses/tinfo/lib_kernel.c
index 3c8c88ee2aab..ab8e4db7d283 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_kernel.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_kernel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,7 +31,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-
/*
* lib_kernel.c
*
@@ -46,9 +45,9 @@
*/
#include <curses.priv.h>
-#include <term.h> /* cur_term */
+#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_kernel.c,v 1.19 1998/12/20 00:18:45 tom Exp $")
+MODULE_ID("$Id: lib_kernel.c,v 1.21 2000/12/10 02:55:07 tom Exp $")
/*
* erasechar()
@@ -57,23 +56,21 @@ MODULE_ID("$Id: lib_kernel.c,v 1.19 1998/12/20 00:18:45 tom Exp $")
*
*/
-char
+NCURSES_EXPORT(char)
erasechar(void)
{
- T((T_CALLED("erasechar()")));
+ T((T_CALLED("erasechar()")));
- if (cur_term != 0) {
+ if (cur_term != 0) {
#ifdef TERMIOS
- returnCode(cur_term->Ottyb.c_cc[VERASE]);
+ returnCode(cur_term->Ottyb.c_cc[VERASE]);
#else
- returnCode(cur_term->Ottyb.sg_erase);
+ returnCode(cur_term->Ottyb.sg_erase);
#endif
- }
- returnCode(ERR);
+ }
+ returnCode(ERR);
}
-
-
/*
* killchar()
*
@@ -81,23 +78,21 @@ erasechar(void)
*
*/
-char
+NCURSES_EXPORT(char)
killchar(void)
{
- T((T_CALLED("killchar()")));
+ T((T_CALLED("killchar()")));
- if (cur_term != 0) {
+ if (cur_term != 0) {
#ifdef TERMIOS
- returnCode(cur_term->Ottyb.c_cc[VKILL]);
+ returnCode(cur_term->Ottyb.c_cc[VKILL]);
#else
- returnCode(cur_term->Ottyb.sg_kill);
+ returnCode(cur_term->Ottyb.sg_kill);
#endif
- }
- returnCode(ERR);
+ }
+ returnCode(ERR);
}
-
-
/*
* flushinp()
*
@@ -105,26 +100,27 @@ killchar(void)
*
*/
-int flushinp(void)
+NCURSES_EXPORT(int)
+flushinp(void)
{
- T((T_CALLED("flushinp()")));
+ T((T_CALLED("flushinp()")));
- if (cur_term != 0) {
+ if (cur_term != 0) {
#ifdef TERMIOS
- tcflush(cur_term->Filedes, TCIFLUSH);
+ tcflush(cur_term->Filedes, TCIFLUSH);
#else
- errno = 0;
- do {
- ioctl(cur_term->Filedes, TIOCFLUSH, 0);
- } while
- (errno == EINTR);
+ errno = 0;
+ do {
+ ioctl(cur_term->Filedes, TIOCFLUSH, 0);
+ } while
+ (errno == EINTR);
#endif
- if (SP) {
- SP->_fifohead = -1;
- SP->_fifotail = 0;
- SP->_fifopeek = 0;
- }
- returnCode(OK);
+ if (SP) {
+ SP->_fifohead = -1;
+ SP->_fifotail = 0;
+ SP->_fifopeek = 0;
}
- returnCode(ERR);
+ returnCode(OK);
+ }
+ returnCode(ERR);
}