version 1.18, 2002/06/19 00:27:55 |
version 1.18.4.1, 2003/09/16 20:50:44 |
|
|
|
|
if (tiop == NULL) { |
if (tiop == NULL) { |
if (tcgetattr(fd, &tio) == -1) { |
if (tcgetattr(fd, &tio) == -1) { |
log("tcgetattr: %.100s", strerror(errno)); |
logit("tcgetattr: %.100s", strerror(errno)); |
goto end; |
goto end; |
} |
} |
} else |
} else |
|
|
* modes, they will initially have reasonable values. |
* modes, they will initially have reasonable values. |
*/ |
*/ |
if (tcgetattr(fd, &tio) == -1) { |
if (tcgetattr(fd, &tio) == -1) { |
log("tcgetattr: %.100s", strerror(errno)); |
logit("tcgetattr: %.100s", strerror(errno)); |
failure = -1; |
failure = -1; |
} |
} |
|
|
|
|
* left in the packet; hopefully there is nothing |
* left in the packet; hopefully there is nothing |
* more coming after the mode data. |
* more coming after the mode data. |
*/ |
*/ |
log("parse_tty_modes: unknown opcode %d", opcode); |
logit("parse_tty_modes: unknown opcode %d", opcode); |
goto set; |
goto set; |
} |
} |
} else { |
} else { |
|
|
(void) packet_get_int(); |
(void) packet_get_int(); |
break; |
break; |
} else { |
} else { |
log("parse_tty_modes: unknown opcode %d", opcode); |
logit("parse_tty_modes: unknown opcode %d", opcode); |
goto set; |
goto set; |
} |
} |
} |
} |
|
|
set: |
set: |
if (*n_bytes_ptr != n_bytes) { |
if (*n_bytes_ptr != n_bytes) { |
*n_bytes_ptr = n_bytes; |
*n_bytes_ptr = n_bytes; |
log("parse_tty_modes: n_bytes_ptr != n_bytes: %d %d", |
logit("parse_tty_modes: n_bytes_ptr != n_bytes: %d %d", |
*n_bytes_ptr, n_bytes); |
*n_bytes_ptr, n_bytes); |
return; /* Don't process bytes passed */ |
return; /* Don't process bytes passed */ |
} |
} |
|
|
|
|
/* Set the new modes for the terminal. */ |
/* Set the new modes for the terminal. */ |
if (tcsetattr(fd, TCSANOW, &tio) == -1) |
if (tcsetattr(fd, TCSANOW, &tio) == -1) |
log("Setting tty modes failed: %.100s", strerror(errno)); |
logit("Setting tty modes failed: %.100s", strerror(errno)); |
} |
} |