cfgetospeed.c\termios\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/termios/cfgetospeed.c
blob: de46a1d8a7f84332e50f0dccdda77e602e174a5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#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 (tio->c_cflag & CIBAUD) / (CIBAUD/CBAUD);
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月25日 19:59:50 +0000

AltStyle によって変換されたページ (->オリジナル) /