nl or nonl Subroutine
Purpose
Enables or 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 this translation. Initially, this translation is enabled.
Return Values
Upon successful completion, these subroutines return OK. Otherwise, they return ERR.
Examples
- To instruct
wgetch
to translate the carriage return into a newline, enter:nl();
- To instruct
wgetch
not to translate the carriage return, enter:nonl();