/****************************************************************************
- * Copyright 2019-2020,2021 Thomas E. Dickey *
+ * Copyright 2019-2021,2023 Thomas E. Dickey *
* Copyright 2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#endif
#if NEED_PTEM_H
-/* they neglected to define struct winsize in termios.h -- it's only
+/* they neglected to define struct winsize in termios.h -- it is only
in termio.h */
#include <sys/stream.h>
#include <sys/ptem.h>
#endif
-MODULE_ID("$Id: reset_cmd.c,v 1.26 2021/06/26 19:44:08 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.29 2023/01/07 21:50:34 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
* a child program dies in raw mode.
*/
void
-reset_tty_settings(int fd, TTY * tty_settings)
+reset_tty_settings(int fd, TTY * tty_settings, int noset)
{
GET_TTY(fd, tty_settings);
#endif
reset_char(VEOF, CEOF);
reset_char(VERASE, CERASE);
+#if defined(VERASE2) && defined(CERASE2)
+ reset_char(VERASE2, CERASE2);
+#endif
#if defined(VFLUSH) && defined(CFLUSH)
reset_char(VFLUSH, CFLUSH);
#endif
);
#endif
- SET_TTY(fd, tty_settings);
+ if (!noset) {
+ SET_TTY(fd, tty_settings);
+ }
}
/*