Back to index

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

Go to the source code of this file.

Functions

 tigetflag (NCURSES_CONST char *str)
 tigetnum (NCURSES_CONST char *str)
 tigetstr (NCURSES_CONST char *str)

Function Documentation

tigetflag ( NCURSES_CONST char *  str)

Definition at line 42 of file lib_ti.c.

{
    unsigned i;

    T((T_CALLED("tigetflag(%s)"), str));

    if (cur_term != 0) {
       TERMTYPE *tp = &(cur_term->type);
       for_each_boolean(i, tp) {
           const char *capname = ExtBoolname(tp, i, boolnames);
           if (!strcmp(str, capname)) {
              /* setupterm forces invalid booleans to false */
              returnCode(tp->Booleans[i]);
           }
       }
    }

    returnCode(ABSENT_BOOLEAN);
}

Here is the call graph for this function:

Here is the caller graph for this function:

tigetnum ( NCURSES_CONST char *  str)

Definition at line 63 of file lib_ti.c.

{
    unsigned i;

    T((T_CALLED("tigetnum(%s)"), str));

    if (cur_term != 0) {
       TERMTYPE *tp = &(cur_term->type);
       for_each_number(i, tp) {
           const char *capname = ExtNumname(tp, i, numnames);
           if (!strcmp(str, capname)) {
              if (!VALID_NUMERIC(tp->Numbers[i]))
                  returnCode(ABSENT_NUMERIC);
              returnCode(tp->Numbers[i]);
           }
       }
    }

    returnCode(CANCELLED_NUMERIC); /* Solaris returns a -1 instead */
}

Here is the call graph for this function:

tigetstr ( NCURSES_CONST char *  str)

Definition at line 85 of file lib_ti.c.

{
    unsigned i;

    T((T_CALLED("tigetstr(%s)"), str));

    if (cur_term != 0) {
       TERMTYPE *tp = &(cur_term->type);
       for_each_string(i, tp) {
           const char *capname = ExtStrname(tp, i, strnames);
           if (!strcmp(str, capname)) {
              /* setupterm forces cancelled strings to null */
              returnPtr(tp->Strings[i]);
           }
       }
    }

    returnPtr(CANCELLED_STRING);
}

Here is the call graph for this function:

Here is the caller graph for this function: