]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_util.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / curs_util.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>unctrl</B>,   <B>keyname</B>,   <B>filter</B>,   <B>use_env</B>,   <B>putwin</B>,  <B>getwin</B>,
9        <B>delay_output</B>, <B>flushinp</B> - miscellaneous <B>curses</B> utility rou-
10        tines
11
12
13 </PRE>
14 <H2>SYNOPSIS</H2><PRE>
15        <B>#include</B> <B>&lt;curses.h&gt;</B>
16
17        <B>char</B> <B>*unctrl(chtype</B> <B>c);</B>
18        <B>char</B> <B>*keyname(int</B> <B>c);</B>
19        <B>void</B> <B>filter(void);</B>
20        <B>void</B> <B>use_env(char</B> <B>bool);</B>
21        <B>int</B> <B>putwin(WINDOW</B> <B>*win,</B> <B>FILE</B> <B>*filep);</B>
22        <B>WINDOW</B> <B>*getwin(FILE</B> <B>*filep);</B>
23        <B>int</B> <B>delay_output(int</B> <B>ms);</B>
24        <B>int</B> <B>flushinp(void);</B>
25
26
27 </PRE>
28 <H2>DESCRIPTION</H2><PRE>
29        The  <B>unctrl</B> macro expands to a character string which is a
30        printable representation  of  the  character  <I>c</I>.   Control
31        characters  are  displayed  in  the <B>^</B><I>X</I> notation.  Printing
32        characters are displayed as is.
33
34        The <B>keyname</B> routine returns a character string correspond-
35        ing to the key <I>c</I>.
36
37        The <B>filter</B> routine, if used, must be called before <B>initscr</B>
38        or <B>newterm</B> are called.  The effect is that,  during  those
39        calls,  <B>LINES</B>  is  set  to 1; the capabilities <B>clear</B>, <B>cup</B>,
40        <B>cud</B>, <B>cud1</B>, <B>cuu1</B>, <B>cuu</B>,  <B>vpa</B>  are  disabled;  and  the  <B>home</B>
41        string is set to the value of <B>cr</B>.
42
43        The  <B>use_env</B> routine, if used, is called before <B>initscr</B> or
44        <B>newterm</B> are called.  When called with <B>FALSE</B>  as  an  argu-
45        ment,  the  values  of  <B>lines</B> and <B>columns</B> specified in the
46        <I>terminfo</I> database will be used, even if environment  vari-
47        ables  <B>LINES</B>  and <B>COLUMNS</B> (used by default) are set, or if
48        <B>curses</B> is running in  a  window  (in  which  case  default
49        behavior  would  be  to  use  the window size if <B>LINES</B> and
50        <B>COLUMNS</B> are not set).
51
52        The <B>putwin</B> routine writes all data associated with  window
53        <I>win</I> into the file to which <I>filep</I> points.  This information
54        can be later retrieved using the <B>getwin</B> function.
55
56        The <B>getwin</B> routine reads window related data stored in the
57        file  by <B>putwin</B>.  The routine then creates and initializes
58        a new window using that data.  It returns a pointer to the
59        new window.
60
61        The  <B>delay_output</B>  routine inserts an <I>ms</I> millisecond pause
62        in output.  This routine should not  be  used  extensively
63        because  padding  characters  are  used  rather than a CPU
64        pause.
65        The <B>flushinp</B> routine throws away any  typeahead  that  has
66        been  typed  by  the user and has not yet been read by the
67        program.
68
69
70 </PRE>
71 <H2>RETURN VALUE</H2><PRE>
72        Except for  <B>flushinp</B>,  routines  that  return  an  integer
73        return  <B>ERR</B>  upon  failure and <B>OK</B> (SVr4 specifies only "an
74        integer value other than <B>ERR</B>") upon successful completion.
75
76        <B>flushinp</B> always returns <B>OK</B>.
77
78        Routines that return pointers return <B>NULL</B> on error.
79
80
81 </PRE>
82 <H2>PORTABILITY</H2><PRE>
83        The  XSI  Curses  standard,  Issue 4 describes these func-
84        tions.
85
86        The SVr4 documentation describes the action of <B>filter</B> only
87        in  the  vaguest  terms.   The description here is adapted
88        from the XSI Curses standard (which erroneously  fails  to
89        describe the disabling of <B>cuu</B>).
90
91
92 </PRE>
93 <H2>NOTES</H2><PRE>
94        Note  that  <B>unctrl</B>  is  a macro, which is defined in &lt;<B>unc-</B>
95        <B>trl.h</B>&gt;.
96
97
98 </PRE>
99 <H2>SEE ALSO</H2><PRE>
100        <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>.
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 </PRE>
128 <HR>
129 <ADDRESS>
130 Man(1) output converted with
131 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
132 </ADDRESS>
133 </BODY>
134 </HTML>