diff options
| author | Andreas Schwab | 1998-04-29 09:42:46 +0000 |
|---|---|---|
| committer | Andreas Schwab | 1998-04-29 09:42:46 +0000 |
| commit | 1d9f9f9e64b91daee180e47644bd764821c2f7b7 (patch) | |
| tree | cb90a8b82e7b36cd0cbba30fe5f060f8d617a7f6 /src | |
| parent | 42d65b5fc897b544c824f2a3a49895da5af486cf (diff) | |
| download | emacs-1d9f9f9e64b91daee180e47644bd764821c2f7b7.tar.gz 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')
| -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) | |||
| 1069 | /* Retrieve the primary parameters - baud rate, character size, etcetera. */ | 1069 | /* Retrieve the primary parameters - baud rate, character size, etcetera. */ |
| 1070 | #ifdef HAVE_TCATTR | 1070 | #ifdef HAVE_TCATTR |
| 1071 | /* We have those nifty POSIX tcmumbleattr functions. */ | 1071 | /* We have those nifty POSIX tcmumbleattr functions. */ |
| 1072 | bzero (&settings->main, sizeof (settings->main)); | ||
| 1072 | if (tcgetattr (fd, &settings->main) < 0) | 1073 | if (tcgetattr (fd, &settings->main) < 0) |
| 1073 | return -1; | 1074 | return -1; |
| 1074 | 1075 | ||
| @@ -1147,6 +1148,7 @@ emacs_set_tty (fd, settings, flushp) | |||
| 1147 | { | 1148 | { |
| 1148 | struct termios new; | 1149 | struct termios new; |
| 1149 | 1150 | ||
| 1151 | bzero (&new, sizeof (new)); | ||
| 1150 | /* Get the current settings, and see if they're what we asked for. */ | 1152 | /* Get the current settings, and see if they're what we asked for. */ |
| 1151 | tcgetattr (fd, &new); | 1153 | tcgetattr (fd, &new); |
| 1152 | /* We cannot use memcmp on the whole structure here because under | 1154 | /* We cannot use memcmp on the whole structure here because under |