home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / curses-bsd4.4 / PSD.doc / doc.II < prev    next >
Encoding:
Text File  |  1994-06-01  |  3.9 KB  |  143 lines

  1. .\" Copyright (c) 1980, 1993
  2. .\"    The Regents of the University of California.  All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)doc.II    8.1 (Berkeley) 6/4/93
  33. .\"
  34. .Ds
  35. .Fd cbreak "" \*m
  36. .Fd nocbreak "" \*m
  37. .Fd crmode "" \*m
  38. .Fd nocrmode "" \*m
  39. .De
  40. Set or unset the terminal to/from cbreak mode.
  41. The misnamed macros
  42. .Fn crmode
  43. and
  44. .Fn nocrmode
  45. are retained for backwards compatibility
  46. with ealier versions of the library.
  47. .Ds
  48. .Fd echo "" \*m
  49. .Fd noecho "" \*m
  50. .De
  51. Sets the terminal to echo or not echo characters.
  52. .Ds
  53. .Fd getch "" \*m
  54. .Fd wgetch win
  55. WINDOW    *win;
  56. .De
  57. Gets a character from the terminal and (if necessary)
  58. echos it on the window.
  59. \*(Es
  60. Otherwise, the character gotten is returned.
  61. If
  62. .i noecho
  63. has been set, then the window is left unaltered.
  64. In order to retain control of the terminal,
  65. it is necessary to have one of
  66. .i noecho ,
  67. .i cbreak ,
  68. or
  69. .i rawmode
  70. set.
  71. If you do not set one,
  72. whatever routine you call to read characters will set
  73. .i cbreak
  74. for you,
  75. and then reset to the original mode when finished.
  76. .Ds
  77. .Fd getstr str \*m
  78. char    *str;
  79. .Fd wgetstr win\*,str
  80. WINDOW    *win;
  81. char    *str;
  82. .De
  83. Get a string through the window
  84. and put it in the location pointed to by
  85. .Vn str ,
  86. which is assumed to be large enough to handle it.
  87. It sets tty modes if necessary,
  88. and then calls
  89. .Fn getch
  90. (or
  91. .Fn wgetch ) "" win
  92. to get the characters needed to fill in the string
  93. until a newline or EOF is encountered.
  94. The newline stripped off the string.
  95. \*(Es
  96. .Ds
  97. .Fd \*_putchar c
  98. char    c;
  99. .De
  100. Put out a character using the
  101. .Fn putchar
  102. macro.
  103. This function is used to output every character
  104. that
  105. .b curses
  106. generates.
  107. Thus,
  108. it can be redefined by the user who wants to do non-standard things
  109. with the output.
  110. It is named with an initial \*(lq\*_\*(rq
  111. because it usually should be invisible to the programmer.
  112. .Ds
  113. .Fd raw "" \*m
  114. .Fd noraw "" \*m
  115. .De
  116. Set or unset the terminal to/from raw mode.
  117. On version 7
  118. .Un \**
  119. .(f
  120. \**
  121. .Un
  122. is a trademark of Bell Laboratories.
  123. .)f
  124. this also turns of newline mapping
  125. (see
  126. .Fn nl ).
  127. .Ds
  128. .Fd scanw fmt\*,arg1\*,arg2\*,...
  129. char    *fmt;
  130. .Fd wscanw win\*,fmt\*,arg1\*,arg2\*,...
  131. WINDOW    *win;
  132. char    *fmt;
  133. .De
  134. Perform a
  135. .Fn scanf
  136. through the window using
  137. .Vn fmt .
  138. It does this using consecutive
  139. .Fn getch 's
  140. (or
  141. .Fn wgetch 's). "" win
  142. \*(Es
  143.