home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / termios / cfstspd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-08  |  350 b   |  21 lines

  1. #include <errno.h>
  2. #include <stddef.h>
  3. #include <termios.h>
  4.  
  5. int
  6. cfsetspeed (struct termios *termiosp, speed_t speed)
  7. {
  8.   /* check arguments */
  9.   if (termiosp == NULL)
  10.     {
  11.       errno = EINVAL;
  12.       return -1;
  13.     }
  14.  
  15.   /* set input and output speed */
  16.   termiosp->c_ispeed = speed;
  17.   termiosp->c_ospeed = speed;
  18.  
  19.   return 0;
  20. }
  21.