Back to index

glibc  2.9
Classes | Functions | Variables
cfsetspeed.c File Reference
#include <termios.h>
#include <errno.h>
#include <stddef.h>

Go to the source code of this file.


struct  speed_struct


int cfsetspeed (struct termios *termios_p, speed_t speed)


static struct speed_struct []

Class Documentation

struct speed_struct

Definition at line 23 of file cfsetspeed.c.

Class Members
speed_t internal
speed_t value

Function Documentation

int cfsetspeed ( struct termios termios_p,
speed_t  speed 

Definition at line 141 of file cfsetspeed.c.

  size_t cnt;

  for (cnt = 0; cnt < sizeof (speeds) / sizeof (speeds[0]); ++cnt)
    if (speed == speeds[cnt].internal)
       cfsetispeed (termios_p, speed);
       cfsetospeed (termios_p, speed);
       return 0;
    else if (speed == speeds[cnt].value)
       cfsetispeed (termios_p, speeds[cnt].internal);
       cfsetospeed (termios_p, speeds[cnt].internal);
       return 0;

  __set_errno (EINVAL);

  return -1;

Here is the call graph for this function:

Variable Documentation

struct speed_struct[] [static]

Definition at line 29 of file cfsetspeed.c.