Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cfsetispeed(3C) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tcattribute(3C)

termio(7)

CFSPEED(3C)

NAME

cfgetospeed, cfsetospeed, cfgetispeed, cfsetispeed − tty baud rate functions

SYNOPSIS

#include <termios.h>

speed_t cfgetospeed (termios_p)
struct termios *termios_p;

int cfsetospeed (termios_p, speed)
struct termios *termios_p;
speed_t speed;

speed_t cfgetispeed (termios_p)
struct termios *termios_p;

int cfsetispeed (termios_p, speed)
struct termios *termios_p;
speed_t speed;

DESCRIPTION

These functions set and get the input and output speed codes in the termios structure referenced by termios_p.  The termios structure contains these speed codes representing input and output baud rates as well as other terminal related parameters.  Setting the parameters on a terminal file do not become effective until tcsetattr is successfully called. 

Cfgetospeed returns the output speed code from the termios structure referenced by termios_p. 

Cfsetospeed sets the output speed code in the termios structure referenced by termios_p to speed.  The speed code for a baud rate of zero, B0, is used to terminate the connection.  If B0 is specified, the modem control lines will no longer be asserted.  Normally, this will disconnect the line. 

Cfgetispeed returns the input speed code from the termios structure referenced by termios_p. 

Cfsetispeed sets the input speed code in the termios structure referenced by termios_p to speed. 

RETURN VALUE

Cfgetospeed returns the output speed code from the termios structure referenced by termios_p. 

Cfgetispeed returns the input speed code from the termios structure referenced by termios_p. 

Upon successful completion, cfsetispeed and cfsetospeed return zero.  Otherwise, a value of -1 is returned and errno is set to indicate the error. 

ERRORS

Cfsetispeed and cfsetospeed will fail when the following is true:

[EINVAL] The value of speed is outside the range of possible speed codes as specified in termios.h. 

WARNINGS

Cfsetispeed and cfsetospeed can be used to set speed codes in the termios structure that are not supported by the terminal hardware. 

SEE ALSO

tcattribute(3C), termio(7). 

STANDARDS CONFORMANCE

cfgetispeed: XPG3, POSIX.1, FIPS 151-1

cfgetospeed: XPG3, POSIX.1, FIPS 151-1

cfsetispeed: XPG3, POSIX.1, FIPS 151-1

cfsetospeed: XPG3, POSIX.1, FIPS 151-1

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026