home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / crssrc12 / doc.ii < prev    next >
Text File  |  1993-07-29  |  2KB  |  117 lines

  1. .\" Copyright 1980 Kenneth C. R. C. Arnold and The Regents of the
  2. .\" University of California.  Permission is granted to freely
  3. .\" distribute curses and its documentation provided that this
  4. .\" notice is left intact.
  5. .\"
  6. .\"    @(#)doc.II    6.1 (Berkeley) 4/23/86
  7. .\"
  8. .Ds
  9. .Fd cbreak "" \*m
  10. .Fd nocbreak "" \*m
  11. .Fd crmode "" \*m
  12. .Fd nocrmode "" \*m
  13. .De
  14. Set or unset the terminal to/from cbreak mode.
  15. The misnamed macros
  16. .Fn crmode
  17. and
  18. .Fn nocrmode
  19. are retained for backwards compatibility
  20. with ealier versions of the library.
  21. .Ds
  22. .Fd echo "" \*m
  23. .Fd noecho "" \*m
  24. .De
  25. Sets the terminal to echo or not echo characters.
  26. .Ds
  27. .Fd getch "" \*m
  28. .Fd wgetch win
  29. WINDOW    *win;
  30. .De
  31. Gets a character from the terminal and (if necessary)
  32. echos it on the window.
  33. \*(Es
  34. Otherwise, the character gotten is returned.
  35. If
  36. .i noecho
  37. has been set, then the window is left unaltered.
  38. In order to retain control of the terminal,
  39. it is necessary to have one of
  40. .i noecho ,
  41. .i cbreak ,
  42. or
  43. .i rawmode
  44. set.
  45. If you do not set one,
  46. whatever routine you call to read characters will set
  47. .i cbreak
  48. for you,
  49. and then reset to the original mode when finished.
  50. .Ds
  51. .Fd getstr str \*m
  52. char    *str;
  53. .Fd wgetstr win\*,str
  54. WINDOW    *win;
  55. char    *str;
  56. .De
  57. Get a string through the window
  58. and put it in the location pointed to by
  59. .Vn str ,
  60. which is assumed to be large enough to handle it.
  61. It sets tty modes if necessary,
  62. and then calls
  63. .Fn getch
  64. (or
  65. .Fn wgetch ) "" win
  66. to get the characters needed to fill in the string
  67. until a newline or EOF is encountered.
  68. The newline stripped off the string.
  69. \*(Es
  70. .Ds
  71. .Fd \*_putchar c
  72. char    c;
  73. .De
  74. Put out a character using the
  75. .Fn putchar
  76. macro.
  77. This function is used to output every character
  78. that
  79. .b curses
  80. generates.
  81. Thus,
  82. it can be redefined by the user who wants to do non-standard things
  83. with the output.
  84. It is named with an initial \*(lq\*_\*(rq
  85. because it usually should be invisible to the programmer.
  86. .Ds
  87. .Fd raw "" \*m
  88. .Fd noraw "" \*m
  89. .De
  90. Set or unset the terminal to/from raw mode.
  91. On version 7
  92. .Un \**
  93. .(f
  94. \**
  95. .Un
  96. is a trademark of Bell Laboratories.
  97. .)f
  98. this also turns of newline mapping
  99. (see
  100. .Fn nl ).
  101. .Ds
  102. .Fd scanw fmt\*,arg1\*,arg2\*,...
  103. char    *fmt;
  104. .Fd wscanw win\*,fmt\*,arg1\*,arg2\*,...
  105. WINDOW    *win;
  106. char    *fmt;
  107. .De
  108. Perform a
  109. .Fn scanf
  110. through the window using
  111. .Vn fmt .
  112. It does this using consecutive
  113. .Fn getch 's
  114. (or
  115. .Fn wgetch 's). "" win
  116. \*(Es
  117.