Mercurial > emacs
comparison src/sysdep.c @ 3559:a9b886b3f976
(init_baud_rate) [HAVE_TERMIOS]: Use cfgetospeed.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 07 Jun 1993 23:57:08 +0000 |
parents | 6f05f6e83e94 |
children | 507f64624555 |
comparison
equal
deleted
inserted
replaced
3558:f7f187debe2d | 3559:a9b886b3f976 |
---|---|
237 #ifdef HAVE_TERMIOS | 237 #ifdef HAVE_TERMIOS |
238 struct termios sg; | 238 struct termios sg; |
239 | 239 |
240 sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600; | 240 sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600; |
241 tcgetattr (0, &sg); | 241 tcgetattr (0, &sg); |
242 ospeed = sg.c_cflag & CBAUD; | 242 ospeed = cfgetospeed (&sg); |
243 #else /* neither VMS nor TERMIOS */ | 243 #else /* neither VMS nor TERMIOS */ |
244 #ifdef HAVE_TERMIO | 244 #ifdef HAVE_TERMIO |
245 struct termio sg; | 245 struct termio sg; |
246 | 246 |
247 sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600; | 247 sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600; |
253 ospeed = sg.c_cflag & CBAUD; | 253 ospeed = sg.c_cflag & CBAUD; |
254 #else /* neither VMS nor TERMIOS nor TERMIO */ | 254 #else /* neither VMS nor TERMIOS nor TERMIO */ |
255 struct sgttyb sg; | 255 struct sgttyb sg; |
256 | 256 |
257 sg.sg_ospeed = B9600; | 257 sg.sg_ospeed = B9600; |
258 ioctl (0, TIOCGETP, &sg); | 258 if (ioctl (0, TIOCGETP, &sg) < 0) |
259 abort (); | |
259 ospeed = sg.sg_ospeed; | 260 ospeed = sg.sg_ospeed; |
260 #endif /* not HAVE_TERMIO */ | 261 #endif /* not HAVE_TERMIO */ |
261 #endif /* not HAVE_TERMIOS */ | 262 #endif /* not HAVE_TERMIOS */ |
262 #endif /* not VMS */ | 263 #endif /* not VMS */ |
263 } | 264 } |