HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)
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 char-
acter. 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.
Section 3−−614 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005