Back to index

tetex-bin  3.0
Defines | Functions | Variables
lib_ttyflags.c File Reference
#include <curses.priv.h>
#include <term.h>

Go to the source code of this file.

Defines

#define tabs   0

Functions

 _nc_get_tty_mode (TTY *buf)
 _nc_set_tty_mode (TTY *buf)
 def_shell_mode (void)
 def_prog_mode (void)
 reset_prog_mode (void)
 reset_shell_mode (void)
 savetty (void)
 resetty (void)

Variables

static TTY buf

Define Documentation

#define tabs   0

Definition at line 54 of file lib_ttyflags.c.


Function Documentation

_nc_get_tty_mode ( TTY *  buf)

Definition at line 60 of file lib_ttyflags.c.

{
    if (cur_term == 0
       || GET_TTY(cur_term->Filedes, buf) != 0) {
       memset(buf, 0, sizeof(*buf));
       return (ERR);
    }
    TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
                  cur_term->Filedes, _nc_trace_ttymode(buf)));
    return (OK);
}

Here is the caller graph for this function:

_nc_set_tty_mode ( TTY *  buf)

Definition at line 73 of file lib_ttyflags.c.

{
    if (cur_term == 0
       || SET_TTY(cur_term->Filedes, buf) != 0) {
       if ((errno == ENOTTY) && (SP != 0))
           SP->_notty = TRUE;
       return (ERR);
    }
    TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
                  cur_term->Filedes, _nc_trace_ttymode(buf)));
    return (OK);
}

Here is the caller graph for this function:

Definition at line 109 of file lib_ttyflags.c.

{
    T((T_CALLED("def_prog_mode()")));

    if (_nc_get_tty_mode(&cur_term->Nttyb) != OK)
       returnCode(ERR);
#ifdef TERMIOS
    cur_term->Nttyb.c_oflag &= ~tabs;
#else
    cur_term->Nttyb.sg_flags &= ~XTABS;
#endif
    returnCode(OK);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 87 of file lib_ttyflags.c.

{
    T((T_CALLED("def_shell_mode()")));

    /*
     * Turn off the XTABS bit in the tty structure if it was on.  If XTABS
     * was on, remove the tab and backtab capabilities.
     */

    if (_nc_get_tty_mode(&cur_term->Ottyb) != OK)
       returnCode(ERR);
#ifdef TERMIOS
    if (cur_term->Ottyb.c_oflag & tabs)
       tab = back_tab = NULL;
#else
    if (cur_term->Ottyb.sg_flags & XTABS)
       tab = back_tab = NULL;
#endif
    returnCode(OK);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 124 of file lib_ttyflags.c.

{
    T((T_CALLED("reset_prog_mode()")));

    if (cur_term != 0) {
       if (_nc_set_tty_mode(&cur_term->Nttyb) == OK) {
           if (SP) {
              if (SP->_keypad_on)
                  _nc_keypad(TRUE);
              NC_BUFFERED(TRUE);
           }
           returnCode(OK);
       }
    }
    returnCode(ERR);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 142 of file lib_ttyflags.c.

{
    T((T_CALLED("reset_shell_mode()")));

    if (cur_term != 0) {
       if (SP) {
           _nc_keypad(FALSE);
           _nc_flush();
           NC_BUFFERED(FALSE);
       }
       returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
    }
    returnCode(ERR);
}

Here is the call graph for this function:

Here is the caller graph for this function:

resetty ( void  )

Definition at line 173 of file lib_ttyflags.c.

{
    T((T_CALLED("resetty()")));

    returnCode(_nc_set_tty_mode(&buf));
}

Here is the call graph for this function:

savetty ( void  )

Definition at line 165 of file lib_ttyflags.c.

{
    T((T_CALLED("savetty()")));

    returnCode(_nc_get_tty_mode(&buf));
}

Here is the call graph for this function:


Variable Documentation

TTY buf [static]

Definition at line 162 of file lib_ttyflags.c.