retro: only use atexit() if the termios stuff is actually used
FossilOrigin-Name: c3a374cb38a0f8805c1e7906c5595c0fecb4c5265acf7fbb72cb81f8d682e7ab
This commit is contained in:
parent
dade4cee3a
commit
34606bec09
1 changed files with 1 additions and 1 deletions
|
@ -534,8 +534,8 @@ int main(int argc, char **argv) {
|
|||
if (modes[FLAG_INTERACTIVE] == 1) {
|
||||
rre_execute(d_xt_for("banner", Dictionary), 0);
|
||||
#ifdef USE_TERMIOS
|
||||
atexit(restore_term);
|
||||
if (modes[FLAG_CBREAK] == 1) prepare_term();
|
||||
if (modes[FLAG_CBREAK] == 1) atexit(restore_term);
|
||||
#endif
|
||||
if (modes[FLAG_CBREAK] == 1) while (1) rre_execute(0, 0);
|
||||
if (modes[FLAG_CBREAK] == 0) while (1) rre_execute(0, -1);
|
||||
|
|
Loading…
Reference in a new issue