aboutsummaryrefslogtreecommitdiff
path: root/src/termios/cfgetospeed.c
blob: c28e6ebf1a4af1e81a070fe9640b4f14666f00c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define _BSD_SOURCE
#include <termios.h>
#include <sys/ioctl.h>

speed_t cfgetospeed(const struct termios *tio)
{
	return tio->c_cflag & CBAUD;
}

speed_t cfgetispeed(const struct termios *tio)
{
	return cfgetospeed(tio);
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif