Home
last modified time | relevance | path

Searched refs:tty (Results 1 – 25 of 328) sorted by relevance

12345678910>>...14

/openbsd/usr.bin/tmux/
H A Dtty.c111 tty->fg = tty->bg = -1; in tty_init()
119 tty_resize(struct tty *tty) in tty_resize() argument
162 struct tty *tty = data; in tty_read_callback() local
187 struct tty *tty = data; in tty_timer_callback() local
237 struct tty *tty = data; in tty_write_callback() local
298 struct tty *tty = data; in tty_start_timer_callback() local
483 tty_free(struct tty *tty) in tty_free() argument
639 tty_putcode_ii(tty, TTYC_CUP, tty->cy, tty->cx); in tty_putc()
655 tty->cx = (tty->cx + width) - tty->sx; in tty_putn()
1003 __func__, c->name, c->tty.oox, c->tty.ooy, c->tty.osx, c->tty.osy, in tty_update_client_offset()
[all …]
H A Dtty-keys.c430 tty_keys_add(struct tty *tty, const char *s, key_code key) in tty_keys_add() argument
486 tty_keys_build(struct tty *tty) in tty_keys_build() argument
500 tty_keys_free(tty); in tty_keys_build()
543 tty_keys_free(struct tty *tty) in tty_keys_free() argument
660 tty_keys_next(struct tty *tty) in tty_keys_next() argument
830 evtimer_set(&tty->key_timer, tty_keys_callback, tty); in tty_keys_next()
891 struct tty *tty = data; in tty_keys_callback() local
905 tty_keys_extended_key(struct tty *tty, const char *buf, size_t len, in tty_keys_extended_key() argument
1426 tty_keys_extended_device_attributes(struct tty *tty, const char *buf, in tty_keys_extended_device_attributes() argument
1546 tty->fg = n; in tty_keys_colours()
[all …]
H A Dtty-acs.c205 tty_acs_needed(struct tty *tty) in tty_acs_needed() argument
207 if (tty == NULL) in tty_acs_needed()
220 if (tty_term_has(tty->term, TTYC_U8) && in tty_acs_needed()
221 tty_term_number(tty->term, TTYC_U8) == 0) in tty_acs_needed()
224 if (tty->client->flags & CLIENT_UTF8) in tty_acs_needed()
231 tty_acs_get(struct tty *tty, u_char ch) in tty_acs_get() argument
236 if (tty_acs_needed(tty)) { in tty_acs_get()
237 if (tty->term->acs[ch][0] == '\0') in tty_acs_get()
239 return (&tty->term->acs[ch][0]); in tty_acs_get()
252 tty_acs_reverse_get(__unused struct tty *tty, const char *s, size_t slen) in tty_acs_reverse_get() argument
H A Dcmd-display-menu.c99 struct tty *tty = &tc->tty; in cmd_display_menu_get_position() local
120 if (w > tty->sx || h > tty->sy) in cmd_display_menu_get_position()
187 if (n >= tty->sy) in cmd_display_menu_get_position()
220 if (n >= tty->sy) in cmd_display_menu_get_position()
392 struct tty *tty = &tc->tty; in cmd_display_popup_exec() local
412 h = tty->sy / 2; in cmd_display_popup_exec()
414 h = args_percentage(args, 'h', 1, tty->sy, tty->sy, &cause); in cmd_display_popup_exec()
422 w = tty->sx / 2; in cmd_display_popup_exec()
424 w = args_percentage(args, 'w', 1, tty->sx, tty->sx, &cause); in cmd_display_popup_exec()
433 w = tty->sx; in cmd_display_popup_exec()
[all …]
H A Dcmd-display-panes.c63 struct tty *tty = &c->tty; in cmd_display_panes_draw_pane() local
151 tty_putn(tty, buf, len, len); in cmd_display_panes_draw_pane()
152 tty_putn(tty, " ", 1, 1); in cmd_display_panes_draw_pane()
153 tty_putn(tty, lbuf, llen, llen); in cmd_display_panes_draw_pane()
156 tty_putn(tty, buf, len, len); in cmd_display_panes_draw_pane()
172 tty_cursor(tty, xoff + i, yoff + py + j); in cmd_display_panes_draw_pane()
174 tty_putc(tty, ' '); in cmd_display_panes_draw_pane()
184 tty_cursor(tty, xoff + sx - rlen, yoff); in cmd_display_panes_draw_pane()
185 tty_putn(tty, rbuf, rlen, rlen); in cmd_display_panes_draw_pane()
190 tty_putn(tty, lbuf, llen, llen); in cmd_display_panes_draw_pane()
[all …]
H A Dscreen-redraw.c443 struct tty *tty = &c->tty; in screen_redraw_draw_pane_status() local
495 tty_cursor(tty, 0, 0); in screen_redraw_draw_pane_status()
580 tty_sync_start(&c->tty); in screen_redraw_screen()
581 tty_update_mode(&c->tty, c->tty.mode, NULL); in screen_redraw_screen()
603 tty_reset(&c->tty); in screen_redraw_screen()
617 tty_update_mode(&c->tty, c->tty.mode, NULL); in screen_redraw_pane()
621 tty_reset(&c->tty); in screen_redraw_pane()
658 struct tty *tty = &c->tty; in screen_redraw_draw_borders_cell() local
710 tty_cursor(tty, i, j); in screen_redraw_draw_borders_cell()
789 struct tty *tty = &c->tty; in screen_redraw_draw_status() local
[all …]
/openbsd/sys/sys/
H A Dtty.h102 struct tty { struct
122 void (*t_oproc)(struct tty *); argument
276 int ttstart(struct tty *tp);
278 void ttwakeup(struct tty *tp);
282 int ttyclose(struct tty *tp);
284 void ttyinfo(struct tty *tp);
290 void ttypend(struct tty *tp);
294 int ttywait(struct tty *tp);
299 struct tty *ttymalloc(int);
300 void ttyfree(struct tty *);
[all …]
/openbsd/lib/libc/gen/
H A Dgetttyent.c43 getttynam(const char *tty) in getttynam() argument
58 static struct ttyent tty; in getttyent() local
82 tty.ty_name = p; in getttyent()
84 if (!*(tty.ty_getty = p)) in getttyent()
85 tty.ty_getty = tty.ty_type = NULL; in getttyent()
89 tty.ty_type = NULL; in getttyent()
93 tty.ty_status = 0; in getttyent()
94 tty.ty_window = NULL; in getttyent()
123 tty.ty_comment = p; in getttyent()
125 tty.ty_comment = 0; in getttyent()
[all …]
/openbsd/usr.bin/mail/
H A Dtty.c47 struct tty { struct
67 static struct tty tty; variable
95 memset(&tty, 0, sizeof(tty)); in grabh()
102 tty.keys = oldtio.c_cc; in grabh()
180 tty.buf = canonb; in readtty()
185 tty_flush(&tty); in readtty()
186 tty_reset(&tty); in readtty()
195 tty_flush(&tty); in readtty()
208 c = tty_getc(&tty); in readtty()
222 tty_putc(&tty, c); in readtty()
[all …]
/openbsd/gnu/lib/libreadline/
H A Drltty.c143 int tty; in set_winsize()
225 int tty; in get_tty_settings()
256 int tty; in set_tty_settings()
378 # define GETATTR(tty, tiop) (tcgetattr (tty, tiop)) argument
387 # define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop)) argument
476 int tty; in _get_tty_settings()
509 int tty; in get_tty_settings()
526 int tty; in _set_tty_settings()
540 int tty; in set_tty_settings()
634 int tty; local
[all …]
H A Dinput.c169 int tty; in rl_gather_tyi() local
178 tty = fileno (rl_instream); in rl_gather_tyi()
183 FD_SET (tty, &readfds); in rl_gather_tyi()
184 FD_SET (tty, &exceptfds); in rl_gather_tyi()
203 tem = fcntl (tty, F_GETFL, 0); in rl_gather_tyi()
206 chars_avail = read (tty, &input, 1); in rl_gather_tyi()
208 fcntl (tty, F_SETFL, tem); in rl_gather_tyi()
273 int tty; in _rl_input_available() local
275 tty = fileno (rl_instream); in _rl_input_available()
280 FD_SET (tty, &readfds); in _rl_input_available()
[all …]
/openbsd/usr.bin/ssh/
H A Dsshpty.c62 pty_release(const char *tty) in pty_release() argument
64 if (chown(tty, (uid_t) 0, (gid_t) 0) == -1) in pty_release()
66 if (chmod(tty, (mode_t) 0666) == -1) in pty_release()
103 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
154 if (stat(tty, &st) == -1) in pty_setowner()
155 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner()
159 if (chown(tty, pw->pw_uid, gid) == -1) { in pty_setowner()
163 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
167 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
173 if (chmod(tty, mode) == -1) { in pty_setowner()
[all …]
/openbsd/sbin/ldattach/
H A Dldattach.c113 struct termios tty; in main() local
231 tty.c_cflag &= ~CS8; in main()
232 tty.c_cflag |= CS7; in main()
234 tty.c_cflag &= ~CS7; in main()
235 tty.c_cflag |= CS8; in main()
239 tty.c_cflag |= PARENB; in main()
278 tty.c_iflag = 0; in main()
279 tty.c_lflag = 0; in main()
280 tty.c_oflag = 0; in main()
281 tty.c_cc[VMIN] = 1; in main()
[all …]
/openbsd/usr.bin/mesg/
H A Dmesg.c52 char *tty; in main() local
63 if ((tty = ttyname(STDERR_FILENO)) == NULL) in main()
66 if (unveil(tty, "rw") == -1) in main()
67 err(2, "unveil %s", tty); in main()
71 if (stat(tty, &sb) == -1) in main()
72 err(2, "%s", tty); in main()
87 if (chmod(tty, sb.st_mode | S_IWGRP) == -1) in main()
88 err(2, "%s", tty); in main()
91 if (chmod(tty, sb.st_mode & ~S_IWGRP) == -1) in main()
92 err(2, "%s", tty); in main()
/openbsd/gnu/usr.bin/perl/
H A Druntests.SH55 tty)
56 tty=Y
58 no-tty)
59 tty=N
62 if (true </dev/tty) >/dev/null 2>&1; then
63 tty=Y
65 tty=N
95 if test \$tty = Y; then
96 ./perl$_exe \$TESTFILE \$TEST_ARGS \$TEST_FILES </dev/tty
/openbsd/gnu/usr.bin/texinfo/info/
H A Dterminal.c694 int tty; in terminal_prep_terminal() local
704 tty = fileno (stdin); in terminal_prep_terminal()
708 tcgetattr (tty, &ttybuff); in terminal_prep_terminal()
712 ioctl (tty, TCGETA, &ttybuff); in terminal_prep_terminal()
748 ioctl (tty, TCSETA, &ttybuff); in terminal_prep_terminal()
753 ioctl (tty, TIOCGETP, &ttybuff); in terminal_prep_terminal()
766 ioctl (tty, TIOCLGET, &flags); in terminal_prep_terminal()
794 ioctl (tty, TIOCSETC, &temp); in terminal_prep_terminal()
809 ioctl (tty, TIOCSLTC, &temp); in terminal_prep_terminal()
824 int tty; in terminal_unprep_terminal() local
[all …]
/openbsd/usr.bin/write/
H A Dwrite.c63 char tty[PATH_MAX], *mytty, *cp; in main() local
91 search_utmp(argv[1], tty, sizeof tty, mytty, myuid); in main()
92 do_write(tty, mytty, myuid); in main()
122 utmp_chk(char *user, char *tty) in utmp_chk() argument
132 strncmp(tty, u.ut_line, sizeof(u.ut_line)) == 0) { in utmp_chk()
182 (void)strlcpy(tty, atty, ttyl); in search_utmp()
191 (void)strlcpy(tty, mytty, ttyl); in search_utmp()
197 user, tty); in search_utmp()
210 (void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty); in term_chk()
225 do_write(char *tty, char *mytty, uid_t myuid) in do_write() argument
[all …]
/openbsd/gnu/usr.bin/binutils/gdb/
H A Dinflow.c522 int tty; in new_tty() local
532 if (tty > 0) in new_tty()
545 if (tty == -1) in new_tty()
552 if (tty != 0) in new_tty()
555 dup (tty); in new_tty()
557 if (tty != 1) in new_tty()
560 dup (tty); in new_tty()
562 if (tty != 2) in new_tty()
565 dup (tty); in new_tty()
567 if (tty > 2) in new_tty()
[all …]
/openbsd/regress/usr.sbin/syslogd/
H A Dttylog.c43 char ptyname[16], *console, *username, *logfile, *tty; variable
93 if ((tty = strrchr(ptyname, '/')) == NULL) in main()
95 tty++; in main()
164 fprintf(lg, "console %s on %s\n", console, tty); in redirect()
168 strlcpy(utmp.ut_line, tty, sizeof(utmp.ut_line)); in redirect()
172 fprintf(lg, "login %s %s\n", username, tty); in redirect()
181 if (tty == NULL) in restore()
187 fprintf(lg, "console %s off\n", tty); in restore()
190 if (logout(tty) == 0) in restore()
191 errx(1, "logout %s", tty); in restore()
[all …]
/openbsd/sys/arch/powerpc64/dev/
H A Dopalcons.c38 struct tty *sc_tty;
57 void opalconsstart(struct tty *);
143 struct tty *tp; in opalconsopen()
175 struct tty *tp; in opalconsclose()
190 struct tty *tp; in opalconsread()
203 struct tty *tp; in opalconswrite()
216 struct tty *tp; in opalconsioctl()
234 opalconsstart(struct tty *tp) in opalconsstart()
252 opalconsstop(struct tty *tp, int flag) in opalconsstop()
264 struct tty *
[all …]
/openbsd/gnu/usr.bin/perl/t/op/
H A Dfiletest_t.t13 my($dev_tty, $dev_null) = qw(/dev/tty /dev/null);
18 open(my $tty, "<", $dev_tty)
25 ok(-t $tty, "'$dev_tty' is a TTY");
26 ok(-t -e $tty, "'$dev_tty' is a TTY (with -t -e)");
28 ok(-e -t $tty, "'$dev_tty' is a TTY (with -e -t)");
30 ok(-e -t -t $tty, "'$dev_tty' is a TTY (with -e -t -t)");
/openbsd/usr.bin/less/
H A Dttyin.c18 int tty; variable
33 tty = open("/dev/tty", O_RDONLY); in open_getchr()
34 if (tty == -1) in open_getchr()
35 tty = STDERR_FILENO; in open_getchr()
48 result = iread(tty, &c, sizeof (char)); in getchr()
/openbsd/sys/dev/fdt/
H A Dmvuart.c76 struct tty *sc_tty;
345 struct tty *tp; in mvuart_softint()
387 struct tty *tp; in mvuartopen()
500 struct tty *tty; in mvuartread() local
503 if (tty == NULL) in mvuartread()
506 return((*linesw[tty->t_line].l_read)(tty, uio, flag)); in mvuartread()
512 struct tty *tty; in mvuartwrite() local
515 if (tty == NULL) in mvuartwrite()
518 return((*linesw[tty->t_line].l_write)(tty, uio, flag)); in mvuartwrite()
525 struct tty *tp; in mvuartioctl()
[all …]
/openbsd/etc/
H A Dksh.kshrc49 # $TTY is the tty we logged in on,
50 # $tty is that which we are in now (might by pty)
51 tty=$(tty)
52 tty=${tty##*/}
53 TTY=${TTY:-$tty}
66 if [[ $tty != $console ]]; then
82 function ilabel { print -n "${ILS}$*${ILE}">/dev/tty; }
83 function label { print -n "${WLS}$*${WLE}">/dev/tty; }
85 alias stripe='label "$USER@$HOST ($tty) - $PWD"'
86 alias istripe='ilabel "$USER@$HOST ($tty)"'
/openbsd/lib/libkvm/
H A Dkvm_proc2.c122 struct tty tty; in kvm_proclist() local
245 tty.t_dev != (dev_t)arg) in kvm_proclist()
304 kp.p_tdev = tty.t_dev; in kvm_proclist()
305 if (tty.t_pgrp != NULL && in kvm_proclist()
306 tty.t_pgrp != process.ps_pgrp && in kvm_proclist()
310 (u_long)tty.t_pgrp); in kvm_proclist()
314 kp.p_tsess = PTRTOINT64(tty.t_session); in kvm_proclist()
398 kp.p_tdev = tty.t_dev; in kvm_proclist()
399 if (tty.t_pgrp != NULL && in kvm_proclist()
400 tty.t_pgrp != process.ps_pgrp && in kvm_proclist()
[all …]

12345678910>>...14