Lines Matching +full:charge +full:- +full:ctrl +full:- +full:value

2  * Copyright 2019-2023,2024 Thomas E. Dickey                                *
5 * Permission is hereby granted, free of charge, to any person obtaining a *
50 /* they neglected to define struct winsize in termios.h -- it is only
129 * Mode-setting logic
134 * commonly-altered ones are defined.
149 /* control-character defaults */
151 #define CEOF CTRL('D')
154 #define CERASE CTRL('H')
160 #define CKILL CTRL('U')
163 #define CLNEXT CTRL('v')
166 #define CRPRNT CTRL('r')
169 #define CQUIT CTRL('\\')
172 #define CSTART CTRL('Q')
175 #define CSTOP CTRL('S')
178 #define CSUSP CTRL('Z')
182 #define DISABLED(val) (((_POSIX_VDISABLE != -1) \
191 #define reset_char(item, value) \ argument
192 tty_settings->c_cc[item] = CHK(tty_settings->c_cc[item], value)
315 clear_flags(tty_settings->c_iflag, (IGNBRK in reset_tty_settings()
325 set_flags(tty_settings->c_iflag, (BRKINT in reset_tty_settings()
331 clear_flags(tty_settings->c_oflag, (0 in reset_tty_settings()
345 set_flags(tty_settings->c_oflag, (OPOST in reset_tty_settings()
351 if (ioctl(fd, TIOCMGET, &modem_bits) == -1) in reset_tty_settings()
354 /* cannot check - use the behavior from tset */ in reset_tty_settings()
357 clear_flags(tty_settings->c_cflag, mask); in reset_tty_settings()
359 set_flags(tty_settings->c_cflag, (CS8 | CREAD)); in reset_tty_settings()
360 clear_flags(tty_settings->c_lflag, (ECHONL in reset_tty_settings()
366 set_flags(tty_settings->c_lflag, (ISIG in reset_tty_settings()
381 * Returns a "good" value for the erase character. This is loosely based on
418 if (DISABLED(tty_settings->c_cc[VERASE]) || my_erase >= 0) { in set_control_chars()
419 tty_settings->c_cc[VERASE] = UChar((my_erase >= 0) in set_control_chars()
424 if (DISABLED(tty_settings->c_cc[VINTR]) || my_intr >= 0) { in set_control_chars()
425 tty_settings->c_cc[VINTR] = UChar((my_intr >= 0) in set_control_chars()
430 if (DISABLED(tty_settings->c_cc[VKILL]) || my_kill >= 0) { in set_control_chars()
431 tty_settings->c_cc[VKILL] = UChar((my_kill >= 0) in set_control_chars()
448 set_flags(tty_settings->c_oflag, ONLCR); in set_conversions()
449 set_flags(tty_settings->c_iflag, ICRNL); in set_conversions()
450 set_flags(tty_settings->c_lflag, ECHO); in set_conversions()
451 set_flags(tty_settings->c_oflag, OXTABS); in set_conversions()
456 clear_flags(tty_settings->c_oflag, ONLCR); in set_conversions()
457 clear_flags(tty_settings->c_iflag, ICRNL); in set_conversions()
462 clear_flags(tty_settings->c_oflag, OXTABS); in set_conversions()
464 set_flags(tty_settings->c_lflag, (ECHOE | ECHOK)); in set_conversions()
532 old_settings->c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) { in send_init_strings()
533 old_settings->c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET); in send_init_strings()
555 need_flush |= sent_string(TIPARM_2(set_lr_margin, 0, columns - 1)); in send_init_strings()
563 columns - 1)); in send_init_strings()
572 columns - 1)); in send_init_strings()
574 for (i = 0; i < columns - 1; i++) { in send_init_strings()
596 * Tell the user if a control key has been changed from the default value.
616 newer = new_settings->c_cc[which]; in show_tty_change()
617 older = old_settings->c_cc[which]; in show_tty_change()
627 * Check 'delete' before 'backspace', since the key_backspace value in show_tty_change()
638 (void) fprintf(stderr, "control-%c (^%c).\n", UChar(newer), UChar(newer)); in show_tty_change()