summaryrefslogtreecommitdiffstats
path: root/ncurses-5.2/doc/html/man/curs_util.3x.html
blob: 5fc178cc7f76474098c556f4266173906a0714f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<HTML>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->

</PRE>
<H2>NAME</H2><PRE>
       <B>unctrl</B>,   <B>keyname</B>,   <B>filter</B>,   <B>use_env</B>,   <B>putwin</B>,  <B>getwin</B>,
       <B>delay_output</B>, <B>flushinp</B> - miscellaneous <B>curses</B> utility rou-
       tines


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>#include</B> <B>&lt;curses.h&gt;</B>

       <B>char</B> <B>*unctrl(chtype</B> <B>c);</B>
       <B>char</B> <B>*keyname(int</B> <B>c);</B>
       <B>void</B> <B>filter(void);</B>
       <B>void</B> <B>use_env(char</B> <B>bool);</B>
       <B>int</B> <B>putwin(WINDOW</B> <B>*win,</B> <B>FILE</B> <B>*filep);</B>
       <B>WINDOW</B> <B>*getwin(FILE</B> <B>*filep);</B>
       <B>int</B> <B>delay_output(int</B> <B>ms);</B>
       <B>int</B> <B>flushinp(void);</B>


</PRE>
<H2>DESCRIPTION</H2><PRE>
       The  <B>unctrl</B> macro expands to a character string which is a
       printable representation  of  the  character  <I>c</I>.   Control
       characters  are  displayed  in  the <B>^</B><I>X</I> notation.  Printing
       characters are displayed as is.

       The <B>keyname</B> routine returns a character string correspond-
       ing to the key <I>c</I>.

       The <B>filter</B> routine, if used, must be called before <B>initscr</B>
       or <B>newterm</B> are called.  The effect is that,  during  those
       calls,  <B>LINES</B>  is  set  to 1; the capabilities <B>clear</B>, <B>cup</B>,
       <B>cud</B>, <B>cud1</B>, <B>cuu1</B>, <B>cuu</B>,  <B>vpa</B>  are  disabled;  and  the  <B>home</B>
       string is set to the value of <B>cr</B>.

       The  <B>use_env</B> routine, if used, is called before <B>initscr</B> or
       <B>newterm</B> are called.  When called with <B>FALSE</B>  as  an  argu-
       ment,  the  values  of  <B>lines</B> and <B>columns</B> specified in the
       <I>terminfo</I> database will be used, even if environment  vari-
       ables  <B>LINES</B>  and <B>COLUMNS</B> (used by default) are set, or if
       <B>curses</B> is running in  a  window  (in  which  case  default
       behavior  would  be  to  use  the window size if <B>LINES</B> and
       <B>COLUMNS</B> are not set).

       The <B>putwin</B> routine writes all data associated with  window
       <I>win</I> into the file to which <I>filep</I> points.  This information
       can be later retrieved using the <B>getwin</B> function.

       The <B>getwin</B> routine reads window related data stored in the
       file  by <B>putwin</B>.  The routine then creates and initializes
       a new window using that data.  It returns a pointer to the
       new window.

       The  <B>delay_output</B>  routine inserts an <I>ms</I> millisecond pause
       in output.  This routine should not  be  used  extensively
       because  padding  characters  are  used  rather than a CPU
       pause.
       The <B>flushinp</B> routine throws away any  typeahead  that  has
       been  typed  by  the user and has not yet been read by the
       program.


</PRE>
<H2>RETURN VALUE</H2><PRE>
       Except for  <B>flushinp</B>,  routines  that  return  an  integer
       return  <B>ERR</B>  upon  failure and <B>OK</B> (SVr4 specifies only "an
       integer value other than <B>ERR</B>") upon successful completion.

       <B>flushinp</B> always returns <B>OK</B>.

       Routines that return pointers return <B>NULL</B> on error.


</PRE>
<H2>PORTABILITY</H2><PRE>
       The  XSI  Curses  standard,  Issue 4 describes these func-
       tions.

       The SVr4 documentation describes the action of <B>filter</B> only
       in  the  vaguest  terms.   The description here is adapted
       from the XSI Curses standard (which erroneously  fails  to
       describe the disabling of <B>cuu</B>).


</PRE>
<H2>NOTES</H2><PRE>
       Note  that  <B>unctrl</B>  is  a macro, which is defined in &lt;<B>unc-</B>
       <B>trl.h</B>&gt;.


</PRE>
<H2>SEE ALSO</H2><PRE>
       <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></B>, <B><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></B>.


























</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>