Back to index

glibc  2.9
Functions
speed.c File Reference
#include <stddef.h>
#include <errno.h>
#include <termios.h>

Go to the source code of this file.

Functions

speed_t cfgetospeed (struct termios *termios_p) const
speed_t cfgetispeed (struct termios *termios_p) const
int cfsetospeed (struct termios *termios_p, speed_t speed)
 libc_hidden_def (cfsetospeed)

Function Documentation

speed_t cfgetispeed ( struct termios termios_p) const

Definition at line 34 of file speed.c.

{
  return termios_p->__ispeed;
}
speed_t cfgetospeed ( struct termios termios_p) const

Definition at line 26 of file speed.c.

{
  return termios_p->__ospeed;
}
int cfsetospeed ( struct termios termios_p,
speed_t  speed 
)

Definition at line 42 of file speed.c.

{
  if (termios_p == NULL)
    {
      __set_errno (EINVAL);
      return -1;
    }

  termios_p->__ospeed = speed;
  return 0;
}

Definition at line 55 of file speed.c.

{
  if (termios_p == NULL)
    {
      __set_errno (EINVAL);
      return -1;
    }

  termios_p->__ispeed = speed;
  return 0;
}