diff options
author | Andreas Schwab <schwab@suse.de> | 1998-04-29 09:42:46 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 1998-04-29 09:42:46 +0000 |
commit | 1d9f9f9e64b91daee180e47644bd764821c2f7b7 (patch) | |
tree | cb90a8b82e7b36cd0cbba30fe5f060f8d617a7f6 /src/sysdep.c | |
parent | 42d65b5fc897b544c824f2a3a49895da5af486cf (diff) | |
download | emacs-1d9f9f9e64b91daee180e47644bd764821c2f7b7.tar.gz emacs-1d9f9f9e64b91daee180e47644bd764821c2f7b7.tar.bz2 emacs-1d9f9f9e64b91daee180e47644bd764821c2f7b7.zip |
(emacs_get_tty): Zero out termios structure before
getting attributes to get consistent values for holes.
(emacs_set_tty): Likewise.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r-- | src/sysdep.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index ea01f3515fc..4fad9bc1ed9 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1069,6 +1069,7 @@ emacs_get_tty (fd, settings) /* Retrieve the primary parameters - baud rate, character size, etcetera. */ #ifdef HAVE_TCATTR /* We have those nifty POSIX tcmumbleattr functions. */ + bzero (&settings->main, sizeof (settings->main)); if (tcgetattr (fd, &settings->main) < 0) return -1; @@ -1147,6 +1148,7 @@ emacs_set_tty (fd, settings, flushp) { struct termios new; + bzero (&new, sizeof (new)); /* Get the current settings, and see if they're what we asked for. */ tcgetattr (fd, &new); /* We cannot use memcmp on the whole structure here because under |