/openbsd/usr.bin/tmux/ |
H A D | tty.c | 110 tty->fg = tty->bg = -1; in tty_init() 118 tty_resize(struct tty *tty) in tty_resize() argument 169 struct tty *tty = data; in tty_read_callback() local 194 struct tty *tty = data; in tty_timer_callback() local 244 struct tty *tty = data; in tty_write_callback() local 305 struct tty *tty = data; in tty_start_timer_callback() local 490 tty_free(struct tty *tty) in tty_free() argument 646 tty_putcode_ii(tty, TTYC_CUP, tty->cy, tty->cx); in tty_putc() 662 tty->cx = (tty->cx + width) - tty->sx; in tty_putn() 1010 __func__, c->name, c->tty.oox, c->tty.ooy, c->tty.osx, c->tty.osy, in tty_update_client_offset() [all …]
|
H A D | tty-keys.c | 429 tty_keys_add(struct tty *tty, const char *s, key_code key) in tty_keys_add() argument 485 tty_keys_build(struct tty *tty) in tty_keys_build() argument 542 tty_keys_free(struct tty *tty) in tty_keys_free() argument 704 tty_set_size(tty, sx, sy, tty->xpixel, tty->ypixel); in tty_keys_winsz() 710 char_x = (xpixel && tty->sx) ? xpixel / tty->sx : 0; in tty_keys_winsz() 711 char_y = (ypixel && tty->sy) ? ypixel / tty->sy : 0; in tty_keys_winsz() 712 tty_set_size(tty, tty->sx, tty->sy, char_x, char_y); in tty_keys_winsz() 727 tty_keys_next(struct tty *tty) in tty_keys_next() argument 791 switch (tty_keys_colours(tty, buf, len, &size, &tty->fg, &tty->bg)) { in tty_keys_next() 940 evtimer_set(&tty->key_timer, tty_keys_callback, tty); in tty_keys_next() [all …]
|
H A D | tty-acs.c | 205 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 D | cmd-display-menu.c | 99 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 D | cmd-display-panes.c | 63 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 D | cmd-refresh-client.c | 127 tty_set_size(&tc->tty, x, y, 0, 0); in cmd_refresh_client_control_client_size() 193 tty_clipboard_query(&tc->tty); in cmd_refresh_client_clipboard() 198 cmd_refresh_report(struct tty *tty, const char *value) in cmd_refresh_report() argument 230 struct tty *tty = &tc->tty; in cmd_refresh_client_exec() local 259 tc->pan_ox = tty->oox; in cmd_refresh_client_exec() 260 tc->pan_oy = tty->ooy; in cmd_refresh_client_exec() 269 if (tc->pan_ox > w->sx - tty->osx) in cmd_refresh_client_exec() 270 tc->pan_ox = w->sx - tty->osx; in cmd_refresh_client_exec() 278 if (tc->pan_oy > w->sy - tty->osy) in cmd_refresh_client_exec() 279 tc->pan_oy = w->sy - tty->osy; in cmd_refresh_client_exec() [all …]
|
/openbsd/sys/sys/ |
H A D | tty.h | 102 struct tty { struct 122 void (*t_oproc)(struct tty *); argument 275 int ttstart(struct tty *tp); 277 void ttwakeup(struct tty *tp); 281 int ttyclose(struct tty *tp); 283 void ttyinfo(struct tty *tp); 289 void ttypend(struct tty *tp); 293 int ttywait(struct tty *tp); 298 struct tty *ttymalloc(int); 299 void ttyfree(struct tty *); [all …]
|
/openbsd/lib/libc/gen/ |
H A D | getttyent.c | 43 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 D | tty.c | 47 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 D | rltty.c | 143 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 D | input.c | 169 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 D | sshpty.c | 62 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 D | ldattach.c | 113 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 D | mesg.c | 52 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 D | runtests.SH | 55 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 D | terminal.c | 694 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 D | write.c | 63 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 D | inflow.c | 522 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 D | ttylog.c | 43 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 D | opalcons.c | 38 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 D | filetest_t.t | 13 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 D | ttyin.c | 18 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 D | mvuart.c | 76 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 D | ksh.kshrc | 49 # $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 D | kvm_proc2.c | 122 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 …]
|