Home
last modified time | relevance | path

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

12345678910>>...13

/openbsd-src/usr.bin/tmux/
H A Dtty.c1 /* $OpenBSD: tty.c,v 1.441 2025/01/12 14:20:49 nicm Exp $ */
38 static void tty_set_italics(struct tty *);
39 static int tty_try_colour(struct tty *, int, const char *);
40 static void tty_force_cursor_colour(struct tty *, int);
41 static void tty_cursor_pane(struct tty *, const struct tty_ctx *, u_int,
43 static void tty_cursor_pane_unless_wrap(struct tty *,
45 static void tty_colours(struct tty *, const struct grid_cell *);
46 static void tty_check_fg(struct tty *, struct colour_palette *,
48 static void tty_check_bg(struct tty *, struct colour_palette *,
50 static void tty_check_us(struct tty *, struc
76 tty_use_margin(tty) global() argument
78 tty_full_width(tty,ctx) global() argument
82 TTY_BLOCK_START(tty) global() argument
83 TTY_BLOCK_STOP(tty) global() argument
101 tty_init(struct tty * tty,struct client * c) tty_init() argument
119 tty_resize(struct tty * tty) tty_resize() argument
151 tty_set_size(struct tty * tty,u_int sx,u_int sy,u_int xpixel,u_int ypixel) tty_set_size() argument
162 struct tty *tty = data; tty_read_callback() local
187 struct tty *tty = data; tty_timer_callback() local
206 tty_block_maybe(struct tty * tty) tty_block_maybe() argument
237 struct tty *tty = data; tty_write_callback() local
262 tty_open(struct tty * tty,char ** cause) tty_open() argument
298 struct tty *tty = data; tty_start_timer_callback() local
308 tty_start_tty(struct tty * tty) tty_start_tty() argument
362 tty_send_requests(struct tty * tty) tty_send_requests() argument
382 tty_repeat_requests(struct tty * tty) tty_repeat_requests() argument
400 tty_stop_tty(struct tty * tty) tty_stop_tty() argument
463 tty_close(struct tty * tty) tty_close() argument
483 tty_free(struct tty * tty) tty_free() argument
489 tty_update_features(struct tty * tty) tty_update_features() argument
515 tty_raw(struct tty * tty,const char * s) tty_raw() argument
536 tty_putcode(struct tty * tty,enum tty_code_code code) tty_putcode() argument
542 tty_putcode_i(struct tty * tty,enum tty_code_code code,int a) tty_putcode_i() argument
550 tty_putcode_ii(struct tty * tty,enum tty_code_code code,int a,int b) tty_putcode_ii() argument
558 tty_putcode_iii(struct tty * tty,enum tty_code_code code,int a,int b,int c) tty_putcode_iii() argument
566 tty_putcode_s(struct tty * tty,enum tty_code_code code,const char * a) tty_putcode_s() argument
573 tty_putcode_ss(struct tty * tty,enum tty_code_code code,const char * a,const char * b) tty_putcode_ss() argument
581 tty_add(struct tty * tty,const char * buf,size_t len) tty_add() argument
601 tty_puts(struct tty * tty,const char * s) tty_puts() argument
608 tty_putc(struct tty * tty,u_char ch) tty_putc() argument
646 tty_putn(struct tty * tty,const void * buf,size_t len,u_int width) tty_putn() argument
665 tty_set_italics(struct tty * tty) tty_set_italics() argument
680 tty_set_title(struct tty * tty,const char * title) tty_set_title() argument
692 tty_set_path(struct tty * tty,const char * title) tty_set_path() argument
704 tty_force_cursor_colour(struct tty * tty,int c) tty_force_cursor_colour() argument
724 tty_update_cursor(struct tty * tty,int mode,struct screen * s) tty_update_cursor() argument
817 tty_update_mode(struct tty * tty,int mode,struct screen * s) tty_update_mode() argument
859 tty_emulate_repeat(struct tty * tty,enum tty_code_code code,enum tty_code_code code1,u_int n) tty_emulate_repeat() argument
871 tty_repeat_space(struct tty * tty,u_int n) tty_repeat_space() argument
888 tty_window_bigger(struct tty * tty) tty_window_bigger() argument
898 tty_window_offset(struct tty * tty,u_int * ox,u_int * oy,u_int * sx,u_int * sy) tty_window_offset() argument
910 tty_window_offset1(struct tty * tty,u_int * ox,u_int * oy,u_int * sx,u_int * sy) tty_window_offset1() argument
1020 tty_large_region(__unused struct tty * tty,const struct tty_ctx * ctx) tty_large_region() argument
1030 tty_fake_bce(const struct tty * tty,const struct grid_cell * gc,u_int bg) tty_fake_bce() argument
1045 tty_redraw_region(struct tty * tty,const struct tty_ctx * ctx) tty_redraw_region() argument
1066 tty_is_visible(__unused struct tty * tty,const struct tty_ctx * ctx,u_int px,u_int py,u_int nx,u_int ny) tty_is_visible() argument
1082 tty_clamp_line(struct tty * tty,const struct tty_ctx * ctx,u_int px,u_int py,u_int nx,u_int * i,u_int * x,u_int * rx,u_int * ry) tty_clamp_line() argument
1120 tty_clear_line(struct tty * tty,const struct grid_cell * defaults,u_int py,u_int px,u_int nx,u_int bg) tty_clear_line() argument
1172 tty_clear_pane_line(struct tty * tty,const struct tty_ctx * ctx,u_int py,u_int px,u_int nx,u_int bg) tty_clear_pane_line() argument
1186 tty_clamp_area(struct tty * tty,const struct tty_ctx * ctx,u_int px,u_int py,u_int nx,u_int ny,u_int * i,u_int * j,u_int * x,u_int * y,u_int * rx,u_int * ry) tty_clamp_area() argument
1248 tty_clear_area(struct tty * tty,const struct grid_cell * defaults,u_int py,u_int ny,u_int px,u_int nx,u_int bg) tty_clear_area() argument
1320 tty_clear_pane_area(struct tty * tty,const struct tty_ctx * ctx,u_int py,u_int ny,u_int px,u_int nx,u_int bg) tty_clear_pane_area() argument
1330 tty_draw_pane(struct tty * tty,const struct tty_ctx * ctx,u_int py) tty_draw_pane() argument
1349 tty_check_codeset(struct tty * tty,const struct grid_cell * gc) tty_check_codeset() argument
1384 tty_check_overlay(struct tty * tty,u_int px,u_int py) tty_check_overlay() argument
1401 tty_check_overlay_range(struct tty * tty,u_int px,u_int py,u_int nx,struct overlay_ranges * r) tty_check_overlay_range() argument
1420 tty_draw_line(struct tty * tty,struct screen * s,u_int px,u_int py,u_int nx,u_int atx,u_int aty,const struct grid_cell * defaults,struct colour_palette * palette) tty_draw_line() argument
1605 tty_sync_start(struct tty * tty) tty_sync_start() argument
1620 tty_sync_end(struct tty * tty) tty_sync_end() argument
1657 tty_write(void (* cmdfn)(struct tty *,const struct tty_ctx *),struct tty_ctx * ctx) tty_write() argument
1678 tty_cmd_insertcharacter(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_insertcharacter() argument
1701 tty_cmd_deletecharacter(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_deletecharacter() argument
1724 tty_cmd_clearcharacter(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearcharacter() argument
1733 tty_cmd_insertline(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_insertline() argument
1761 tty_cmd_deleteline(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_deleteline() argument
1789 tty_cmd_clearline(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearline() argument
1798 tty_cmd_clearendofline(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearendofline() argument
1809 tty_cmd_clearstartofline(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearstartofline() argument
1818 tty_cmd_reverseindex(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_reverseindex() argument
1852 tty_cmd_linefeed(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_linefeed() argument
1895 tty_cmd_scrollup(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_scrollup() argument
1934 tty_cmd_scrolldown(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_scrolldown() argument
1968 tty_cmd_clearendofscreen(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearendofscreen() argument
1993 tty_cmd_clearstartofscreen(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearstartofscreen() argument
2018 tty_cmd_clearscreen(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_clearscreen() argument
2037 tty_cmd_alignmenttest(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_alignmenttest() argument
2060 tty_cmd_cell(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_cell() argument
2101 tty_cmd_cells(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_cells() argument
2146 tty_cmd_setselection(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_setselection() argument
2152 tty_set_selection(struct tty * tty,const char * flags,const char * buf,size_t len) tty_set_selection() argument
2174 tty_cmd_rawstring(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_rawstring() argument
2182 tty_cmd_syncstart(struct tty * tty,const struct tty_ctx * ctx) tty_cmd_syncstart() argument
2201 tty_cell(struct tty * tty,const struct grid_cell * gc,const struct grid_cell * defaults,struct colour_palette * palette,struct hyperlinks * hl) tty_cell() argument
2235 tty_reset(struct tty * tty) tty_reset() argument
2251 tty_invalidate(struct tty * tty) tty_invalidate() argument
2277 tty_region_off(struct tty * tty) tty_region_off() argument
2284 tty_region_pane(struct tty * tty,const struct tty_ctx * ctx,u_int rupper,u_int rlower) tty_region_pane() argument
2293 tty_region(struct tty * tty,u_int rupper,u_int rlower) tty_region() argument
2322 tty_margin_off(struct tty * tty) tty_margin_off() argument
2329 tty_margin_pane(struct tty * tty,const struct tty_ctx * ctx) tty_margin_pane() argument
2337 tty_margin(struct tty * tty,u_int rleft,u_int rright) tty_margin() argument
2361 tty_cursor_pane_unless_wrap(struct tty * tty,const struct tty_ctx * ctx,u_int cx,u_int cy) tty_cursor_pane_unless_wrap() argument
2378 tty_cursor_pane(struct tty * tty,const struct tty_ctx * ctx,u_int cx,u_int cy) tty_cursor_pane() argument
2385 tty_cursor(struct tty * tty,u_int cx,u_int cy) tty_cursor() argument
2532 tty_hyperlink(struct tty * tty,const struct grid_cell * gc,struct hyperlinks * hl) tty_hyperlink() argument
2551 tty_attributes(struct tty * tty,const struct grid_cell * gc,const struct grid_cell * defaults,struct colour_palette * palette,struct hyperlinks * hl) tty_attributes() argument
2656 tty_colours(struct tty * tty,const struct grid_cell * gc) tty_colours() argument
2717 tty_check_fg(struct tty * tty,struct colour_palette * palette,struct grid_cell * gc) tty_check_fg() argument
2776 tty_check_bg(struct tty * tty,struct colour_palette * palette,struct grid_cell * gc) tty_check_bg() argument
2828 tty_check_us(__unused struct tty * tty,struct colour_palette * palette,struct grid_cell * gc) tty_check_us() argument
2849 tty_colours_fg(struct tty * tty,const struct grid_cell * gc) tty_colours_fg() argument
2881 tty_colours_bg(struct tty * tty,const struct grid_cell * gc) tty_colours_bg() argument
2913 tty_colours_us(struct tty * tty,const struct grid_cell * gc) tty_colours_us() argument
2960 tty_try_colour(struct tty * tty,int colour,const char * type) tty_try_colour() argument
3030 tty_default_attributes(struct tty * tty,const struct grid_cell * defaults,struct colour_palette * palette,u_int bg,struct hyperlinks * hl) tty_default_attributes() argument
3043 struct tty *tty = data; tty_clipboard_query_callback() local
3055 tty_clipboard_query(struct tty * tty) tty_clipboard_query() argument
[all...]
H A Dtty-keys.c1 /* $OpenBSD: tty-keys.c,v 1.185 2025/01/02 10:34:45 nicm Exp $ */
41 static void tty_keys_add(struct tty *, const char *, key_code);
45 static struct tty_key *tty_keys_find(struct tty *, const char *, size_t,
47 static int tty_keys_next1(struct tty *, const char *, size_t, key_code *,
50 static int tty_keys_extended_key(struct tty *, const char *, size_t,
52 static int tty_keys_mouse(struct tty *, const char *, size_t, size_t *,
54 static int tty_keys_clipboard(struct tty *, const char *, size_t,
56 static int tty_keys_device_attributes(struct tty *, const char *, size_t,
58 static int tty_keys_device_attributes2(struct tty *, const char *, size_t,
60 static int tty_keys_extended_device_attributes(struct tty *, cons
429 tty_keys_add(struct tty * tty,const char * s,key_code key) tty_keys_add() argument
485 tty_keys_build(struct tty * tty) tty_keys_build() argument
542 tty_keys_free(struct tty * tty) tty_keys_free() argument
562 tty_keys_find(struct tty * tty,const char * buf,size_t len,size_t * size) tty_keys_find() argument
605 tty_keys_next1(struct tty * tty,const char * buf,size_t len,key_code * key,size_t * size,int expired) tty_keys_next1() argument
659 tty_keys_next(struct tty * tty) tty_keys_next() argument
890 struct tty *tty = data; tty_keys_callback() local
904 tty_keys_extended_key(struct tty * tty,const char * buf,size_t len,size_t * size,key_code * key) tty_keys_extended_key() argument
1025 tty_keys_mouse(struct tty * tty,const char * buf,size_t len,size_t * size,struct mouse_event * m) tty_keys_mouse() argument
1169 tty_keys_clipboard(struct tty * tty,const char * buf,size_t len,size_t * size) tty_keys_clipboard() argument
1278 tty_keys_device_attributes(struct tty * tty,const char * buf,size_t len,size_t * size) tty_keys_device_attributes() argument
1358 tty_keys_device_attributes2(struct tty * tty,const char * buf,size_t len,size_t * size) tty_keys_device_attributes2() argument
1436 tty_keys_extended_device_attributes(struct tty * tty,const char * buf,size_t len,size_t * size) tty_keys_extended_device_attributes() argument
1504 tty_keys_colours(struct tty * tty,const char * buf,size_t len,size_t * size,int * fg,int * bg) tty_keys_colours() argument
[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()
163 "%u", tty->sy - lines + line); in cmd_display_menu_get_position()
171 tty->sy - lines); in cmd_display_menu_get_position()
181 n = (long)(tty->sx - 1) / 2 - w / 2; in cmd_display_menu_get_position()
186 n = (tty->sy - 1) / 2 + h / 2; in cmd_display_menu_get_position()
187 if (n >= tty in cmd_display_menu_get_position()
392 struct tty *tty = &tc->tty; cmd_display_popup_exec() local
[all...]
H A Dcmd-display-panes.c63 struct tty *tty = &c->tty; in cmd_display_panes_draw_pane() local
147 tty_attributes(tty, &fgc, &grid_default_cell, NULL, NULL); in cmd_display_panes_draw_pane()
150 tty_cursor(tty, xoff + px - len / 2, yoff + py); in cmd_display_panes_draw_pane()
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()
155 tty_cursor(tty, xoff + px - len / 2, yoff + py); in cmd_display_panes_draw_pane()
156 tty_putn(tty, buf, len, len); in cmd_display_panes_draw_pane()
164 tty_attributes(tty, &bgc, &grid_default_cell, NULL, NULL); in cmd_display_panes_draw_pane()
172 tty_cursor(tty, xoff + i, yoff + py + j); in cmd_display_panes_draw_pane()
[all …]
H A Dcmd-refresh-client.c127 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
218 tty_keys_colours(tty, split, strlen(split), &size, &wp->control_fg, in cmd_refresh_report()
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()
[all …]
H A Dscreen-redraw.c495 struct tty *tty = &c->tty; in screen_redraw_draw_pane_status()
544 tty_draw_line(tty, s, i, 0, width, x, yoff - ctx->oy, in screen_redraw_set_context()
547 tty_cursor(tty, 0, 0); in screen_redraw_set_context()
613 tty_window_offset(&c->tty, &ctx->ox, &ctx->oy, &ctx->sx, &ctx->sy); in screen_redraw_pane()
636 tty_sync_start(&c->tty); in screen_redraw_draw_borders_style()
637 tty_update_mode(&c->tty, c->tty.mode, NULL); in screen_redraw_draw_borders_style()
661 tty_reset(&c->tty); in screen_redraw_draw_borders_cell()
443 struct tty *tty = &c->tty; screen_redraw_draw_pane_status() local
658 struct tty *tty = &c->tty; screen_redraw_draw_borders_cell() local
789 struct tty *tty = &c->tty; screen_redraw_draw_status() local
811 struct tty *tty = &c->tty; screen_redraw_draw_pane() local
[all...]
/openbsd-src/sys/sys/
H A Dtty.h1 /* $OpenBSD: tty.h,v 1.44 2024/10/26 00:56:35 jsg Exp $ */
2 /* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
37 * @(#)tty.h 8.6 (Berkeley) 1/21/94
49 #define KERN_TTY_INFO 5 /* struct: tty stats */
75 #define TTY_GID 4 /* XXX evil hardcoding of tty gid */
96 * Per-tty structure.
98 * Should be split in two, into device and tty drivers.
102 struct tty { struct
103 TAILQ_ENTRY(tty) tty_link; /* Link in global tty lis
122 t_oproctty global() argument
124 t_paramtty global() argument
126 t_hwiflowtty global() argument
138 t_tvtty global() argument
[all...]
/openbsd-src/lib/libc/gen/
H A Dgetttyent.c43 getttynam(const char *tty) in getttynam() argument
49 if (!strcmp(tty, t->ty_name)) in getttynam()
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()
88 if (!*(tty.ty_type = p)) in getttyent()
89 tty.ty_type = NULL; in getttyent()
93 tty.ty_status = 0; in getttyent()
94 tty.ty_window = NULL; in getttyent()
[all …]
/openbsd-src/usr.bin/mail/
H A Dtty.c47 struct tty { struct
60 static void tty_flush(struct tty *); argument
61 static int tty_getc(struct tty *);
62 static int tty_insert(struct tty *, int, int);
63 static void tty_putc(struct tty *, int);
64 static void tty_reset(struct tty *);
65 static void tty_visc(struct tty *, int);
67 static struct tty tty; variable
95 memset(&tty, 0, sizeof(tty)); in grabh()
96 tty.fdin = fileno(stdin); in grabh()
[all …]
/openbsd-src/gnu/lib/libreadline/
H A Drltty.c142 set_winsize (tty) in set_winsize() argument
143 int tty; in set_winsize()
148 if (ioctl (tty, TIOCGWINSZ, &w) == 0)
149 (void) ioctl (tty, TIOCSWINSZ, &w);
224 get_tty_settings (tty, tiop) in get_tty_settings() argument
225 int tty; in get_tty_settings()
228 set_winsize (tty);
232 if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
237 if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0)
242 if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0)
[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()
187 result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); in rl_gather_tyi()
195 result = ioctl (tty, FIONREAD, &chars_avail); in rl_gather_tyi()
203 tem = fcntl (tty, F_GETFL, 0); in rl_gather_tyi()
205 fcntl (tty, F_SETFL, (tem | O_NDELAY)); 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()
[all …]
/openbsd-src/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()
65 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); in pty_release()
66 if (chmod(tty, (mode_t) 0666) == -1) in pty_release()
67 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); in pty_release()
73 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
103 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
105 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
135 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument
154 if (stat(tty, &st) == -1) in pty_setowner()
[all …]
/openbsd-src/sbin/ldattach/
H A Dldattach.c113 struct termios tty; in main() local
223 if (tcgetattr(fd, &tty) == -1) { in main()
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()
241 tty.c_cflag |= PARODD; in main()
243 tty.c_cflag &= ~PARODD; in main()
246 tty.c_cflag |= CSTOPB; in main()
[all …]
/openbsd-src/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-src/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-src/gnu/usr.bin/texinfo/info/
H A Dterminal.c694 int tty; in terminal_prep_terminal() local
704 tty = fileno (stdin); in terminal_prep_terminal()
707 tcgetattr (tty, &original_termios); in terminal_prep_terminal()
708 tcgetattr (tty, &ttybuff); in terminal_prep_terminal()
711 ioctl (tty, TCGETA, &original_termio); in terminal_prep_terminal()
712 ioctl (tty, TCGETA, &ttybuff); in terminal_prep_terminal()
745 tcsetattr (tty, TCSANOW, &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()
[all …]
/openbsd-src/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()
153 search_utmp(char *user, char *tty, int ttyl, char *mytty, uid_t myuid) in search_utmp() argument
182 (void)strlcpy(tty, atty, ttyl); in search_utmp()
191 (void)strlcpy(tty, mytty, ttyl); in search_utmp()
197 user, tty); in search_utmp()
205 term_chk(char *tty, int *msgsokP, time_t *atimeP, int showerror) in term_chk() argument
[all …]
/openbsd-src/gnu/usr.bin/binutils/gdb/
H A Dinflow.c522 int tty; in new_tty() local
531 tty = open ("/dev/tty", O_RDWR); in new_tty()
532 if (tty > 0) in new_tty()
537 ioctl (tty, TIOCNOTTY, 0); in new_tty()
538 close (tty); in new_tty()
544 tty = open (inferior_thisrun_terminal, O_RDWR | O_NOCTTY); 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()
[all …]
/openbsd-src/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-src/sys/arch/powerpc64/dev/
H A Dopalcons.c38 struct tty *sc_tty;
57 void opalconsstart(struct tty *);
58 int opalconsparam(struct tty *, struct termios *);
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()
[all …]
/openbsd-src/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-src/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-src/sys/dev/fdt/
H A Dmvuart.c76 struct tty *sc_tty;
101 int mvuart_param(struct tty *, struct termios *);
102 void mvuart_start(struct tty *);
247 struct tty *tp = sc->sc_tty; in mvuart_intr_tx()
261 mvuart_param(struct tty *tp, struct termios *t) in mvuart_param()
303 mvuart_start(struct tty *tp) in mvuart_start()
345 struct tty *tp; in mvuart_softint()
387 struct tty *tp; in mvuartopen()
476 struct tty *tp = sc->sc_tty; in mvuartclose()
500 struct tty *tty; in mvuartread() local
[all …]
/openbsd-src/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)"'

12345678910>>...13