Back to index

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

Go to the source code of this file.

Functions

static int find_definition (struct tries *tree, const char *str)
 key_defined (const char *str)

Function Documentation

static int find_definition ( struct tries tree,
const char *  str 
) [static]

Definition at line 38 of file key_defined.c.

{
    struct tries *ptr;
    int result = 0;

    if (str != 0 && *str != '\0') {
       for (ptr = tree; ptr != 0; ptr = ptr->sibling) {
           if (UChar(*str) == UChar(ptr->ch)) {
              if (str[1] == '\0' && ptr->child != 0) {
                  result = -1;
              } else if ((result = find_definition(ptr->child, str + 1)) == 0) {
                  result = ptr->value;
              } else if (str[1] == '\0') {
                  result = -1;
              }
           }
           if (result != 0)
              break;
       }
    }
    return (result);
}

Here is the caller graph for this function:

key_defined ( const char *  str)

Definition at line 66 of file key_defined.c.

{
    int code = ERR;

    T((T_CALLED("key_defined(%s)"), _nc_visbuf(str)));
    if (SP != 0 && str != 0) {
       code = find_definition(SP->_keytry, str);
    }

    returnCode(code);
}

Here is the call graph for this function:

Here is the caller graph for this function: