Back to index

tetex-bin  3.0
Functions
lib_kernel.c File Reference
#include <curses.priv.h>
#include <term.h>

Go to the source code of this file.

Functions

static int _nc_vdisable (void)
 erasechar (void)
 killchar (void)
 flushinp (void)

Function Documentation

static int _nc_vdisable ( void  ) [static]

Definition at line 54 of file lib_kernel.c.

{
    int value = -1;
#if defined(_POSIX_VDISABLE) && HAVE_UNISTD_H
    value = _POSIX_VDISABLE;
#endif
#if defined(_PC_VDISABLE)
    if (value == -1) {
       value = fpathconf(0, _PC_VDISABLE);
       if (value == -1) {
           value = 0377;
       }
    }
#elif defined(VDISABLE)
    if (value == -1)
       value = VDISABLE;
#endif
    return value;
}

Here is the caller graph for this function:

erasechar ( void  )

Definition at line 82 of file lib_kernel.c.

{
    int result = ERR;
    T((T_CALLED("erasechar()")));

    if (cur_term != 0) {
#ifdef TERMIOS
       result = cur_term->Ottyb.c_cc[VERASE];
       if (result == _nc_vdisable())
           result = ERR;
#else
       result = cur_term->Ottyb.sg_erase;
#endif
    }
    returnCode(result);
}

Here is the call graph for this function:

Here is the caller graph for this function:

flushinp ( void  )

Definition at line 132 of file lib_kernel.c.

{
    T((T_CALLED("flushinp()")));

    if (cur_term != 0) {
#ifdef TERMIOS
       tcflush(cur_term->Filedes, TCIFLUSH);
#else
       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);
    }
    returnCode(ERR);
}
killchar ( void  )

Definition at line 107 of file lib_kernel.c.

{
    int result = ERR;
    T((T_CALLED("killchar()")));

    if (cur_term != 0) {
#ifdef TERMIOS
       result = cur_term->Ottyb.c_cc[VKILL];
       if (result == _nc_vdisable())
           result = ERR;
#else
       result = cur_term->Ottyb.sg_kill;
#endif
    }
    returnCode(result);
}

Here is the call graph for this function:

Here is the caller graph for this function: