/illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/ |
H A D | cbreak.c | 51 cur_term->_flags &= ~__TERM_HALF_DELAY; in cbreak() 53 cur_term->_prog.c_cc[VMIN] = 1; in cbreak() 54 cur_term->_prog.c_cc[VTIME] = 0; in cbreak() 55 cur_term->_prog.c_lflag &= ~ICANON; in cbreak() 57 return __m_return_code("cbreak", __m_tty_set(&cur_term->_prog)); in cbreak() 67 cur_term->_flags &= ~__TERM_HALF_DELAY; in nocbreak() 72 cur_term->_prog.c_cc[VEOF] = cur_term->_shell.c_cc[VEOF]; in nocbreak() 73 cur_term->_prog.c_cc[VEOL] = cur_term->_shell.c_cc[VEOL]; in nocbreak() 74 cur_term->_prog.c_lflag |= ICANON; in nocbreak() 76 return __m_return_code("nocbreak", __m_tty_set(&cur_term->_prog)); in nocbreak() [all …]
|
H A D | color.c | 64 cur_term->_color = calloc(max_colors, sizeof *cur_term->_color); in start_color() 65 if (cur_term->_color == (short (*)[3]) 0) in start_color() 70 cur_term->_pair = calloc(max_pairs, sizeof *cur_term->_pair); in start_color() 71 if (cur_term->_pair == (short (*)[2]) 0) in start_color() 77 if (cur_term->_color != (short (*)[3]) 0) in start_color() 78 free(cur_term->_color); in start_color() 99 cur_term->_color[color][0] = r; in init_color() 100 cur_term->_color[color][1] = g; in init_color() 101 cur_term->_color[color][2] = b; in init_color() 134 cur_term->_pair[pair][0] = f; in init_pair() [all …]
|
H A D | setup.c | 55 TERMINAL *cur_term; variable 92 for(j = 0; cur_term->_str[i][j]; ++j) in do_prototype() 93 if (cur_term->_str[i][j] == proto) in do_prototype() 94 cur_term->_str[i][j] = CC; in do_prototype() 272 old_term = cur_term; 274 cur_term = (TERMINAL *) calloc(1, sizeof *cur_term); 275 if (cur_term == (TERMINAL *) 0) { 280 if (isatty(cur_term->_ifd = ifd)) 281 cur_term->_flags |= __TERM_ISATTY_IN; 282 if (isatty(cur_term->_ifd = ofd)) [all …]
|
H A D | nonl.c | 56 cur_term->_prog.c_iflag |= ICRNL; in nl() 57 cur_term->_prog.c_oflag |= OPOST; in nl() 59 cur_term->_prog.c_oflag |= ONLCR; in nl() 62 if ((code = __m_tty_set(&cur_term->_prog)) == OK) in nl() 63 cur_term->_flags |= __TERM_NL_IS_CRLF; in nl() 80 cur_term->_prog.c_iflag &= ~ICRNL; in nonl() 82 cur_term->_prog.c_oflag &= ~ONLCR; in nonl() 84 cur_term->_prog.c_oflag &= ~OPOST; in nonl() 87 if ((code = __m_tty_set(&cur_term->_prog)) == OK) in nonl() 88 cur_term->_flags &= ~__TERM_NL_IS_CRLF; in nonl()
|
H A D | wgetch.c | 132 if (!(cur_term->_flags & __TERM_HALF_DELAY) 133 && (cur_term->_prog.c_cc[VMIN] != w->_vmin 134 || cur_term->_prog.c_cc[VTIME] != w->_vtime)) { 135 cur_term->_prog.c_cc[VMIN] = w->_vmin; 136 cur_term->_prog.c_cc[VTIME] = w->_vtime; 138 if (__m_tty_set(&cur_term->_prog) == ERR) 169 if (cur_term->_shell.c_cc[VERASE] != _POSIX_VDISABLE) 171 if (ch == cur_term->_shell.c_cc[VERASE]) 199 cur_term->_prog.c_cc[VMIN] = 0; 200 cur_term->_prog.c_cc[VTIME] = [all …]
|
/illumos-gate/usr/src/lib/libcurses/screen/ |
H A D | setupterm.c | 71 TERMINAL _first_term, *cur_term = &_first_term; variable 375 if ((cur_term = (TERMINAL *) in setupterm() 391 free((char *)cur_term); in setupterm() 407 cur_term = &_first_term; in setupterm() 427 (void) strncpy(cur_term->_termname, term, 14); in setupterm() 429 cur_term->_termname[14] = '\0'; in setupterm() 430 cur_term->_bools = cur_bools; in setupterm() 431 cur_term->_nums = cur_nums; in setupterm() 432 cur_term->_strs = cur_strs; in setupterm() 433 cur_term->_strtab = strtab; in setupterm() [all …]
|
H A D | reset_sh.c | 54 cur_term -> old.st_flgs |= TM_SET; in reset_shell_mode() 55 (void) ioctl(cur_term->Filedes, DIOCSETT, &cur_term -> old); in reset_shell_mode() 68 (void) ioctl(cur_term -> Filedes, TCSETAW, &SHELLTTY); in reset_shell_mode() 70 (void) ioctl(cur_term -> Filedes, TCSETSW, &SHELLTTYS); in reset_shell_mode() 72 if (cur_term -> newlmode != cur_term -> oldlmode) in reset_shell_mode() 73 (void) ioctl(cur_term -> Filedes, TIOCLSET, in reset_shell_mode() 74 &cur_term -> oldlmode); in reset_shell_mode() 79 (void) ioctl(cur_term -> Filedes, TIOCSETN, &SHELLTTY); in reset_shell_mode() 81 if (cur_term -> newlmode != cur_term -> oldlmode) in reset_shell_mode() 82 (void) ioctl(cur_term -> Filedes, TIOCLSET, in reset_shell_mode() [all …]
|
H A D | tgetch.c | 69 chtype *inputQ = cur_term->_input_queue; in tgetch() 70 char *chars_onQ = &(cur_term->_chars_on_queue); in tgetch() 80 cur_term->fl_typeahdok = TRUE; in tgetch() 84 if (cur_term->_ungotten > 0) { in tgetch() 85 cur_term->_ungotten--; in tgetch() 116 if (interpret && cur_term->funckeystarter[inp]) in tgetch() 137 if (cur_term->_delay == 0) { in _readchar() 140 (void) ioctl(cur_term->_inputfd, FIONREAD, &arg); in _readchar() 148 if (cur_term->_delay > 0) { in _readchar() 152 infd = 1 << cur_term->_inputfd; in _readchar() [all …]
|
H A D | delkey.c | 52 _KEY_MAP *kp, **kpp = cur_term->_keys, **fpp, **dpp; in delkey() 53 int mask = 0, cmp, numkeys = cur_term->_ksz; in delkey() 55 short *lkorder = &(cur_term->_lastkey_ordered), in delkey() 56 *first_macro = &(cur_term->_first_macro), in delkey() 57 *lmorder = &(cur_term->_lastmacro_ordered); in delkey() 103 if ((cur_term->_ksz -= num_deleted_keys) == 0) in delkey() 104 (void) delkeymap(cur_term); in delkey() 106 cur_term->_keys = (_KEY_MAP **) realloc((char *) in delkey() 107 cur_term->_keys, (unsigned)cur_term->_ksz); in delkey()
|
H A D | ttimeout.c | 60 if (cur_term->_inputfd < 0) in ttimeout() 66 if (cur_term->_delay == delay) in ttimeout() 71 if (cur_term->_delay < 0) in ttimeout() 75 if ((delay + cur_term->_delay) == -1) in ttimeout() 86 cur_term->_delay = delay; in ttimeout() 96 int flags = fcntl(cur_term->_inputfd, F_GETFL, 0); in _setblock() 103 (void) fcntl(cur_term->_inputfd, F_SETFL, flags); in _setblock() 117 cur_term->_fl_rawmode = 3; in _settimeout() 121 cur_term->_fl_rawmode = 1; in _settimeout()
|
H A D | chkinput.c | 116 if (!cur_term->fl_typeahdok || in _chkinput() 117 (cur_term->_chars_on_queue == INP_QSIZE) || in _chkinput() 118 (cur_term->_check_fd < 0)) { in _chkinput() 124 if ((int)cur_term->_chars_on_queue > 0) { in _chkinput() 135 if (read(cur_term->_check_fd, (char *)&c, 1) > 0) { in _chkinput() 150 cur_term->_input_queue[cur_term->_chars_on_queue++] = c; in _chkinput() 176 int i, j = cur_term->_chars_on_queue; in _print_queue() 177 chtype *inputQ = cur_term->_input_queue; in _print_queue()
|
H A D | typeahead.c | 66 int savefd = cur_term->_check_fd; in typeahead() 107 if ((cur_term->_check_fd = open("/dev/tty", O_RDONLY | in typeahead() 109 (void) fcntl(cur_term->_check_fd, F_SETFD, 1); in typeahead() 111 cur_term->_check_fd = -1; in typeahead() 114 int savefd = cur_term->_check_fd; in typeahead() 117 cur_term->_check_fd = fd; in typeahead() 119 cur_term->_check_fd = -1; in typeahead()
|
H A D | flushinp.c | 52 cur_term->Filedes, SP); in flushinp() 56 (void) ioctl(cur_term -> Filedes, TCFLSH, 0); in flushinp() 59 (void) ioctl(cur_term -> Filedes, TIOCGETP, &(PROGTTY)); in flushinp() 65 (void) ioctl(cur_term -> Filedes, TIOCSETP, &(PROGTTY)); in flushinp() 72 cur_term->_chars_on_queue = cur_term->_ungotten; in flushinp()
|
H A D | vidupdate.c | 60 bool color_terminal = (cur_term->_pairs_tbl) ? TRUE : FALSE; in vidupdate() 107 &cur_term->_cur_pair; in vidupdate() 178 int k = (cur_term->sgr_mode == oldmode) ? 1 : 2; in _change_video() 185 cur_term->sgr_faked)) != A_NORMAL) { in _change_video() 259 (turn_off != (turn_off & cur_term->check_turn_off))) { in _change_video() 267 (cur_term->turn_off_seq[i]), in _change_video() 283 (void) tputs(tparm_p0(cur_term->turn_on_seq[i]), in _change_video() 302 cur_term->sgr_mode = newmode; in _change_video() 312 _Color_pair *ptp = cur_term->_pairs_tbl; in _change_color() 314 _Color_pair *cur_pair = &cur_term->_cur_pair; in _change_color() [all …]
|
H A D | setkeymap.c | 195 int numbytes, key_size = cur_term->_ksz; in setkeymap() 197 if (cur_term->internal_keys != NULL) in setkeymap() 201 funckey = cur_term->funckeystarter; in setkeymap() 263 (char *) cur_term->_keys, (key_size * in setkeymap() 265 free(cur_term->_keys); in setkeymap() 267 (void) memcpy((char *) (cur_term->internal_keys = p), in setkeymap() 269 cur_term->_keys = key_ptrs; in setkeymap() 270 cur_term->_ksz += numkeys; in setkeymap() 275 cur_term->_lastkey_ordered = -1; in setkeymap() 276 cur_term->_lastmacro_ordered += numkeys; in setkeymap() [all …]
|
H A D | start_col.c | 72 ioctl(cur_term->Filedes, CONIOGETDATA, &con); in start_color() 79 if ((cur_term->_pairs_tbl = in start_color() 98 if ((color_tbl = (cur_term->_color_tbl = in start_color() 117 cur_term->_color_tbl = NULL; in start_color() 118 err1: free(cur_term->_pairs_tbl); in start_color() 119 cur_term->_pairs_tbl = NULL; in start_color() 164 cur_term->_cur_pair.background = 0; in start_color() 165 cur_term->_cur_pair.foreground = -1; in start_color()
|
H A D | cbreak.c | 59 if (cur_term->_fl_rawmode != 1) { in cbreak() 90 cur_term->Filedes, PROGTTYS.c_lflag); in cbreak() 94 cur_term->Filedes, PROGTTY.sg_flags); in cbreak() 97 cur_term->_fl_rawmode = 1; in cbreak() 98 cur_term->_delay = -1; in cbreak() 101 cur_term->timeout = 0; in cbreak()
|
H A D | endwin.c | 78 if (cur_term->_cursorstate != 1) in endwin() 79 _PUTS(cur_term->cursor_seq in endwin() 80 [cur_term->_cursorstate], 0); in endwin() 118 if (cur_term->_cursorstate != 1) in endwin() 160 char chars_onQ = cur_term->_chars_on_queue; in force_doupdate() 168 cur_term->_chars_on_queue = INP_QSIZE; in force_doupdate() 170 cur_term->_chars_on_queue = chars_onQ; in force_doupdate()
|
H A D | newkey.c | 60 **prev_keys = cur_term->_keys; in newkey() 61 short *numkeys = &cur_term->_ksz; in newkey() 89 short *first = &(cur_term->_first_macro); in newkey() 97 cur_term->_lastmacro_ordered++; in newkey() 101 cur_term->_keys = keys; in newkey() 107 cur_term->funckeystarter[*str] |= (macro ? _MACRO : _KEY); in newkey()
|
H A D | nocbreak.c | 62 cur_term->Filedes, PROGTTYS.c_lflag); in nocbreak() 66 cur_term->Filedes, PROGTTY.sg_flags); in nocbreak() 70 cur_term->_fl_rawmode = FALSE; in nocbreak() 71 cur_term->_delay = -1; in nocbreak() 74 cur_term->timeout = 0; in nocbreak()
|
H A D | noraw.c | 62 cur_term->Filedes, PROGTTYS.c_lflag); in noraw() 66 cur_term->Filedes, PROGTTY.sg_flags); in noraw() 70 cur_term->_fl_rawmode = FALSE; in noraw() 71 cur_term->_delay = -1; in noraw() 74 cur_term->timeout = 0; in noraw()
|
H A D | raw.c | 67 cur_term->Filedes, PROGTTYS.c_iflag, PROGTTYS.c_cflag); in raw() 71 cur_term->Filedes, PROGTTY.sg_flags); in raw() 77 cur_term->_fl_rawmode = 2; in raw() 78 cur_term->_delay = -1; in raw() 81 cur_term->timeout = 0; in raw()
|
H A D | ungetch.c | 50 int i = cur_term->_chars_on_queue, j = i - 1; in ungetch() 51 chtype *inputQ = cur_term->_input_queue; in ungetch() 71 cur_term->_ungotten++; in ungetch() 73 cur_term->_chars_on_queue++; in ungetch()
|
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/ |
H A D | color.c | 63 cur_term->_color = calloc(max_colors, in start_color() 64 sizeof (*cur_term->_color)); in start_color() 65 if (cur_term->_color == (short (*)[3]) 0) in start_color() 70 cur_term->_pair = calloc(max_pairs, sizeof (*cur_term->_pair)); in start_color() 71 if (cur_term->_pair == (short (*)[2]) 0) in start_color() 86 if (cur_term->_color != (short (*)[3]) 0) in start_color() 87 free(cur_term->_color); in start_color() 104 cur_term->_color[color][0] = r; in init_color() 105 cur_term->_color[color][1] = g; in init_color() 106 cur_term->_color[color][2] = b; in init_color() [all …]
|
H A D | setup.c | 58 TERMINAL *cur_term; variable 109 for (j = 0; cur_term->_str[i][j]; ++j) in do_prototype() 110 if (cur_term->_str[i][j] == proto) in do_prototype() 111 cur_term->_str[i][j] = *CC; in do_prototype() 305 old_term = cur_term; in __m_setupterm() 307 cur_term = (TERMINAL *) calloc(1, sizeof (*cur_term)); in __m_setupterm() 308 if (cur_term == NULL) { in __m_setupterm() 313 if (isatty(cur_term->_ifd = ifd)) in __m_setupterm() 314 cur_term->_flags |= __TERM_ISATTY_IN; in __m_setupterm() 315 if (isatty(cur_term->_ofd = ofd)) in __m_setupterm() [all …]
|