Back to index

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

Go to the source code of this file.

Functions

 keyok (int c, bool flag)

Function Documentation

keyok ( int  c,
bool  flag 
)

Definition at line 48 of file keyok.c.

{
    int code = ERR;
    int count = 0;
    char *s;

    T((T_CALLED("keyok(%d,%d)"), c, flag));
    if (flag) {
       while ((s = _nc_expand_try(SP->_key_ok, c, &count, 0)) != 0
              && _nc_remove_key(&(SP->_key_ok), c)) {
           _nc_add_to_try(&(SP->_keytry), s, c);
           free(s);
           code = OK;
           count = 0;
       }
    } else {
       while ((s = _nc_expand_try(SP->_keytry, c, &count, 0)) != 0
              && _nc_remove_key(&(SP->_keytry), c)) {
           _nc_add_to_try(&(SP->_key_ok), s, c);
           free(s);
           code = OK;
           count = 0;
       }
    }
    returnCode(code);
}

Here is the call graph for this function:

Here is the caller graph for this function: