/programs/develop/libraries/menuetlibc/src/libc/compat/termios/Makefile |
---|
0,0 → 1,4 |
THIS_SRCS = cfmakraw.c cfstspd.c |
include $(MENUET_LIBC_TOPDIR)/Make.rules |
/programs/develop/libraries/menuetlibc/src/libc/compat/termios/cfmakraw.c |
---|
0,0 → 1,25 |
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ |
#include <errno.h> |
#include <stddef.h> |
#include <termios.h> |
#include <sys/exceptn.h> |
void cfmakeraw (struct termios *termiosp) |
{ |
/* check arguments */ |
if (termiosp == NULL) |
{ |
errno = EINVAL; |
return; |
} |
termiosp->c_iflag &= ~(BRKINT|ICRNL|IGNBRK|IGNCR|INLCR|ISTRIP|PARMRK|IXON); |
#if defined (IMAXBEL) |
termiosp->c_iflag &= ~IMAXBEL; |
#endif |
termiosp->c_oflag &= ~OPOST; |
termiosp->c_lflag &= ~(ECHONL|ICANON|IEXTEN|ISIG); |
termiosp->c_cflag &= ~(CSIZE|PARENB); |
termiosp->c_cflag |= CS8; |
termiosp->c_cc[VMIN] = 1; |
termiosp->c_cc[VTIME] = 0; |
} |
/programs/develop/libraries/menuetlibc/src/libc/compat/termios/cfstspd.c |
---|
0,0 → 1,21 |
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ |
#include <errno.h> |
#include <stddef.h> |
#include <termios.h> |
int |
cfsetspeed (struct termios *termiosp, speed_t speed) |
{ |
/* check arguments */ |
if (termiosp == NULL) |
{ |
errno = EINVAL; |
return -1; |
} |
/* set input and output speed */ |
termiosp->c_ispeed = speed; |
termiosp->c_ospeed = speed; |
return 0; |
} |