Back to index

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

Go to the source code of this file.

Functions

 idlok (WINDOW *win, bool flag)
 idcok (WINDOW *win, bool flag)
 halfdelay (int t)
 nodelay (WINDOW *win, bool flag)
 notimeout (WINDOW *win, bool f)
 wtimeout (WINDOW *win, int delay)
 keypad (WINDOW *win, bool flag)
 meta (WINDOW *win GCC_UNUSED, bool flag)
 curs_set (int vis)
 typeahead (int fd)
 _nc_keypad (bool flag)

Function Documentation

_nc_keypad ( bool  flag)

Definition at line 249 of file lib_options.c.

{
    if (flag && keypad_xmit) {
       TPUTS_TRACE("keypad_xmit");
       putp(keypad_xmit);
       _nc_flush();
    } else if (!flag && keypad_local) {
       TPUTS_TRACE("keypad_local");
       putp(keypad_local);
       _nc_flush();
    }

    if (flag && SP != 0 && !SP->_tried) {
       _nc_init_keytry();
       SP->_tried = TRUE;
    }
    SP->_keypad_on = flag;
    return (OK);
}

Here is the call graph for this function:

Here is the caller graph for this function:

curs_set ( int  vis)

Definition at line 160 of file lib_options.c.

{
    int cursor = SP->_cursor;

    T((T_CALLED("curs_set(%d)"), vis));

    if (vis < 0 || vis > 2)
       returnCode(ERR);

    if (vis == cursor)
       returnCode(cursor);

    switch (vis) {
    case 2:
       if (cursor_visible) {
           TPUTS_TRACE("cursor_visible");
           putp(cursor_visible);
       } else
           returnCode(ERR);
       break;
    case 1:
       if (cursor_normal) {
           TPUTS_TRACE("cursor_normal");
           putp(cursor_normal);
       } else
           returnCode(ERR);
       break;
    case 0:
       if (cursor_invisible) {
           TPUTS_TRACE("cursor_invisible");
           putp(cursor_invisible);
       } else
           returnCode(ERR);
       break;
    }
    SP->_cursor = vis;
    _nc_flush();

    returnCode(cursor == -1 ? 1 : cursor);
}

Here is the call graph for this function:

Here is the caller graph for this function:

halfdelay ( int  t)

Definition at line 72 of file lib_options.c.

{
    T((T_CALLED("halfdelay(%d)"), t));

    if (t < 1 || t > 255 || SP == 0)
       returnCode(ERR);

    cbreak();
    SP->_cbreak = t + 1;
    returnCode(OK);
}

Here is the call graph for this function:

idcok ( WINDOW win,
bool  flag 
)

Definition at line 61 of file lib_options.c.

{
    T((T_CALLED("idcok(%p,%d)"), win, flag));

    if (win)
       _nc_idcok = win->_idcok = (flag && has_ic());

    returnVoid;
}

Here is the call graph for this function:

idlok ( WINDOW win,
bool  flag 
)

Definition at line 49 of file lib_options.c.

{
    T((T_CALLED("idlok(%p,%d)"), win, flag));

    if (win) {
       _nc_idlok = win->_idlok = (flag && (has_il() || change_scroll_region));
       returnCode(OK);
    } else
       returnCode(ERR);
}

Here is the call graph for this function:

keypad ( WINDOW win,
bool  flag 
)

Definition at line 123 of file lib_options.c.

{
    T((T_CALLED("keypad(%p,%d)"), win, flag));

    if (win) {
       win->_use_keypad = flag;
       returnCode(_nc_keypad(flag));
    } else
       returnCode(ERR);
}

Here is the call graph for this function:

Here is the caller graph for this function:

meta ( WINDOW *win  GCC_UNUSED,
bool  flag 
)

Definition at line 135 of file lib_options.c.

{
    int result = ERR;

    /* Ok, we stay relaxed and don't signal an error if win is NULL */
    T((T_CALLED("meta(%p,%d)"), win, flag));

    if (SP != 0) {
       SP->_use_meta = flag;

       if (flag && meta_on) {
           TPUTS_TRACE("meta_on");
           putp(meta_on);
       } else if (!flag && meta_off) {
           TPUTS_TRACE("meta_off");
           putp(meta_off);
       }
       result = OK;
    }
    returnCode(result);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nodelay ( WINDOW win,
bool  flag 
)

Definition at line 85 of file lib_options.c.

{
    T((T_CALLED("nodelay(%p,%d)"), win, flag));

    if (win) {
       if (flag == TRUE)
           win->_delay = 0;
       else
           win->_delay = -1;
       returnCode(OK);
    } else
       returnCode(ERR);
}
notimeout ( WINDOW win,
bool  f 
)

Definition at line 100 of file lib_options.c.

{
    T((T_CALLED("notimout(%p,%d)"), win, f));

    if (win) {
       win->_notimeout = f;
       returnCode(OK);
    } else
       returnCode(ERR);
}
typeahead ( int  fd)

Definition at line 202 of file lib_options.c.

{
    T((T_CALLED("typeahead(%d)"), fd));
    if (SP != 0) {
       SP->_checkfd = fd;
       returnCode(OK);
    } else {
       returnCode(ERR);
    }
}

Here is the caller graph for this function:

wtimeout ( WINDOW win,
int  delay 
)

Definition at line 112 of file lib_options.c.

{
    T((T_CALLED("wtimeout(%p,%d)"), win, delay));

    if (win) {
       win->_delay = delay;
    }
    returnVoid;
}