nl.3x (2010 09)
n
nl(3X) nl(3X)
(CURSES)
NAME
nl, nonl — enable/disable newline translation
SYNOPSIS
#include <curses.h>
int nl(void);
int nonl(void);
DESCRIPTION
The nl() function enables a mode in which carriage return is translated to newline on input. The
nonl() function disables the above translation. Initially, the above translation is enabled.
RETURN VALUE
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
APPLICATION USAGE
The default translation adapts the terminal to environments in which newline is the line termination
character. However, by disabling the translation with
nonl(), the application can sense the pressing of
the carriage return key.
SEE ALSO
<curses.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 2.
X/Open Curses, Issue 4
The entry is rewritten for clarity. The argument list for the
nl() and nonl() functions is explicitly
declared as void.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1