X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_inopts.3x.html;h=4bee87ac6af6a337478dc9904cb964962be50c9f;hp=d9a8d55ee0b1d5cb1afbf58bc9158fcec5f01360;hb=HEAD;hpb=d90067f9008bb8338a77c1ed519bc108c275ed04 diff --git a/doc/html/man/curs_inopts.3x.html b/doc/html/man/curs_inopts.3x.html index d9a8d55e..149b2b82 100644 --- a/doc/html/man/curs_inopts.3x.html +++ b/doc/html/man/curs_inopts.3x.html @@ -1,7 +1,7 @@ -curs_inopts 3x 2023-12-16 ncurses 6.4 Library calls +curs_inopts 3x 2024-04-13 ncurses 6.5 Library calls -

curs_inopts 3x 2023-12-16 ncurses 6.4 Library calls

+

curs_inopts 3x 2024-04-13 ncurses 6.5 Library calls

 curs_inopts(3x)                  Library calls                 curs_inopts(3x)
 
@@ -92,19 +92,19 @@
 
 
 

DESCRIPTION

-       The ncurses library provides several functions which let an application
-       change  the  way  input from the terminal is handled.  Some are global,
-       applying to all windows.  Others  apply  only  to  a  specific  window.
-       Window-specific  settings  are  not  automatically  applied  to  new or
-       derived windows.  An application must apply these to  each  window,  if
-       the same behavior is needed.
-
-
-

cbreak/nocbreak

-       Normally,  the  tty  driver buffers typed characters until a newline or
-       carriage return is typed.  The cbreak routine disables  line  buffering
-       and   erase/kill   character-processing  (interrupt  and  flow  control
-       characters  are  unaffected),  making  characters  typed  by  the  user
+       ncurses provides several functions that let an application  change  the
+       way  input  from the terminal is handled.  Some are global, applying to
+       all windows.  Others apply only to a specific window.   Window-specific
+       settings  are  not automatically applied to new or derived windows.  An
+       application must apply these to each window if  the  same  behavior  is
+       desired.
+
+
+

cbreak, nocbreak

+       Normally,  the terminal driver buffers typed characters until a newline
+       or  carriage  return  is  typed.   The  cbreak  routine  disables  line
+       buffering  and  erase/kill  character-processing  (interrupt  and  flow
+       control characters are unaffected), making characters typed by the user
        immediately available to the program.  The nocbreak routine returns the
        terminal to normal (cooked) mode.
 
@@ -115,15 +115,15 @@
        discussion of how these routines interact with echo and noecho.]
 
 
-

echo/noecho

+

echo, noecho

        The echo and noecho routines control whether characters  typed  by  the
-       user  are  echoed  by  getch(3x) as they are typed.  Echoing by the tty
-       driver is always disabled, but initially getch  is  in  echo  mode,  so
-       characters  typed  are  echoed.   Authors  of most interactive programs
-       prefer to do their own echoing in a controlled area of the  screen,  or
-       not  to  echo  at all, so they disable echoing by calling noecho.  [See
-       curs_getch(3x) for a discussion of how  these  routines  interact  with
-       cbreak and nocbreak.]
+       user  are  echoed  by  getch(3x)  as  they  are  typed.  Echoing by the
+       terminal driver is always disabled, but  initially  getch  is  in  echo
+       mode,  so  characters  typed  are  echoed.  Authors of most interactive
+       programs prefer to do their own echoing in a  controlled  area  of  the
+       screen,  or  not  to  echo  at  all, so they disable echoing by calling
+       noecho.  [See curs_getch(3x) for a discussion  of  how  these  routines
+       interact with cbreak and nocbreak.]
 
 
 

halfdelay

@@ -138,11 +138,11 @@
 

intrflush

        If the intrflush option is enabled (bf is TRUE), and an  interrupt  key
        is  pressed on the keyboard (interrupt, break, quit), all output in the
-       tty driver queue will be flushed, giving the effect of faster  response
+       terminal driver queue is flushed, giving the effect of faster  response
        to  the interrupt, but causing curses to have the wrong idea of what is
-       on the screen.  Disabling the option (bf is FALSE) prevents the  flush.
-       The  default  for the option is inherited from the tty driver settings.
-       The window argument is ignored.
+       on the screen.  Disabling the option (bf is FALSE), prevents the flush.
+       The  default  for  the  option  is  inherited  from the terminal driver
+       settings.  The win argument is ignored.
 
 
 

keypad

@@ -159,18 +159,18 @@
 
 

meta

        Initially, whether the terminal returns 7  or  8  significant  bits  on
-       input  depends  on the control mode of the tty driver [see termios(3)].
-       To force 8 bits  to  be  returned,  invoke  meta(win,  TRUE);  this  is
-       equivalent,  under  POSIX, to setting the CS8 flag on the terminal.  To
-       force  7  bits  to  be  returned,  invoke  meta(win,  FALSE);  this  is
-       equivalent,  under POSIX, to setting the CS7 flag on the terminal.  The
-       window argument, win, is always ignored.  If the terminfo  capabilities
-       smm  (meta_on)  and rmm (meta_off) are defined for the terminal, smm is
-       sent to the terminal when meta(win, TRUE) is called  and  rmm  is  sent
-       when meta(win, FALSE) is called.
-
-
-

nl/nonl

+       input  depends  on  the  control  mode  of  the  terminal  driver  [see
+       termios(3)].  To force 8 bits to be returned, invoke  meta(win,  TRUE);
+       this  is  equivalent,  under  POSIX,  to  setting  the  CS8 flag on the
+       terminal.  To force 7 bits to be  returned,  invoke  meta(win,  FALSE);
+       this  is  equivalent,  under  POSIX,  to  setting  the  CS7 flag on the
+       terminal.  The  window  argument,  win,  is  always  ignored.   If  the
+       terminfo  capabilities smm (meta_on) and rmm (meta_off) are defined for
+       the terminal, smm is sent to  the  terminal  when  meta(win,  TRUE)  is
+       called and rmm is sent when meta(win, FALSE) is called.
+
+
+

nl, nonl

        The  nl and nonl routines control whether the underlying display device
        translates the return key into newline on input.
 
@@ -185,21 +185,21 @@
        When interpreting an escape sequence, wgetch(3x)  sets  a  timer  while
        waiting  for  the  next  character.  If notimeout(win, TRUE) is called,
        then wgetch does not set a timer.  The purpose of  the  timeout  is  to
-       differentiate  between sequences received from a function key and those
-       typed by a user.
+       distinguish  sequences produced by a function key from those typed by a
+       user.
 
 
-

raw/noraw

+

raw, noraw

        The raw and noraw routines place the terminal into or out of raw  mode.
        Raw  mode  is  similar  to  cbreak  mode,  in that characters typed are
        immediately passed through to the user program.   The  differences  are
        that  in  raw  mode,  the  interrupt,  quit,  suspend, and flow control
        characters are all passed through uninterpreted, instead of  generating
        a  signal.   The behavior of the BREAK key depends on other bits in the
-       tty driver that are not set by curses.
+       terminal driver that are not set by curses.
 
 
-

qiflush/noqiflush

+

qiflush, nqiflush

        When the noqiflush routine is used, normal flush of  input  and  output
        queues  associated  with the INTR, QUIT and SUSP characters will not be
        done [see termios(3)].  When qiflush is  called,  the  queues  will  be
@@ -208,23 +208,23 @@
        the interrupt had not occurred, after the handler exits.
 
 
-

timeout/wtimeout

+

timeout, wtimeout

        The timeout and wtimeout routines set blocking or non-blocking read for
-       a given window.  If delay is negative, blocking  read  is  used  (i.e.,
-       waits  indefinitely  for  input).   If delay is zero, then non-blocking
-       read is used (i.e., read returns ERR if no input is waiting).  If delay
-       is  positive,  then read blocks for delay milliseconds, and returns ERR
+       a given window.  If delay is negative, a blocking read is  used  (i.e.,
+       waits  indefinitely  for input).  If delay is zero, then a non-blocking
+       read is used (i.e., read returns ERR if no input is waiting).  If delay
+       is  positive,  then read blocks for delay milliseconds, and returns ERR
        if there is still no input.  Hence, these  routines  provide  the  same
        functionality  as nodelay, plus the additional capability of being able
        to block for only delay milliseconds (where delay is positive).
 
 
 

typeahead

-       The curses library does "line-breakout  optimization"  by  looking  for
-       typeahead  periodically  while updating the screen.  If input is found,
-       and it is coming from a tty, the  current  update  is  postponed  until
+       curses does  "line-breakout  optimization"  by  looking  for  typeahead
+       periodically  while  updating the screen.  If input is found, and it is
+       coming  from  a  terminal,  the  current  update  is  postponed   until
        refresh(3x)  or  doupdate is called again.  This allows faster response
-       to commands typed in advance.  Normally, the input FILE pointer  passed
+       to commands typed in advance.  Normally, the input FILE pointer  passed
        to newterm, or stdin in the case that initscr was used, will be used to
        do this typeahead checking.  The typeahead routine specifies  that  the
        file descriptor fd is to be used to check for typeahead instead.  If fd
@@ -237,106 +237,119 @@
        completion,  unless  otherwise   noted   in   the   preceding   routine
        descriptions.
 
-       X/Open  does  not define any error conditions.  In this implementation,
-       functions with a window parameter will return an error if it  is  null.
-       Any  function  will  also  return  an  error  if  the  terminal was not
-       initialized.  Also,
+       X/Open   Curses  does  not  specify  any  error  conditions.   In  this
+       implementation, functions with a window parameter will return an  error
+       if  it is null.  Any function will also return an error if the terminal
+       was not initialized.  Also,
 
           halfdelay
                returns an error if its parameter is outside the range 1..255.
 
 
 

NOTES

-       Note that echo, noecho, halfdelay, intrflush, meta, nl, nonl,  nodelay,
-       notimeout, noqiflush, qiflush, timeout, and wtimeout may be macros.
+       echo, noecho, halfdelay, intrflush, meta, nl, nonl, nodelay, notimeout,
+       noqiflush, qiflush, timeout, and wtimeout may be implemented as macros.
 
-       The  noraw  and  nocbreak calls follow historical practice in that 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
+       noraw  and  nocbreak follow historical practice in that they attempt to
+       restore normal ("cooked") mode from raw and cbreak modes  respectively.
+       Mixing  raw/noraw  and  cbreak/nocbreak  calls leads to terminal driver
+       control states that are hard to predict or understand; doing so is  not
        recommended.
 
 
 

EXTENSIONS

-       This implementation provides four functions which may be used to detect
-       if the corresponding flags were set or reset:
+       ncurses provides four "is_" functions that may be used to detect if the
+       corresponding flags were set or reset.
 
-       Query       Set      Reset
-       ------------------------------
-       is_cbreak   cbreak   nocbreak
-       is_echo     echo     noecho
-       is_nl       nl       nonl
-       is_raw      raw      noraw
+                            Query       Set      Reset
+                            ------------------------------
+                            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,
+       1   if the flag is set,
 
-       0    if the flag is reset, or
+       0   if the flag is reset, or
 
-       -1   if the curses library was not initialized.
+       -1  if the library is not initialized.
 
-       These routines are specific to ncurses.  They  were  not  supported  on
-       Version 7, BSD or System V implementations.  It is recommended that any
-       code   depending   on   ncurses   extensions   be   conditioned   using
-       NCURSES_VERSION.
+       They were designed for ncurses(3x), and are not found in  SVr4  curses,
+       4.4BSD curses, or any other previous curses implementation.
 
 
 

PORTABILITY

-       Except  as  noted  in  the  section  on extensions, these functions are
-       described in the XSI Curses standard, Issue 4.
-
-       The ncurses library obeys the XPG4 standard and the historical practice
-       of  the  AT&T  curses  implementations, in that the echo bit is cleared
-       when curses initializes the terminal state.  BSD curses  differed  from
-       this  slightly;  it left the echo bit on at initialization, but the BSD
-       raw call turned it off as a side-effect.   For  best  portability,  set
-       echo  or  noecho  explicitly  just  after  initialization, even if your
-       program remains in cooked mode.
-
-       The XSI Curses standard is ambiguous on the  question  of  whether  raw
-       should  disable  the  CRLF translations controlled by nl and nonl.  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.
-
-       When keypad is first enabled, ncurses loads the key-definitions for the
-       current terminal description.  If  the  terminal  description  includes
-       extended  string  capabilities,  e.g., from using the -x option of tic,
-       then ncurses 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
+       Applications employing ncurses extensions should condition their use on
+       the visibility of the NCURSES_VERSION preprocessor macro.
+
+       Except as noted in section "EXTENSIONS" above, X/Open Curses, Issue  4,
+       Version 2 describes these functions.
+
+       ncurses  follows  X/Open  Curses  and  the  historical practice of AT&T
+       curses implementations, in that the echo bit  is  cleared  when  curses
+       initializes   the  terminal  state.   BSD  curses  differed  from  this
+       slightly; it left the echo bit on at initialization, but  the  BSD  raw
+       call turned it off as a side effect.  For best portability, set echo or
+       noecho explicitly just  after  initialization,  even  if  your  program
+       remains in cooked mode.
+
+       X/Open  Curses  is  ambiguous  regarding whether raw should disable the
+       CR/LF translations controlled by nl and nonl.  BSD curses did turn  off
+       these  translations;  AT&T  curses  (at least as late as SVr1) did not.
+       ncurses 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 keypad is first enabled, ncurses loads the key definitions for the
+       current  terminal  description.   If  the terminal description includes
+       extended string capabilities, e.g., from using the -x  option  of  tic,
+       then  ncurses  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
-       keyname function (which will then return  a  name  beginning  with  "k"
-       denoting  the terminfo capability name rather than "K", used for curses
-       key-names).  On the other hand, an application can  use  define_key  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  tigetstr,  and  reassign  the  keycode to match its own
+       keyname(3x)  function (which will then return a name beginning with "k"
+       denoting the terminfo capability name rather than "K", used for  curses
+       key  names).   On the other hand, an application can use define_key(3x)
+       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 tigetstr, and reassign  the  keycode  to  match  its  own
        needs.
 
        Low-level applications can use tigetstr to obtain the definition of any
-       particular  string capability.  Higher-level applications which use the
-       curses wgetch and similar functions to return keycodes  rely  upon  the
+       particular string capability.  Higher-level applications which use  the
+       curses  wgetch  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 wgetch can  return  only  one  keycode.
+       has  the  same  string  value, then wgetch can return only one keycode.
        Most curses implementations (including ncurses) 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
-       ncurses, 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  order  defined  by the array of string capability names.  The last
+       key to be loaded determines the keycode which  will  be  returned.   In
+       ncurses,  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.
 
 
+

HISTORY

+       Formerly, ncurses used  nl  and  nonl  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 pcurses source (1986), which
+       used ioctl(2) calls and the sgttyb structure,  to  termios  (the  POSIX
+       terminal  API).   In  the former, both input and output were controlled
+       via a single option CRMOD, while the latter separates  these  features.
+       Because  that  conversion  interferes with output optimization, ncurses
+       6.2 (2020) amended nl and nonl to eliminate their effect on output.
+
+
 

SEE ALSO

-       curses(3x),     curs_getch(3x),     curs_initscr(3x),    curs_util(3x),
+       curses(3x),    curs_getch(3x),     curs_initscr(3x),     curs_util(3x),
        define_key(3x), termios(3)
 
 
 
-ncurses 6.4                       2023-12-16                   curs_inopts(3x)
+ncurses 6.5                       2024-04-13                   curs_inopts(3x)