[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

cbreak, nocbreak, noraw, or raw Subroutine

Purpose

Puts the terminal into or out of CBREAK mode.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>

int cbreak(void);

int nocbreak(void);

int noraw(void);

int raw(void);

Description

The cbreak subroutine sets the input mode for the current terminal to cbreak mode and overrides a call to the raw subroutine.

The nocbreak subroutine sets the input mode for the current terminal to Cooked Mode without changing the state of the ISIG and IXON flags.

The noraw subroutine sets the input mode for the current terminal to Cooked Mode and sets the ISIG and IXON flags.

The raw subroutine sets the input mode for the current terminal to Raw Mode.

Return Values

Upon successful completion, these subroutines return OK. Otherwise, they return ERR.

Examples

For the cbreak and nocbreak subroutines:

  1. To put the terminal into CBREAK mode, enter:

    cbreak();
  2. To take the terminal out of CBREAK mode, enter:

    nocbreak();
  3. To place the terminal into raw mode, use:

    raw();
  4. To place the terminal out of raw mode, use:

    noraw();

For the noraw and raw subroutines:

  1. To place the terminal into raw mode, use:

    raw();
  2. To place the terminal out of raw mode, use:

    noraw();

Related Information

The getch (getch, mvgetch, mvwgetch, or wgetch Subroutine) subroutine.

Curses Overview for Programming in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

Understanding Terminals with Curses in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]