/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that sets up Baud rate
first then displays the speed. */
#include <stdlib.h>
#include <termios.h>

int main() {
    struct termios termios_p;
    speed_t speed;
    
    speed = B1200;   /* set up 1200 Baud */
    cfsetospeed(&termios_p,speed);
    speed = cfgetospeed(&termios_p);
    printf("%d\n",speed);
}
