version 1.2, 2009/06/05 03:13:16 |
version 1.3, 2009/07/14 06:30:45 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
#include <ncurses.h> |
#include <curses.h> |
#include <string.h> |
#include <string.h> |
#include <term.h> |
#include <term.h> |
|
|
|
|
term->flags = 0; |
term->flags = 0; |
SLIST_INSERT_HEAD(&tty_terms, term, entry); |
SLIST_INSERT_HEAD(&tty_terms, term, entry); |
|
|
/* Set up ncurses terminal. */ |
/* Set up curses terminal. */ |
if (setupterm(name, fd, &error) != OK) { |
if (setupterm(name, fd, &error) != OK) { |
switch (error) { |
switch (error) { |
case 0: |
case 0: |
|
|
} |
} |
tty_term_quirks(term); |
tty_term_quirks(term); |
|
|
/* Delete ncurses data. */ |
/* Delete curses data. */ |
del_curterm(cur_term); |
del_curterm(cur_term); |
|
|
/* These are always required. */ |
/* These are always required. */ |
|
|
return (term->codes[code].value.string); |
return (term->codes[code].value.string); |
} |
} |
|
|
/* No vtparm. Fucking ncurses. */ |
/* No vtparm. Fucking curses. */ |
const char * |
const char * |
tty_term_string1(struct tty_term *term, enum tty_code_code code, int a) |
tty_term_string1(struct tty_term *term, enum tty_code_code code, int a) |
{ |
{ |