+</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
+ <EM>ncurses</EM> provides four "is_" functions that may be used to detect if the
+ corresponding flags were set or reset.
+
+ <STRONG>Query</STRONG> <STRONG>Set</STRONG> <STRONG>Reset</STRONG>
+ ------------------------------
+ is_cbreak cbreak nocbreak
+ is_echo echo noecho
+ is_nl nl nonl
+ is_raw raw noraw
+
+ In each case, the function returns
+
+ 1 if the flag is set,
+
+ 0 if the flag is reset, or
+
+ -1 if the library is not initialized.
+
+ They were designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and are not found in SVr4 <EM>curses</EM>,
+ 4.4BSD <EM>curses</EM>, or any other previous <EM>curses</EM> implementation.
+
+
+</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
+ Applications employing <EM>ncurses</EM> extensions should condition their use on
+ the visibility of the <STRONG>NCURSES_VERSION</STRONG> preprocessor macro.
+
+ Except as noted in section "EXTENSIONS" above, X/Open Curses, Issue 4,
+ Version 2 describes these functions.
+
+ <EM>ncurses</EM> follows X/Open Curses and the historical practice of AT&T
+ <EM>curses</EM> implementations, in that the echo bit is cleared when <EM>curses</EM>
+ initializes the terminal state. BSD <EM>curses</EM> differed from this
+ slightly; it left the echo bit on at initialization, but the BSD <STRONG>raw</STRONG>
+ call turned it off as a side effect. For best portability, set <STRONG>echo</STRONG> or
+ <STRONG>noecho</STRONG> explicitly just after initialization, even if your program
+ remains in cooked mode.
+
+ X/Open Curses is ambiguous regarding whether <STRONG>raw</STRONG> should disable the
+ CR/LF translations controlled by <STRONG>nl</STRONG> and <STRONG>nonl</STRONG>. BSD <EM>curses</EM> did turn off
+ these translations; AT&T <EM>curses</EM> (at least as late as SVr1) did not.
+ <EM>ncurses</EM> does so, on the assumption that a programmer requesting raw
+ input wants a clean (ideally, 8-bit clean) connection that the
+ operating system will not alter.
+
+ When <STRONG>keypad</STRONG> is first enabled, <EM>ncurses</EM> loads the key definitions for the
+ current terminal description. If the terminal description includes
+ extended string capabilities, e.g., from using the <STRONG>-x</STRONG> option of <STRONG>tic</STRONG>,
+ then <EM>ncurses</EM> also defines keys for the capabilities whose names begin
+ with "k". The corresponding keycodes are generated and (depending on
+ previous loads of terminal descriptions) may differ from one execution
+ of a program to the next. The generated keycodes are recognized by the
+ <STRONG><A HREF="curs_util.3x.html">keyname(3x)</A></STRONG> function (which will then return a name beginning with "k"
+ denoting the terminfo capability name rather than "K", used for <EM>curses</EM>
+ key names). On the other hand, an application can use <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
+ to establish a specific keycode for a given string. This makes it
+ possible for an application to check for an extended capability's
+ presence with <STRONG>tigetstr</STRONG>, and reassign the keycode to match its own
+ needs.
+
+ Low-level applications can use <STRONG>tigetstr</STRONG> to obtain the definition of any
+ particular string capability. Higher-level applications which use the
+ <EM>curses</EM> <STRONG>wgetch</STRONG> and similar functions to return keycodes rely upon the
+ order in which the strings are loaded. If more than one key definition
+ has the same string value, then <STRONG>wgetch</STRONG> can return only one keycode.
+ Most <EM>curses</EM> implementations (including <EM>ncurses</EM>) load key definitions in
+ the order defined by the array of string capability names. The last
+ key to be loaded determines the keycode which will be returned. In
+ <EM>ncurses</EM>, you may also have extended capabilities interpreted as key
+ definitions. These are loaded after the predefined keys, and if a
+ capability's value is the same as a previously-loaded key definition,
+ the later definition is the one used.
+
+
+</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
+ Formerly, <EM>ncurses</EM> used <STRONG>nl</STRONG> and <STRONG>nonl</STRONG> to control the conversion of
+ newlines to carriage return/line feed on output as well as input.
+ X/Open Curses documents the use of these functions only for input.
+ This difference arose from converting the <EM>pcurses</EM> source (1986), which
+ used <STRONG>ioctl(2)</STRONG> calls and the <EM>sgttyb</EM> structure, to <EM>termios</EM> (the POSIX
+ terminal API). In the former, both input and output were controlled
+ via a single option <STRONG>CRMOD</STRONG>, while the latter separates these features.
+ Because that conversion interferes with output optimization, <EM>ncurses</EM>
+ 6.2 (2020) amended <STRONG>nl</STRONG> and <STRONG>nonl</STRONG> to eliminate their effect on output.
+
+