The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 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>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]