Debian Codegraph @

upstream/opensuse-leap-16-1/man3/inopts.3ncurses

raw
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2024,2025 Thomas E. Dickey *
4 .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. *
5 .\" *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a *
7 .\" copy of this software and associated documentation files (the *
8 .\" "Software"), to deal in the Software without restriction, including *
9 .\" without limitation the rights to use, copy, modify, merge, publish, *
10 .\" distribute, distribute with modifications, sublicense, and/or sell *
11 .\" copies of the Software, and to permit persons to whom the Software is *
12 .\" furnished to do so, subject to the following conditions: *
13 .\" *
14 .\" The above copyright notice and this permission notice shall be included *
15 .\" in all copies or substantial portions of the Software. *
16 .\" *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 .\" *
25 .\" Except as contained in this notice, the name(s) of the above copyright *
26 .\" holders shall not be used in advertising or otherwise to promote the *
27 .\" sale, use or other dealings in this Software without prior written *
28 .\" authorization. *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: curs_inopts.3x,v 1.104 2025/04/05 22:07:49 tom Exp $
32 .TH inopts 3NCURSES 2025-04-05 "ncurses 6.5" "Library calls"
33 .ie \n(.g \{\
34 .ds `` \(lq
35 .ds '' \(rq
36 .\}
37 .el \{\
38 .ie t .ds `` ``
39 .el .ds `` ""
40 .ie t .ds '' ''
41 .el .ds '' ""
42 .\}
43 .
44 .de bP
45 .ie n .IP \(bu 4
46 .el .IP \(bu 2
47 ..
48 .SH NAME
49 \fB\%cbreak\fP,
50 \fB\%echo\fP,
51 \fB\%halfdelay\fP,
52 \fB\%intrflush\fP,
53 \fB\%is_cbreak\fP,
54 \fB\%is_echo\fP,
55 \fB\%is_nl\fP,
56 \fB\%is_raw\fP,
57 \fB\%keypad\fP,
58 \fB\%meta\fP,
59 \fB\%nl\fP,
60 \fB\%nocbreak\fP,
61 \fB\%nodelay\fP,
62 \fB\%noecho\fP,
63 \fB\%nonl\fP,
64 \fB\%noqiflush\fP,
65 \fB\%noraw\fP,
66 \fB\%notimeout\fP,
67 \fB\%qiflush\fP,
68 \fB\%raw\fP,
69 \fB\%timeout\fP,
70 \fB\%wtimeout\fP,
71 \fB\%typeahead\fP \-
72 get and set \fIcurses\fR terminal input options
73 .SH SYNOPSIS
74 .nf
75 \fB#include <ncursesw/curses.h>
76 .PP
77 \fBint cbreak(void);
78 \fBint nocbreak(void);
79 .PP
80 \fBint echo(void);
81 \fBint noecho(void);
82 .PP
83 \fBint intrflush(WINDOW * \fIwin\fP \fI/* ignored */\fP, bool \fIbf\fP);
84 \fBint keypad(WINDOW * \fIwin\fP, bool \fIbf\fP);
85 \fBint meta(WINDOW * \fIwin\fP \fI/* ignored */\fP, bool \fIbf\fP);
86 \fBint nodelay(WINDOW * \fIwin\fP, bool \fIbf\fP);
87 \fBint notimeout(WINDOW * \fIwin\fP, bool \fIbf\fP);
88 .PP
89 \fBint nl(void);
90 \fBint nonl(void);
91 .PP
92 \fBvoid qiflush(void);
93 \fBvoid noqiflush(void);
94 .PP
95 \fBint raw(void);
96 \fBint noraw(void);
97 .PP
98 \fBint halfdelay(int \fItenths\fP);
99 \fBvoid timeout(int \fIdelay\fP);
100 \fBvoid wtimeout(WINDOW * \fIwin\fP, int \fIdelay\fP);
101 .PP
102 \fBint typeahead(int \fIfd\fP);
103 .PP
104 \fI/* extensions */
105 \fBint is_cbreak(void);
106 \fBint is_echo(void);
107 \fBint is_nl(void);
108 \fBint is_raw(void);
109 .fi
110 .SH DESCRIPTION
111 .I curses
112 offers configurable parameters permitting an application to control the
113 handling of input from the terminal.
114 Some,
115 such as those affecting the terminal's
116 .I mode
117 or line discipline,
118 are global,
119 applying to all windows;
120 others apply only to a specific window.
121 The library does not automatically apply such parameters to new or
122 derived windows;
123 an application must configure each window for the desired behavior.
124 .PP
125 Some descriptions below make reference to an
126 .IR "input character reading function" ":"
127 this is \fB\%wgetch\fP(3NCURSES) in the non-wide character
128 .I curses
129 API and \fB\%wget_wch\fP(3NCURSES) in the wide character API.
130 In addition to the variant forms of these described in
131 \fB\%ncurses\fP(3NCURSES),
132 the
133 .I curses
134 functions \fB\%wgetstr\fP(3NCURSES) and \fB\%wget_wstr\fP(3NCURSES) and their own
135 variants call the appropriate input character reading function.
136 .\"
137 .SS "cbreak, nocbreak"
138 Normally,
139 the terminal driver buffers typed characters,
140 not delivering them to an application
141 until a line feed or carriage return is typed.
142 This canonical (\*(``cooked\*('') line discipline also supports
143 software flow control,
144 simple line editing functions
145 (character and word erase,
146 and whole-line erasure or \*(``kill\*(''),
147 and job control.
148 .B \%cbreak
149 configures the terminal in
150 .IR "cbreak mode" ","
151 which disables line buffering
152 and erase and kill character processing \(em
153 the interrupt,
154 quit,
155 suspend,
156 and flow control characters are unaffected \(em
157 and makes characters typed by the user immediately available to the
158 program.
159 .B \%nocbreak
160 restores canonical (\*(``cooked\*('') mode.
161 .PP
162 The state of the terminal is unknown to a
163 .I curses
164 application when it starts;
165 therefore,
166 a program should call
167 .B \%cbreak
168 or
169 .B \%nocbreak
170 explicitly.
171 Most interactive programs using
172 .I curses
173 set \%cbreak
174 mode.
175 Calling
176 .B \%cbreak
177 overrides
178 .BR raw "."
179 The man page for the input character reading function
180 discusses how
181 .B \%cbreak
182 and
183 .B \%nocbreak
184 interact with
185 .B echo
186 and
187 .BR \%noecho "."
188 .\"
189 .SS "echo, noecho"
190 .B echo
191 and
192 .B \%noecho
193 determine whether characters typed by the user are written to the
194 .I curses
195 window by the input character reading function as they are typed.
196 .I curses
197 always disables the terminal driver's own echoing.
198 By default,
199 a
200 .I curses
201 screen's echo option is set.
202 Authors of most interactive programs prefer
203 to do their own echoing in a controlled area of the screen,
204 or not to echo at all,
205 so they call
206 .BR \%noecho "."
207 The man page for the input character reading function
208 discusses how
209 .B echo
210 and
211 .B \%noecho
212 interact with
213 .B \%cbreak
214 and
215 .BR \%nocbreak "."
216 .\"
217 .SS halfdelay
218 .B \%halfdelay
219 configures
220 .IR "half-delay mode" ","
221 which is similar to \%cbreak mode in that characters typed by the user
222 are immediately available to the program.
223 However,
224 after blocking for
225 .I tenths
226 tenth-seconds,
227 an input character reading function returns
228 .B ERR
229 if no input is pending.
230 The value of
231 .I tenths
232 must be between 1 and 255.
233 Use
234 .B \%nocbreak
235 to leave half-delay mode.
236 .\"
237 .SS intrflush
238 .B \%intrflush
239 calls
240 .B \%qiflush
241 (see below)
242 if
243 .I bf
244 is
245 .BR TRUE ","
246 and
247 .B \%noqiflush
248 if
249 .I bf
250 is
251 .BR FALSE "."
252 It ignores its
253 .I win
254 argument.
255 .\"
256 .SS keypad
257 .B keypad
258 enables recognition of a terminal's function keys.
259 If
260 enabled
261 .RI ( bf
262 is
263 .BR TRUE ")"
264 then when an input character reading function reads ESC,
265 it waits for further input corresponding to an escape sequence
266 defined by the terminal type description.
267 If a valid sequence populates the input stream,
268 the input character reading function
269 returns a value representing the function key,
270 such as
271 .BR KEY_LEFT "."
272 (Wide-character API users:
273 \fB\%wget_wch\fP(3NCURSES) returns
274 .B \%KEY_CODE_YES
275 to indicate the availability of a function key code in its
276 .I wch
277 parameter.)
278 If the sequence is invalid,
279 the input character reading function returns only its last character.
280 If disabled
281 .RI ( bf
282 is
283 .BR FALSE ),
284 .I curses
285 does not treat function keys specially and the program has to interpret
286 escape sequences itself.
287 If the terminal's keypad can be turned on
288 (made to transmit)
289 and off
290 (made to work locally),
291 .B \%keypad
292 configures it consistently with the
293 .I bf
294 parameter.
295 By default,
296 a window's keypad mode is off.
297 .\"
298 .SS meta
299 Initially,
300 whether the terminal returns 7- or 8-bit character codes on input
301 depends on the configuration of the terminal driver;
302 on POSIX systems,
303 see \fI\%termios\fP(3).
304 To force 8 bits to be returned,
305 call
306 .BR meta( .\|.\|. ,
307 .BR TRUE) ;
308 this is equivalent,
309 on POSIX systems,
310 to setting the CS8 flag on the terminal.
311 To force 7 bits to be returned,
312 call
313 .BR meta( .\|.\|. ,
314 .BR FALSE) ;
315 this is equivalent,
316 on POSIX systems,
317 to setting the CS7 flag on the terminal.
318 .I curses
319 ignores the window argument
320 .IR win "."
321 If the
322 .I \%term\%info
323 string capabilities
324 .B \%meta_on
325 .RB ( smm )
326 and
327 .B \%meta_off
328 .RB ( rmm )
329 are defined for the terminal type,
330 enabling meta mode sends
331 .B smm
332 to the terminal and disabling it sends
333 .B rmm
334 to the terminal.
335 .\"
336 .SS "nl, nonl"
337 Initially,
338 whether the terminal reports a carriage return
339 using the character code for a line feed
340 in cbreak or raw modes
341 depends on the configuration of the terminal driver;
342 see \fI\%termios\fP(3).
343 .B nl
344 configures the terminal to perform this translation.
345 .B nonl
346 disables it.
347 Under its canonical (\*(``cooked\*('') line discipline,
348 the terminal driver always translates carriage returns to line feeds.
349 .\"
350 .SS nodelay
351 .B \%nodelay
352 configures the input character reading function to be non-blocking for
353 window
354 .IR "win" .
355 If no input is ready,
356 the reading function returns
357 .BR ERR "."
358 If disabled
359 .RI ( bf
360 is
361 .BR FALSE ),
362 the reading function does not return until it has input.
363 .SS notimeout
364 When the input character reading function reads an ESC character,
365 it sets a timer while waiting for the next character.
366 .BI \%notimeout( win ,
367 .B TRUE)
368 disables this timer.
369 The purpose of the timeout is to distinguish sequences produced by a
370 function key from those typed by a user.
371 If this timer is disabled,
372 .I curses
373 waits forever for subsequent keystrokes
374 until it determines the escape sequence to be valid or invalid.
375 .\"
376 .SS "qiflush, noqiflush"
377 .\"
378 .B \%qiflush
379 and
380 .B \%noqiflush
381 configure the terminal driver's treatment of its input and output queues
382 when it handles the interrupt,
383 suspend,
384 or quit characters under the canonical (\*(``cooked\*('')
385 or cbreak line disciplines on POSIX systems;
386 see \fI\%termios\fP(3).
387 The default behavior is inherited from the terminal driver settings.
388 Calling
389 .B \%qiflush
390 configures the terminal to
391 .I flush
392 the queues
393 (discarding their contents)
394 when any of these events occurs,
395 giving the impression of faster response to user input,
396 but making the library's model of the screen contents incorrect.
397 Calling
398 .B \%noqiflush
399 prevents such flushing,
400 but might frustrate impatient users on slow connections if a
401 .I curses
402 update of the screen is in progress when the event occurs;
403 see
404 .B \%typeahead
405 below for a mitigation of this problem.
406 You may want to call
407 .B \%noqiflush
408 in a signal handler if,
409 after the handler exits,
410 you want output to continue
411 as though the signal had not occurred.
412 .\"
413 .SS "raw, noraw"
414 .B raw
415 configures the terminal to read input in
416 .IR "raw mode" ,
417 which is similar to cbreak mode
418 (see
419 .B \%cbreak
420 above)
421 except that it furthermore passes through the terminal's configured
422 interrupt,
423 quit,
424 suspend,
425 and flow control characters
426 uninterpreted to the application,
427 instead of generating a signal or acting on I/O flow.
428 The behavior of the terminal's \*(``Break\*('' key
429 (if any)
430 depends on terminal driver configuration parameters that
431 .I curses
432 does not handle.
433 .B \%noraw
434 restores the terminal's canonical (\*(``cooked\*('') line discipline.
435 .\"
436 .SS "timeout, wtimeout"
437 .B \%wtimeout
438 configures whether a
439 .I curses
440 input character reading function called on window
441 .I win
442 uses blocking or non-blocking reads.
443 If
444 .I delay
445 is negative,
446 .I curses
447 uses a blocking read,
448 waiting indefinitely for input.
449 If
450 .I delay
451 is zero,
452 the read is non-blocking;
453 an input character reading function returns
454 .B ERR
455 if no input is pending.
456 If
457 .I delay
458 is positive,
459 an input character reading function
460 blocks for
461 .I delay
462 milliseconds,
463 and returns
464 .B ERR
465 if the delay elapses and there is still no input pending.
466 .B \%timeout
467 calls
468 .B \%wtimeout
469 on
470 .BR stdscr "."
471 .\"
472 .SS typeahead
473 Normally,
474 a
475 .I curses
476 library checks the terminal's input file descriptor for activity
477 with \fIpoll\fP(2) or \fI\%select\fP(2)
478 while updating the screen;
479 if it finds any,
480 it postpones output
481 until the next \fB\%wrefresh\fP(3NCURSES) or \fB\%doupdate\fP(3NCURSES) call,
482 allowing faster response to user key strokes.
483 The library tests the file descriptor corresponding to the
484 .I FILE
485 stream pointer passed to \fB\%newterm\fP(3NCURSES)
486 (or
487 .I stdin
488 if \fB\%initscr\fP(3NCURSES) was called),
489 for pending input.
490 .B \%typeahead
491 instructs
492 .I curses
493 to test file descriptor
494 .I fd
495 instead.
496 An
497 .I fd
498 of
499 .B \-1
500 disables the check.
501 .\"
502 .SH RETURN VALUE
503 .B \%timeout
504 and
505 .B \%wtimeout
506 return no value.
507 .PP
508 .BR \%cbreak ","
509 .BR \%nocbreak ","
510 .BR \%echo ","
511 .BR \%noecho ","
512 .BR \%halfdelay ","
513 .BR \%intrflush ","
514 .BR \%keypad ","
515 .BR \%meta ","
516 .BR \%nodelay ","
517 .BR \%notimeout ","
518 .BR \%nl ","
519 .BR \%nonl ","
520 .BR \%raw ","
521 .BR \%noraw ","
522 and
523 .B \%typeahead
524 return
525 .B OK
526 on success and
527 .B ERR
528 on failure.
529 .PP
530 In
531 .IR \%ncurses ","
532 the functions in the previous paragraph return
533 .B ERR
534 if
535 .bP
536 the library's
537 .I \%TERMINAL
538 structure for the device has not been initialized with
539 \fB\%initscr\fP(3NCURSES),
540 \fB\%newterm\fP(3NCURSES),
541 or
542 \fB\%setupterm\fP(3NCURSES),
543 or
544 .bP
545 .I win
546 is a null pointer
547 (except with
548 .B \%intrflush
549 and
550 .BR meta ","
551 which ignore its value).
552 .PP
553 Further,
554 .B \%halfdelay
555 returns
556 .B ERR
557 if
558 .I delay
559 is outside the range 1..255.
560 .PP
561 See section \*(``EXTENSIONS\*('' below for the
562 return values of
563 .BR is_cbreak ","
564 .BR is_echo ","
565 .BR is_nl ","
566 and
567 .BR is_raw "."
568 .SH NOTES
569 .BR echo ","
570 .BR \%noecho ","
571 .BR \%halfdelay ","
572 .BR \%intrflush ","
573 .BR meta ","
574 .BR nl ","
575 .BR nonl ","
576 .BR \%nodelay ","
577 .BR \%notimeout ","
578 .BR \%noqiflush ","
579 .BR \%qiflush ","
580 .BR \%timeout ","
581 and
582 .B \%wtimeout
583 may be implemented as macros.
584 .PP
585 .B \%noraw
586 and
587 .B \%nocbreak
588 follow historical practice in that they attempt to restore
589 the terminal's canonical (\*(``cooked\*('') line discipline
590 from raw and cbreak,
591 respectively.
592 Mixing
593 .BR \%raw / noraw
594 calls with
595 .BR \%cbreak / nocbreak
596 calls leads to terminal driver control states that are hard to predict
597 or understand;
598 doing so is not recommended.
599 .PP
600 .I curses
601 documentation uses the terms \*(``delay\*('' and \*(``timeout\*(''
602 freely to describe two related but distinct aspects of input handling,
603 at the risk of confusing the user.
604 The functions
605 .BR \%halfdelay ","
606 .BR \%nodelay ","
607 .BR \%timeout ","
608 and
609 .B \%wtimeout
610 configure whether the input character reading function
611 \%(\fBwgetch\fP(3NCURSES) or \fB\%wget_wch\fP(3NCURSES))
612 waits for keyboard input to begin,
613 and for how long.
614 .B \%keypad
615 configures whether that function waits for further input
616 if the first character it reads is ESC.
617 Calling
618 .BR \%notimeout ","
619 which has nothing to do with
620 .B \%timeout
621 or
622 .BR \%wtimeout ","
623 makes this delay in expectation of further characters
624 effectively infinite.
625 X/Open Curses affords no means of otherwise configuring
626 the length of this second delay,
627 but an AIX and
628 .I \%ncurses
629 extension,
630 .BR \%ESCDELAY ,
631 is available both as an environment variable and a global symbol
632 permitting the application to do so;
633 see \fB\%ncurses\fP(3NCURSES) and \fBcurses_variables\fP(3NCURSES).
634 .SH EXTENSIONS
635 .I \%ncurses
636 provides four \*(``is_\*('' functions corresponding to
637 .BR \%cbreak ","
638 .BR echo ","
639 .BR nl ","
640 and
641 .BR raw ","
642 permitting their states to be queried by the application.
643 .PP
644 .TS
645 center;
646 Lb Lb Lb
647 L L L .
648 Query Set Reset
649 _
650 is_cbreak cbreak nocbreak
651 is_echo echo noecho
652 is_nl nl nonl
653 is_raw raw noraw
654 .TE
655 .PP
656 In each case,
657 the function returns
658 .TP 5 \" "-1" + 2n tag separation + 1n fudge for typesetters like grops
659 .B 1
660 if the option is set,
661 .TP
662 .B 0
663 if the option is unset,
664 or
665 .TP
666 .B \-1
667 if the library's
668 .I \%TERMINAL
669 structure for the device has not been initialized.
670 .SH PORTABILITY
671 Applications employing
672 .I \%ncurses
673 extensions should condition their use on the visibility of the
674 .B \%NCURSES_VERSION
675 preprocessor macro.
676 .PP
677 Except as noted in section \*(``EXTENSIONS\*('' above,
678 X/Open Curses Issue\ 4 describes these functions.
679 It specifies no error conditions for them.
680 .PP
681 SVr4 describes a successful return value only as
682 \*(``an integer value other than
683 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 508
684 .\" It continues "unless otherwise noted in the preceding routine
685 .\" descriptions", but no notes otherwise are present; the man page
686 .\" discusses getch()'s return value repeatedly, but never those of the
687 .\" functions the page ostensibly documents.
688 .PP
689 .I \%ncurses
690 follows X/Open Curses
691 and the historical practice of System\ V
692 .IR curses ","
693 clearing the terminal driver's \*(``echo\*('' flag when initializing the
694 screen.
695 BSD
696 .I curses
697 did not,
698 but its
699 .I raw
700 function turned it off as a side effect.
701 .\" SGTTY's sg_flags had a "RAW" symbol; termio in SVr1 for the PDP-11
702 .\" did not.
703 .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/include/curses.h
704 .\" https://github.com/ryanwoodsmall/oldsysv/blob/master/sysv-pdp11_man/a_man/man7/termio.7
705 For best portability,
706 call
707 .I echo
708 or
709 .I \%noecho
710 explicitly just after initialization,
711 even if your program retains the terminal's canonical (\*(``cooked\*('')
712 line discipline.
713 .PP
714 X/Open Curses is ambiguous regarding whether
715 .I raw
716 should disable the carriage return and line feed translation feature
717 controlled by
718 .I nl
719 and
720 .IR \%nonl "."
721 BSD
722 .I curses
723 turned off these translations;
724 System\ V
725 .I curses
726 did not.
727 .I \%ncurses
728 does so,
729 on the assumption that a programmer requesting raw input wants a clean
730 (ideally,
731 8-bit clean)
732 connection that the operating system will not alter.
733 .PP
734 When
735 .B \%keypad
736 is first enabled,
737 .I \%ncurses
738 loads the key definitions for the current terminal type description.
739 If that description includes extended string capabilities,
740 for example,
741 by using the
742 .B \-x
743 option of \fB\%tic\fP(1),
744 then
745 .I \%ncurses
746 also defines keys for the capabilities whose names begin with
747 \*(``k\*(''.
748 Corresponding key codes are generated and
749 (depending on previous loads of terminal descriptions)
750 may differ from one execution of a program to the next.
751 The generated key codes are recognized by \fB\%keyname\fP(3NCURSES),
752 which then returns a name beginning with \*(``k\*('' denoting the
753 .I \%term\%info
754 capability name rather than \*(``K\*('',
755 used for
756 .I curses
757 key names.
758 On the other hand,
759 an application can use \fB\%define_key\fP(3NCURSES) to bind
760 a specific key to a string of the programmer's choice.
761 This feature enables an application to check for its presence
762 with \fB\%tigetstr\fP(3NCURSES),
763 and reassign the key code to match its own needs.
764 .PP
765 Low-level applications can use \fB\%tigetstr\fP(3NCURSES) to obtain the
766 definition of any string capability.
767 .I curses
768 applications use the input character reading function
769 to obtain key codes from input
770 and rely upon the order in which the string capabilities are loaded.
771 Multiple key capability strings can have the same value,
772 but the input character reading function can report only one key code.
773 Most
774 .I curses
775 implementations
776 (including
777 .IR \%ncurses )
778 load key definitions in the order
779 they appear in the
780 .B \%strfnames
781 array of string capability names;
782 see \fB\%terminfo_variables\fP(3NCURSES).
783 .\" ncurses/tinfo/parse_entry.c:lookup_fullname, I think --GBR
784 The last capability read using a particular definition determines the
785 key code to be reported.
786 In
787 .IR \%ncurses ,
788 extended capabilities can be interpreted as key definitions.
789 These are loaded after the predefined keys,
790 and if a capability's value is the same as a previously loaded
791 key definition,
792 the library uses the later definition.
793 .SH HISTORY
794 4BSD (1980)
795 introduced
796 .IR echo ","
797 .IR \%noecho ","
798 .IR nl ","
799 .IR \%nonl ","
800 .IR raw ","
801 and
802 .IR \%noraw "." \" also crmod and nocrmod, never standardized
803 .PP
804 SVr2 (1984)
805 featured a new terminal driver,
806 extending the
807 .I curses
808 API to support it with
809 .IR \%cbreak ","
810 .IR \%nocbreak ","
811 .IR \%intrflush ","
812 .IR \%keypad ","
813 .IR \%meta ","
814 .IR \%nodelay ","
815 and
816 .IR \%typeahead "."
817 .PP
818 SVr3 (1987)
819 added
820 .IR \%halfdelay ","
821 .IR \%notimeout ","
822 and
823 .IR \%wtimeout "."
824 .I \%qiflush
825 and
826 .I \%noqiflush
827 appeared in SVr3.1 (1987),
828 at which point
829 .I \%intrflush
830 became a wrapper for either of these functions,
831 depending on the value of its Boolean argument.
832 SVr3.1 also added
833 .IR \%timeout "."
834 .PP
835 .I \%ncurses
836 6.5 (2024) introduced
837 .IR is_cbreak ","
838 .IR is_echo ","
839 .IR is_nl ","
840 and
841 .IR is_raw "."
842 .PP
843 Formerly,
844 .I \%ncurses
845 used
846 .I \%nl
847 and
848 .I \%nonl
849 to control the conversion of newlines to carriage return/line feed
850 on output as well as input.
851 X/Open Curses documents the use of these functions only for input.
852 This difference arose from converting the
853 .I \%pcurses
854 source (1986),
855 which used
856 \fI\%ioctl\fP(2) calls and the
857 .I \%sgttyb
858 structure,
859 to
860 .I \%termios
861 (the POSIX terminal API).
862 In the former,
863 both input and output conversions were controlled via a single option
864 \*(``CRMOD\*('',
865 while the latter separates these features.
866 Because that conversion interferes with output optimization,
867 .I \%ncurses
868 6.2 (2020) amended
869 .I \%nl
870 and
871 .I \%nonl
872 to eliminate their effect on output.
873 .SH SEE ALSO
874 \fB\%ncurses\fP(3NCURSES),
875 \fB\%getch\fP(3NCURSES),
876 \fB\%initscr\fP(3NCURSES),
877 \fB\%util\fP(3NCURSES),
878 \fB\%define_key\fP(3NCURSES),
879 \fB\%termios\fP(3),
880 \fB\%terminfo_variables\fP(3NCURSES)