Annotation of 43BSDReno/share/doc/ps1/18.curses/doc.II, revision 1.1

1.1     ! root        1: .\" Copyright (c) 1980 The Regents of the University of California.
        !             2: .\" All rights reserved.
        !             3: .\"
        !             4: .\" Redistribution and use in source and binary forms are permitted
        !             5: .\" provided that the above copyright notice and this paragraph are
        !             6: .\" duplicated in all such forms and that any documentation,
        !             7: .\" advertising materials, and other materials related to such
        !             8: .\" distribution and use acknowledge that the software was developed
        !             9: .\" by the University of California, Berkeley.  The name of the
        !            10: .\" University may not be used to endorse or promote products derived
        !            11: .\" from this software without specific prior written permission.
        !            12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            14: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            15: .\"
        !            16: .\"    @(#)doc.II      6.2 (Berkeley) 3/17/89
        !            17: .\"
        !            18: .Ds
        !            19: .Fd cbreak "" \*m
        !            20: .Fd nocbreak "" \*m
        !            21: .Fd crmode "" \*m
        !            22: .Fd nocrmode "" \*m
        !            23: .De
        !            24: Set or unset the terminal to/from cbreak mode.
        !            25: The misnamed macros
        !            26: .Fn crmode
        !            27: and
        !            28: .Fn nocrmode
        !            29: are retained for backwards compatibility
        !            30: with ealier versions of the library.
        !            31: .Ds
        !            32: .Fd echo "" \*m
        !            33: .Fd noecho "" \*m
        !            34: .De
        !            35: Sets the terminal to echo or not echo characters.
        !            36: .Ds
        !            37: .Fd getch "" \*m
        !            38: .Fd wgetch win
        !            39: WINDOW *win;
        !            40: .De
        !            41: Gets a character from the terminal and (if necessary)
        !            42: echos it on the window.
        !            43: \*(Es
        !            44: Otherwise, the character gotten is returned.
        !            45: If
        !            46: .i noecho
        !            47: has been set, then the window is left unaltered.
        !            48: In order to retain control of the terminal,
        !            49: it is necessary to have one of
        !            50: .i noecho ,
        !            51: .i cbreak ,
        !            52: or
        !            53: .i rawmode
        !            54: set.
        !            55: If you do not set one,
        !            56: whatever routine you call to read characters will set
        !            57: .i cbreak
        !            58: for you,
        !            59: and then reset to the original mode when finished.
        !            60: .Ds
        !            61: .Fd getstr str \*m
        !            62: char   *str;
        !            63: .Fd wgetstr win\*,str
        !            64: WINDOW *win;
        !            65: char   *str;
        !            66: .De
        !            67: Get a string through the window
        !            68: and put it in the location pointed to by
        !            69: .Vn str ,
        !            70: which is assumed to be large enough to handle it.
        !            71: It sets tty modes if necessary,
        !            72: and then calls
        !            73: .Fn getch
        !            74: (or
        !            75: .Fn wgetch ) "" win
        !            76: to get the characters needed to fill in the string
        !            77: until a newline or EOF is encountered.
        !            78: The newline stripped off the string.
        !            79: \*(Es
        !            80: .Ds
        !            81: .Fd \*_putchar c
        !            82: char   c;
        !            83: .De
        !            84: Put out a character using the
        !            85: .Fn putchar
        !            86: macro.
        !            87: This function is used to output every character
        !            88: that
        !            89: .b curses
        !            90: generates.
        !            91: Thus,
        !            92: it can be redefined by the user who wants to do non-standard things
        !            93: with the output.
        !            94: It is named with an initial \*(lq\*_\*(rq
        !            95: because it usually should be invisible to the programmer.
        !            96: .Ds
        !            97: .Fd raw "" \*m
        !            98: .Fd noraw "" \*m
        !            99: .De
        !           100: Set or unset the terminal to/from raw mode.
        !           101: On version 7
        !           102: .Un \**
        !           103: .(f
        !           104: \**
        !           105: .Un
        !           106: is a trademark of Bell Laboratories.
        !           107: .)f
        !           108: this also turns of newline mapping
        !           109: (see
        !           110: .Fn nl ).
        !           111: .Ds
        !           112: .Fd scanw fmt\*,arg1\*,arg2\*,...
        !           113: char   *fmt;
        !           114: .Fd wscanw win\*,fmt\*,arg1\*,arg2\*,...
        !           115: WINDOW *win;
        !           116: char   *fmt;
        !           117: .De
        !           118: Perform a
        !           119: .Fn scanf
        !           120: through the window using
        !           121: .Vn fmt .
        !           122: It does this using consecutive
        !           123: .Fn getch 's
        !           124: (or
        !           125: .Fn wgetch 's). "" win
        !           126: \*(Es

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.