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

Technical Reference: Base Operating System and Extensions, Volume 2

nl or nonl Subroutine

Purpose

Enables/disables newline translation.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>

int nl(void);

int nonl(void);

Description

The nl subroutine enables a mode in which carriage return is translated to newline on input. The nonnl subroutine disables the above translation. Initially, the above translation is enabled.

Return Values

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

Examples

  1. To instruct wgetch to translate the carriage return into a newline, enter:

    nl();
  2. To instruct wgetch not to translate the carriage return, enter:

    nonl();

Related Information

The refresh (refresh or wrefresh Subroutine) subroutine, waddch (addch, mvaddch, mvwaddch, or waddch Subroutine) subroutine.

Curses Overview for Programming, Understanding Terminals with Curses, List of Curses Subroutines 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 ]