]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_inopts.3x
ncurses 6.2 - patch 20201017
[ncurses.git] / man / curs_inopts.3x
index 4abc3d09acfccd9d84ecc396b3db7a4e7f710f53..9670fe9e0ff55080f3274c98ea7eee0f2ab91cfe 100644 (file)
@@ -1,5 +1,6 @@
 .\"***************************************************************************
 .\"***************************************************************************
-.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
+.\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
+.\" Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -26,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_inopts.3x,v 1.26 2017/11/21 00:47:10 tom Exp $
+.\" $Id: curs_inopts.3x,v 1.31 2020/10/03 21:54:26 tom Exp $
 .TH curs_inopts 3X ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .TH curs_inopts 3X ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 \fBintrflush\fR,
 \fBkeypad\fR,
 \fBmeta\fR,
 \fBintrflush\fR,
 \fBkeypad\fR,
 \fBmeta\fR,
+\fBnl\fR,
+\fBnonl\fR,
 \fBnodelay\fR,
 \fBnotimeout\fR,
 \fBraw\fR,
 \fBnoraw\fR,
 \fBnodelay\fR,
 \fBnotimeout\fR,
 \fBraw\fR,
 \fBnoraw\fR,
-\fBnoqiflush\fR,
 \fBqiflush\fR,
 \fBqiflush\fR,
+\fBnoqiflush\fR,
 \fBtimeout\fR,
 \fBwtimeout\fR,
 \fBtypeahead\fR \- \fBcurses\fR input options
 \fBtimeout\fR,
 \fBwtimeout\fR,
 \fBtypeahead\fR \- \fBcurses\fR input options
 \fBint cbreak(void);\fR
 .br
 \fBint nocbreak(void);\fR
 \fBint cbreak(void);\fR
 .br
 \fBint nocbreak(void);\fR
-.br
+.sp
 \fBint echo(void);\fR
 .br
 \fBint noecho(void);\fR
 \fBint echo(void);\fR
 .br
 \fBint noecho(void);\fR
-.br
-\fBint halfdelay(int tenths);\fR
-.br
+.sp
 \fBint intrflush(WINDOW *win, bool bf);\fR
 .br
 \fBint keypad(WINDOW *win, bool bf);\fR
 \fBint intrflush(WINDOW *win, bool bf);\fR
 .br
 \fBint keypad(WINDOW *win, bool bf);\fR
 .br
 \fBint nodelay(WINDOW *win, bool bf);\fR
 .br
 .br
 \fBint nodelay(WINDOW *win, bool bf);\fR
 .br
+\fBint notimeout(WINDOW *win, bool bf);\fR
+.sp
+\fBint nl(void);\fR
+.br
+\fBint nonl(void);\fR
+.sp
 \fBint raw(void);\fR
 .br
 \fBint noraw(void);\fR
 \fBint raw(void);\fR
 .br
 \fBint noraw(void);\fR
-.br
-\fBvoid noqiflush(void);\fR
-.br
+.sp
 \fBvoid qiflush(void);\fR
 .br
 \fBvoid qiflush(void);\fR
 .br
-\fBint notimeout(WINDOW *win, bool bf);\fR
+\fBvoid noqiflush(void);\fR
+.sp
+\fBint halfdelay(int tenths);\fR
 .br
 \fBvoid timeout(int delay);\fR
 .br
 \fBvoid wtimeout(WINDOW *win, int delay);\fR
 .br
 \fBvoid timeout(int delay);\fR
 .br
 \fBvoid wtimeout(WINDOW *win, int delay);\fR
-.br
+.sp
 \fBint typeahead(int fd);\fR
 .br
 .SH DESCRIPTION
 \fBint typeahead(int fd);\fR
 .br
 .SH DESCRIPTION
@@ -101,7 +108,7 @@ windows.
 An application must apply these to each window, if the same behavior
 is needed.
 .\"
 An application must apply these to each window, if the same behavior
 is needed.
 .\"
-.SS cbreak
+.SS cbreak/nocbreak
 Normally, the tty driver buffers typed characters until a newline or carriage
 return is typed.
 The \fBcbreak\fR routine disables line buffering and
 Normally, the tty driver buffers typed characters until a newline or carriage
 return is typed.
 The \fBcbreak\fR routine disables line buffering and
@@ -178,7 +185,7 @@ The default value for keypad is \fBFALSE\fP.
 .SS meta
 .PP
 Initially, whether the terminal returns 7 or 8 significant bits on
 .SS meta
 .PP
 Initially, whether the terminal returns 7 or 8 significant bits on
-input depends on the control mode of the tty driver [see termio(7)].
+input depends on the control mode of the tty driver [see \fBtermios\fP(3)].
 To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR,
 \fBTRUE\fR); this is equivalent, under POSIX, to setting the CS8 flag
 on the terminal.
 To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR,
 \fBTRUE\fR); this is equivalent, under POSIX, to setting the CS8 flag
 on the terminal.
@@ -193,7 +200,12 @@ If the terminfo capabilities \fBsmm\fR
 \fBTRUE\fR) is called and \fBrmm\fR is sent when \fBmeta\fR(\fIwin\fR,
 \fBFALSE\fR) is called.
 .\"
 \fBTRUE\fR) is called and \fBrmm\fR is sent when \fBmeta\fR(\fIwin\fR,
 \fBFALSE\fR) is called.
 .\"
-.SS nodelay
+.SS nl/nonl
+.PP
+The \fBnl\fR and \fBnonl\fR routines control whether the underlying display
+device translates the return key into newline on input.
+.\"
+.SS nodelay/notimeout
 .PP
 The \fBnodelay\fR option causes \fBgetch\fR to be a non-blocking call.
 If no input is ready, \fBgetch\fR returns \fBERR\fR.
 .PP
 The \fBnodelay\fR option causes \fBgetch\fR to be a non-blocking call.
 If no input is ready, \fBgetch\fR returns \fBERR\fR.
@@ -221,11 +233,11 @@ The behavior of
 the BREAK key depends on other bits in the tty driver that are not set by
 \fBcurses\fR.
 .\"
 the BREAK key depends on other bits in the tty driver that are not set by
 \fBcurses\fR.
 .\"
-.SS noqiflush
+.SS qiflush/noqiflush
 .PP
 When the \fBnoqiflush\fR routine is used, normal flush of input and
 output queues associated with the \fBINTR\fR, \fBQUIT\fR and
 .PP
 When the \fBnoqiflush\fR routine is used, normal flush of input and
 output queues associated with the \fBINTR\fR, \fBQUIT\fR and
-\fBSUSP\fR characters will not be done [see termio(7)].
+\fBSUSP\fR characters will not be done [see \fBtermios\fP(3)].
 When
 \fBqiflush\fR is called, the queues will be flushed when these control
 characters are read.
 When
 \fBqiflush\fR is called, the queues will be flushed when these control
 characters are read.
@@ -291,9 +303,17 @@ initializes the terminal state.
 BSD curses differed from this slightly; it
 left the echo bit on at initialization, but the BSD \fBraw\fR call turned it
 off as a side-effect.
 BSD curses differed from this slightly; it
 left the echo bit on at initialization, but the BSD \fBraw\fR call turned it
 off as a side-effect.
-For best portability, set echo or noecho explicitly
+For best portability, set \fBecho \fPor \fBnoecho\fP explicitly
 just after initialization, even if your program remains in cooked mode.
 .PP
 just after initialization, even if your program remains in cooked mode.
 .PP
+The XSI Curses standard is ambiguous on the question of whether \fBraw\fR
+should disable the CRLF translations controlled by \fBnl\fR and \fBnonl\fR.
+BSD curses did turn off these translations; AT&T curses (at least as late as
+SVr1) did not.
+We chose to do so, on the theory that a programmer requesting
+raw input wants a clean (ideally 8-bit clean) connection that the operating
+system will not alter.
+.PP
 When \fBkeypad\fP is first enabled,
 ncurses loads the key-definitions for the current terminal description.
 If the terminal description includes extended string capabilities,
 When \fBkeypad\fP is first enabled,
 ncurses loads the key-definitions for the current terminal description.
 If the terminal description includes extended string capabilities,
@@ -330,13 +350,24 @@ and if a capability's value is the same as a previously-loaded
 key definition,
 the later definition is the one used.
 .SH NOTES
 key definition,
 the later definition is the one used.
 .SH NOTES
-Note that \fBecho\fR, \fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR,
-\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBnoqiflush\fR,
-\fBqiflush\fR, \fBtimeout\fR, and \fBwtimeout\fR may be macros.
+Note that
+\fBecho\fR,
+\fBnoecho\fR,
+\fBhalfdelay\fR,
+\fBintrflush\fR,
+\fBmeta\fR,
+\fBnl\fR,
+\fBnonl\fR,
+\fBnodelay\fR,
+\fBnotimeout\fR,
+\fBnoqiflush\fR,
+\fBqiflush\fR,
+\fBtimeout\fR, and
+\fBwtimeout\fR may be macros.
 .PP
 The \fBnoraw\fR and \fBnocbreak\fR calls follow historical practice in that
 .PP
 The \fBnoraw\fR and \fBnocbreak\fR calls follow historical practice in that
-they attempt to restore to normal (\*(``cooked\*('') mode from raw and cbreak modes
-respectively.
+they attempt to restore to normal (\*(``cooked\*('') mode
+from raw and cbreak modes respectively.
 Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver
 control states that are hard to predict or understand; it is not recommended.
 .SH SEE ALSO
 Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver
 control states that are hard to predict or understand; it is not recommended.
 .SH SEE ALSO
@@ -345,4 +376,4 @@ control states that are hard to predict or understand; it is not recommended.
 \fBcurs_initscr\fR(3X),
 \fBcurs_util\fR(3X),
 \fBdefine_key\fR(3X),
 \fBcurs_initscr\fR(3X),
 \fBcurs_util\fR(3X),
 \fBdefine_key\fR(3X),
-\fBtermio\fR(7)
+\fBtermios\fR(3)