nl, nonl - enable/disable newline translation
#include <curses.h> int nl(void); int nonl(void);
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.
Upon successful completion, these functions return OK. Otherwise, they return ERR.
No errors are defined.
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.
<curses.h>.