Lines Matching refs:tiop

194 save_tty_chars (tiop)
195 TIOTYPE *tiop;
199 if (tiop->flags & SGTTY_SET)
201 _rl_tty_chars.t_erase = tiop->sgttyb.sg_erase;
202 _rl_tty_chars.t_kill = tiop->sgttyb.sg_kill;
205 if (tiop->flags & TCHARS_SET)
207 _rl_tty_chars.t_intr = tiop->tchars.t_intrc;
208 _rl_tty_chars.t_quit = tiop->tchars.t_quitc;
209 _rl_tty_chars.t_start = tiop->tchars.t_startc;
210 _rl_tty_chars.t_stop = tiop->tchars.t_stopc;
211 _rl_tty_chars.t_eof = tiop->tchars.t_eofc;
213 _rl_tty_chars.t_eol2 = tiop->tchars.t_brkc;
216 if (tiop->flags & LTCHARS_SET)
218 _rl_tty_chars.t_susp = tiop->ltchars.t_suspc;
219 _rl_tty_chars.t_dsusp = tiop->ltchars.t_dsuspc;
220 _rl_tty_chars.t_reprint = tiop->ltchars.t_rprntc;
221 _rl_tty_chars.t_flush = tiop->ltchars.t_flushc;
222 _rl_tty_chars.t_werase = tiop->ltchars.t_werasc;
223 _rl_tty_chars.t_lnext = tiop->ltchars.t_lnextc;
230 get_tty_settings (tty, tiop)
232 TIOTYPE *tiop;
236 tiop->flags = tiop->lflag = 0;
239 if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
241 tiop->flags |= SGTTY_SET;
244 if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0)
245 tiop->flags |= LFLAG_SET;
249 if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0)
250 tiop->flags |= TCHARS_SET;
254 if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0)
255 tiop->flags |= LTCHARS_SET;
262 set_tty_settings (tty, tiop)
264 TIOTYPE *tiop;
266 if (tiop->flags & SGTTY_SET)
268 ioctl (tty, TIOCSETN, &(tiop->sgttyb));
269 tiop->flags &= ~SGTTY_SET;
274 if (tiop->flags & LFLAG_SET)
276 ioctl (tty, TIOCLSET, &(tiop->lflag));
277 tiop->flags &= ~LFLAG_SET;
282 if (tiop->flags & TCHARS_SET)
284 ioctl (tty, TIOCSETC, &(tiop->tchars));
285 tiop->flags &= ~TCHARS_SET;
290 if (tiop->flags & LTCHARS_SET)
292 ioctl (tty, TIOCSLTC, &(tiop->ltchars));
293 tiop->flags &= ~LTCHARS_SET;
301 prepare_terminal_settings (meta_flag, oldtio, tiop)
303 TIOTYPE oldtio, *tiop;
309 tiop->sgttyb = oldtio.sgttyb;
310 tiop->lflag = oldtio.lflag;
312 tiop->tchars = oldtio.tchars;
315 tiop->ltchars = oldtio.ltchars;
317 tiop->flags = oldtio.flags;
321 tiop->sgttyb.sg_flags &= ~(ECHO | CRMOD);
322 tiop->sgttyb.sg_flags |= CBREAK;
333 tiop->sgttyb.sg_flags |= ANYP;
338 tiop->lflag |= LPASS8;
346 tiop->tchars.t_stopc = -1; /* C-s */
347 tiop->tchars.t_startc = -1; /* C-q */
360 tiop->tchars.t_quitc = -1; /* C-\ */
361 tiop->tchars.t_intrc = -1; /* C-c */
367 tiop->ltchars.t_dsuspc = -1; /* C-y */
368 tiop->ltchars.t_lnextc = -1; /* C-v */
385 # define GETATTR(tty, tiop) (tcgetattr (tty, tiop))
387 # define SETATTR(tty, tiop) (tcsetattr (tty, TCSANOW, tiop))
389 # define SETATTR(tty, tiop) (tcsetattr (tty, TCSADRAIN, tiop))
394 # define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop))
395 # define SETATTR(tty, tiop) (ioctl (tty, TCSETAW, tiop))
418 save_tty_chars (tiop)
419 TIOTYPE *tiop;
423 _rl_tty_chars.t_eof = tiop->c_cc[VEOF];
424 _rl_tty_chars.t_eol = tiop->c_cc[VEOL];
426 _rl_tty_chars.t_eol2 = tiop->c_cc[VEOL2];
428 _rl_tty_chars.t_erase = tiop->c_cc[VERASE];
430 _rl_tty_chars.t_werase = tiop->c_cc[VWERASE];
432 _rl_tty_chars.t_kill = tiop->c_cc[VKILL];
434 _rl_tty_chars.t_reprint = tiop->c_cc[VREPRINT];
436 _rl_tty_chars.t_intr = tiop->c_cc[VINTR];
437 _rl_tty_chars.t_quit = tiop->c_cc[VQUIT];
439 _rl_tty_chars.t_susp = tiop->c_cc[VSUSP];
442 _rl_tty_chars.t_dsusp = tiop->c_cc[VDSUSP];
445 _rl_tty_chars.t_start = tiop->c_cc[VSTART];
448 _rl_tty_chars.t_stop = tiop->c_cc[VSTOP];
451 _rl_tty_chars.t_lnext = tiop->c_cc[VLNEXT];
454 _rl_tty_chars.t_flush = tiop->c_cc[VDISCARD];
457 _rl_tty_chars.t_status = tiop->c_cc[VSTATUS];
485 _get_tty_settings (tty, tiop)
487 TIOTYPE *tiop;
493 ioctl_ret = GETATTR (tty, tiop);
501 if (OUTPUT_BEING_FLUSHED (tiop))
505 tiop->c_lflag &= ~FLUSHO;
518 get_tty_settings (tty, tiop)
520 TIOTYPE *tiop;
525 if (_get_tty_settings (tty, tiop) < 0)
529 setopost(tiop);
536 _set_tty_settings (tty, tiop)
538 TIOTYPE *tiop;
540 while (SETATTR (tty, tiop) < 0)
550 set_tty_settings (tty, tiop)
552 TIOTYPE *tiop;
554 if (_set_tty_settings (tty, tiop) < 0)
579 prepare_terminal_settings (meta_flag, oldtio, tiop)
581 TIOTYPE oldtio, *tiop;
585 tiop->c_lflag &= ~(ICANON | ECHO);
592 tiop->c_iflag &= ~(IXON | IXOFF | IXANY);
595 tiop->c_iflag &= ~(IXON | IXOFF);
600 if (((tiop->c_cflag & CSIZE) == CS8) || meta_flag)
601 tiop->c_iflag &= ~(ISTRIP | INPCK);
604 tiop->c_iflag &= ~(ICRNL | INLCR);
607 tiop->c_lflag &= ~ISIG;
609 tiop->c_lflag |= ISIG;
612 tiop->c_cc[VMIN] = 1;
613 tiop->c_cc[VTIME] = 0;
616 if (OUTPUT_BEING_FLUSHED (tiop))
618 tiop->c_lflag &= ~FLUSHO;
629 tiop->c_cc[VLNEXT] = _POSIX_VDISABLE;
633 tiop->c_cc[VDSUSP] = _POSIX_VDISABLE;
855 set_special_char (kmap, tiop, sc, func)
857 TIOTYPE *tiop;
891 set_special_char (kmap, tiop, sc, func)
893 TIOTYPE *tiop;
899 uc = tiop->c_cc[sc];