… | |
… | |
1533 | rxvt_get_ttymode (struct termios *tio, int erase) |
1533 | rxvt_get_ttymode (struct termios *tio, int erase) |
1534 | { |
1534 | { |
1535 | /* |
1535 | /* |
1536 | * standard System V termios interface |
1536 | * standard System V termios interface |
1537 | */ |
1537 | */ |
|
|
1538 | // does not work as stdin is not a tty |
1538 | if (tcgetattr (STDIN_FILENO, tio) < 0) |
1539 | // if (tcgetattr (STDIN_FILENO, tio) < 0) |
|
|
1540 | if (1) |
1539 | { |
1541 | { |
1540 | // return error - use system defaults, |
1542 | // return error - use system defaults, |
1541 | // where possible, and zero elsewhere |
1543 | // where possible, and zero elsewhere |
1542 | memset (tio, 0, sizeof (struct termios)); |
1544 | memset (tio, 0, sizeof (struct termios)); |
|
|
1545 | if (VDISABLE) |
|
|
1546 | for (int i = 0; i < NCCS; i++) |
|
|
1547 | tio->c_cc[i] = VDISABLE; |
1543 | |
1548 | |
1544 | tio->c_cc[VINTR] = CINTR; |
1549 | tio->c_cc[VINTR] = CINTR; |
1545 | tio->c_cc[VQUIT] = CQUIT; |
1550 | tio->c_cc[VQUIT] = CQUIT; |
1546 | tio->c_cc[VERASE] = CERASE; |
1551 | tio->c_cc[VERASE] = CERASE; |
1547 | #ifdef VERASE2 |
1552 | #ifdef VERASE2 |
… | |
… | |
1567 | tio->c_cc[VLNEXT] = CLNEXT; |
1572 | tio->c_cc[VLNEXT] = CLNEXT; |
1568 | # endif |
1573 | # endif |
1569 | } |
1574 | } |
1570 | |
1575 | |
1571 | tio->c_cc[VEOF] = CEOF; |
1576 | tio->c_cc[VEOF] = CEOF; |
1572 | tio->c_cc[VEOL] = VDISABLE; |
|
|
1573 | # ifdef VEOL2 |
|
|
1574 | tio->c_cc[VEOL2] = VDISABLE; |
|
|
1575 | # endif |
|
|
1576 | # ifdef VSWTC |
|
|
1577 | tio->c_cc[VSWTC] = VDISABLE; |
|
|
1578 | # endif |
|
|
1579 | # ifdef VSWTCH |
|
|
1580 | tio->c_cc[VSWTCH] = VDISABLE; |
|
|
1581 | # endif |
|
|
1582 | # if VMIN != VEOF |
1577 | # if VMIN != VEOF |
1583 | tio->c_cc[VMIN] = 1; |
1578 | tio->c_cc[VMIN] = 1; |
1584 | # endif |
1579 | # endif |
1585 | # if VTIME != VEOL |
1580 | # if VTIME != VEOL |
1586 | tio->c_cc[VTIME] = 0; |
1581 | tio->c_cc[VTIME] = 0; |