#include "histedit.h"
#include <termios.h>
#include <unistd.h>
Go to the source code of this file.
Classes | |
struct | TTYPerm_t |
struct | ElTTY_t |
Defines | |
#define | CONTROL(A) ((A) & 037) |
#define | ONLRET 0 |
#define | TAB3 0 |
#define | ONLCR 0 |
#define | IEXTEN 0 |
#define | ECHOCTL 0 |
#define | PARENB 0 |
#define | EXTPROC 0 |
#define | FLUSHO 0 |
#define | _POSIX_VDISABLE ((unsigned char) -1) |
#define | CINTR CONTROL('c') |
#define | CQUIT 034 |
#define | CERASE 0177 |
#define | CKILL CONTROL('u') |
#define | CEOF CONTROL('d') |
#define | CEOL _POSIX_VDISABLE |
#define | CEOL2 _POSIX_VDISABLE |
#define | CSWTCH _POSIX_VDISABLE |
#define | CDSWTCH _POSIX_VDISABLE |
#define | CERASE2 _POSIX_VDISABLE |
#define | CSTART CONTROL('q') |
#define | CSTOP CONTROL('s') |
#define | CSUSP CONTROL('z') |
#define | CDSUSP CONTROL('y') |
#define | CREPRINT CONTROL('r') |
#define | CDISCARD CONTROL('o') |
#define | CLNEXT CONTROL('v') |
#define | CWERASE CONTROL('w') |
#define | CSTATUS CONTROL('t') |
#define | CPAGE ' ' |
#define | CPGOFF CONTROL('m') |
#define | CKILL2 _POSIX_VDISABLE |
#define | CBRK 0377 |
#define | CMIN CEOF |
#define | CTIME CEOL |
#define | C_INTR 0 |
#define | C_QUIT 1 |
#define | C_ERASE 2 |
#define | C_KILL 3 |
#define | C_EOF 4 |
#define | C_EOL 5 |
#define | C_EOL2 6 |
#define | C_SWTCH 7 |
#define | C_DSWTCH 8 |
#define | C_ERASE2 9 |
#define | C_START 10 |
#define | C_STOP 11 |
#define | C_WERASE 12 |
#define | C_SUSP 13 |
#define | C_DSUSP 14 |
#define | C_REPRINT 15 |
#define | C_DISCARD 16 |
#define | C_LNEXT 17 |
#define | C_STATUS 18 |
#define | C_PAGE 19 |
#define | C_PGOFF 20 |
#define | C_KILL2 21 |
#define | C_BRK 22 |
#define | C_MIN 23 |
#define | C_TIME 24 |
#define | C_NCC 25 |
#define | C_SH(A) (1 << (A)) |
#define | EX_IO 0 |
#define | ED_IO 1 |
#define | TS_IO 2 |
#define | QU_IO 2 |
#define | NN_IO 3 |
#define | MD_INP 0 |
#define | MD_OUT 1 |
#define | MD_CTL 2 |
#define | MD_LIN 3 |
#define | MD_CHAR 4 |
#define | MD_NN 5 |
Typedefs | |
typedef unsigned char | TTYChar_t [NN_IO][C_NCC] |
Functions | |
el_protected int | tty_init (EditLine_t *) |
el_protected void | tty_end (EditLine_t *) |
el_protected int | tty_stty (EditLine_t *, int, const char **) |
el_protected int | tty_rawmode (EditLine_t *) |
el_protected int | tty_cookedmode (EditLine_t *) |
el_protected int | tty_quotemode (EditLine_t *) |
el_protected int | tty_noquotemode (EditLine_t *) |
el_protected void | tty_bind_char (EditLine_t *, int) |
el_protected int | tty_can_output (void) |
#define _POSIX_VDISABLE ((unsigned char) -1) |
#define C_DISCARD 16 |
#define C_DSUSP 14 |
#define C_DSWTCH 8 |
#define C_EOF 4 |
#define C_EOL 5 |
#define C_EOL2 6 |
#define C_ERASE 2 |
#define C_ERASE2 9 |
#define C_INTR 0 |
#define C_KILL 3 |
#define C_KILL2 21 |
#define C_LNEXT 17 |
#define C_MIN 23 |
#define C_NCC 25 |
#define C_PAGE 19 |
#define C_PGOFF 20 |
#define C_QUIT 1 |
#define C_REPRINT 15 |
#define C_START 10 |
#define C_STATUS 18 |
#define C_STOP 11 |
#define C_SUSP 13 |
#define C_SWTCH 7 |
#define C_TIME 24 |
#define C_WERASE 12 |
#define ED_IO 1 |
Definition at line 448 of file tty.h.
Referenced by read_preread(), tty_bind_char(), tty_noquotemode(), tty_rawmode(), tty_setup(), and tty_stty().
#define EX_IO 0 |
Definition at line 447 of file tty.h.
Referenced by tty_cookedmode(), tty_init(), tty_rawmode(), tty_setup(), and tty_stty().
#define IEXTEN 0 |
#define MD_CHAR 4 |
#define MD_CTL 2 |
Definition at line 455 of file tty.h.
Referenced by tty_quotemode(), tty_rawmode(), and tty_setup().
#define MD_INP 0 |
Definition at line 453 of file tty.h.
Referenced by tty_quotemode(), tty_rawmode(), and tty_setup().
#define MD_LIN 3 |
Definition at line 456 of file tty.h.
Referenced by tty_quotemode(), tty_rawmode(), and tty_setup().
#define MD_OUT 1 |
Definition at line 454 of file tty.h.
Referenced by tty_quotemode(), tty_rawmode(), and tty_setup().
#define QU_IO 2 |
Definition at line 450 of file tty.h.
Referenced by tty_noquotemode(), tty_quotemode(), tty_rawmode(), and tty_stty().
#define TS_IO 2 |
el_protected void tty_bind_char | ( | EditLine_t * | , | |
int | ||||
) |
Definition at line 787 of file tty.cxx.
References ED_IO, ElMap_t::fAlt, TTYMap_t::fBind, ElMap_t::fEmacs, ElMap_t::fKey, EditLine_t::fMap, TTYMap_t::fNCh, TTYMap_t::fOCh, EditLine_t::fTTY, ElMap_t::fType, ElMap_t::fVic, ElMap_t::fVii, if(), key_clear(), MAP_VI, NULL, and ElTTY_t::t_c.
Referenced by map_init_emacs(), map_init_vi(), and tty_rawmode().
el_protected int tty_can_output | ( | void | ) |
Definition at line 474 of file tty.cxx.
References STDOUT_FILENO.
Referenced by prompt_print(), sig_handler(), and tty_setup().
el_protected int tty_cookedmode | ( | EditLine_t * | ) |
Definition at line 1013 of file tty.cxx.
References EDIT_DISABLED, EX_IO, EditLine_t::fErrFile, EditLine_t::fFlags, fprintf(), EditLine_t::fTTY, strerror(), ElTTY_t::t_mode, tty_setty, tty_setup(), and void.
Referenced by el_reset(), readline(), and sig_handler().
el_protected void tty_end | ( | EditLine_t * | ) |
el_protected int tty_init | ( | EditLine_t * | ) |
Definition at line 590 of file tty.cxx.
References _POSIX_VDISABLE, EX_IO, EditLine_t::fTTY, ElTTY_t::t_c, ElTTY_t::t_mode, ElTTY_t::t_t, ElTTY_t::t_vdisable, tty_setup(), ttyperm, and void.
Referenced by el_init().
el_protected int tty_noquotemode | ( | EditLine_t * | ) |
Definition at line 1086 of file tty.cxx.
References ED_IO, EditLine_t::fErrFile, fprintf(), EditLine_t::fTTY, QU_IO, strerror(), ElTTY_t::t_mode, tty_setty, tty_setup(), and void.
Referenced by ed_quoted_insert(), and setEcho().
el_protected int tty_quotemode | ( | EditLine_t * | ) |
Definition at line 1045 of file tty.cxx.
References EditLine_t::fErrFile, fprintf(), EditLine_t::fTTY, MD_CTL, MD_INP, MD_LIN, MD_OUT, QU_IO, strerror(), TTYPerm_t::t_clrmask, ElTTY_t::t_mode, TTYPerm_t::t_setmask, ElTTY_t::t_t, tty_setty, tty_setup(), and void.
Referenced by ed_quoted_insert(), and setEcho().
el_protected int tty_rawmode | ( | EditLine_t * | ) |
Definition at line 835 of file tty.cxx.
References C_NCC, C_SH, ED_IO, EDIT_DISABLED, EL_CAN_TAB, EX_IO, EditLine_t::fErrFile, EditLine_t::fFlags, fprintf(), EditLine_t::fTTY, i, MD_CHAR, MD_CTL, MD_INP, MD_LIN, MD_OUT, QU_IO, strerror(), ElTTY_t::t_c, TTYPerm_t::t_clrmask, ElTTY_t::t_eight, ElTTY_t::t_mode, TTYPerm_t::t_setmask, ElTTY_t::t_speed, ElTTY_t::t_t, ElTTY_t::t_tabs, ElTTY_t::t_ts, ElTTY_t::t_vdisable, TS_IO, tty__cooked_mode, tty__getchar(), tty__geteightbit, tty__getspeed(), tty__gettabs, tty__setchar(), tty_bind_char(), tty_getty, tty_setup(), and void.
Referenced by readline(), and sig_handler().
el_protected int tty_stty | ( | EditLine_t * | , | |
int | , | |||
const char ** | ||||
) |
Definition at line 1114 of file tty.cxx.
References d, ED_IO, EX_IO, EditLine_t::fErrFile, ElCoord_t::fH, EditLine_t::fOutFile, fprintf(), ElTerm_t::fSize, EditLine_t::fTerm, EditLine_t::fTTY, i, if(), len, m, name, NULL, QU_IO, s, TTYPerm_t::t_clrmask, TTYPerm_t::t_name, TTYPerm_t::t_setmask, ElTTY_t::t_t, void, and x.
Referenced by el_builtins_init(), el_get(), and el_set().