Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

cbreak(3)  —  Subroutines

Digital

NAME

cbreak, nocbreak − set/clear cbreak mode

SYNOPSIS

#include <curses.h>

int cbreak()

int nocbreak()

DESCRIPTION

The routine cbreak puts the terminal into CBREAK mode.  In this mode, characters typed by the user are immediately available to the program and erase/kill character processing is not performed.  Interrupt and flow control characters are unaffected by this mode. 

The routine nocbreak disables CBREAK.  In this case the terminal driver will buffer input until a newline or carriage return is typed. 

The initial settings that determine whether or not a terminal is in CBREAK mode are dependent on the terminal driver implementation.  As a result of this, it is not possible to determine if a terminal is in CBREAK mode, as it is an inherited characteristic.  It is necessary to call cbreak to ensure that the terminal is set to the correct mode for the application. 

RETURN VALUES

The cbreak and nobreak functions return OK on success and ERR on error. 

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