Mercurial > emacs
comparison src/sysdep.c @ 21843:600f19764b68
(emacs_get_tty): Zero out termios structure before
getting attributes to get consistent values for holes.
(emacs_set_tty): Likewise.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Wed, 29 Apr 1998 09:42:46 +0000 |
parents | 07999a47f2ee |
children | 0af99a2dc706 |
comparison
equal
deleted
inserted
replaced
21842:870b55420529 | 21843:600f19764b68 |
---|---|
1067 struct emacs_tty *settings; | 1067 struct emacs_tty *settings; |
1068 { | 1068 { |
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 |
1075 #else | 1076 #else |
1076 #ifdef HAVE_TERMIO | 1077 #ifdef HAVE_TERMIO |
1145 } | 1146 } |
1146 else | 1147 else |
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 |
1153 * aix386 the termios structure has some reserved field that may | 1155 * aix386 the termios structure has some reserved field that may |
1154 * not be filled in. | 1156 * not be filled in. |