ncurses 5.9 - patch 20150214
[ncurses.git] / doc / html / man / curs_trace.3x.html
1 <!-- 
2   ****************************************************************************
3   * Copyright (c) 2000-2009,2010 Free Software Foundation, Inc.              *
4   *                                                                          *
5   * Permission is hereby granted, free of charge, to any person obtaining a  *
6   * copy of this software and associated documentation files (the            *
7   * "Software"), to deal in the Software without restriction, including      *
8   * without limitation the rights to use, copy, modify, merge, publish,      *
9   * distribute, distribute with modifications, sublicense, and/or sell       *
10   * copies of the Software, and to permit persons to whom the Software is    *
11   * furnished to do so, subject to the following conditions:                 *
12   *                                                                          *
13   * The above copyright notice and this permission notice shall be included  *
14   * in all copies or substantial portions of the Software.                   *
15   *                                                                          *
16   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23   *                                                                          *
24   * Except as contained in this notice, the name(s) of the above copyright   *
25   * holders shall not be used in advertising or otherwise to promote the     *
26   * sale, use or other dealings in this Software without prior written       *
27   * authorization.                                                           *
28   ****************************************************************************
29   * @Id: curs_trace.3x,v 1.12 2010/12/04 18:40:45 tom Exp @
30 -->
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
32 <HTML>
33 <HEAD>
34 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
35 <meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
36 <TITLE>curs_trace 3x</TITLE>
37 <link rev=made href="mailto:bug-ncurses@gnu.org">
38 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39 </HEAD>
40 <BODY>
41 <H1>curs_trace 3x</H1>
42 <HR>
43 <PRE>
44 <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>                                           <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
45
46
47
48
49 </PRE>
50 <H2><a name="h2-NAME">NAME</a></H2><PRE>
51        <STRONG>_tracef</STRONG>, <STRONG>_tracedump</STRONG>, <STRONG>_traceattr</STRONG>, <STRONG>_traceattr2</STRONG>,
52        <STRONG>_nc_tracebits</STRONG>, <STRONG>_tracecchar_t</STRONG>, <STRONG>_tracecchar_t2</STRONG>, <STRONG>_tracechar</STRONG>,
53        <STRONG>_tracechtype</STRONG>, <STRONG>_tracechtype2</STRONG>, <STRONG>_tracemouse</STRONG>, <STRONG>trace</STRONG> - <STRONG>curses</STRONG>
54        debugging routines
55
56
57 </PRE>
58 <H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
59        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
60
61        <STRONG>void</STRONG> <STRONG>_tracef(const</STRONG> <STRONG>char</STRONG> <STRONG>*format,</STRONG> <STRONG>...);</STRONG>
62        <STRONG>void</STRONG> <STRONG>_tracedump(const</STRONG> <STRONG>char</STRONG> <STRONG>*label,</STRONG> <STRONG>WINDOW</STRONG> <STRONG>*win);</STRONG>
63        <STRONG>char</STRONG> <STRONG>*_traceattr(attr_t</STRONG> <STRONG>attr);</STRONG>
64        <STRONG>char</STRONG> <STRONG>*_traceattr2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch);</STRONG>
65        <STRONG>char</STRONG> <STRONG>*_nc_tracebits(void);</STRONG>
66        <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>_tracecchar_t(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*string);</STRONG>
67        <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>_tracecchar_t2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*string);</STRONG>
68        <STRONG>char</STRONG> <STRONG>*_tracechar(int</STRONG> <STRONG>ch);</STRONG>
69        <STRONG>char</STRONG> <STRONG>*_tracechtype(chtype</STRONG> <STRONG>ch);</STRONG>
70        <STRONG>char</STRONG> <STRONG>*_tracechtype2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch);</STRONG>
71        <STRONG>char</STRONG> <STRONG>*_tracemouse(const</STRONG> <STRONG>MEVENT</STRONG> <STRONG>*event);</STRONG>
72        <STRONG>void</STRONG> <STRONG>trace(const</STRONG> <STRONG>unsigned</STRONG> <STRONG>int</STRONG> <STRONG>param);</STRONG>
73
74
75 </PRE>
76 <H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
77        The <STRONG>trace</STRONG> routines are used for debugging the ncurses  li-
78        braries, as well as applications which use the ncurses li-
79        braries.  These functions are normally available only with
80        the  debugging library <EM>libncurses</EM><STRONG>_</STRONG><EM>g.a</EM>, but may be compiled
81        into any model (shared, static, profile) by  defining  the
82        symbol  <STRONG>TRACE</STRONG>.   Additionally,  some  functions  are  only
83        available with the wide-character configuration of the li-
84        braries.
85
86        The  principal  parts of this interface are the <STRONG>trace</STRONG> rou-
87        tine which selectively enables different tracing features,
88        and the <STRONG>_tracef</STRONG> routine which writes formatted data to the
89        <EM>trace</EM> file.
90
91        Calling <STRONG>trace</STRONG> with a  nonzero  parameter  opens  the  file
92        <STRONG>trace</STRONG>  in the current directory for output.  The parameter
93        is formed by OR'ing values from the list of <STRONG>TRACE_</STRONG><EM>xxx</EM> def-
94        initions in <STRONG>&lt;curses.h&gt;</STRONG>.  These include:
95
96        TRACE_DISABLE
97             turn off tracing.
98
99        TRACE_TIMES
100             trace user and system times of updates.
101
102        TRACE_TPUTS
103             trace tputs calls.
104
105        TRACE_UPDATE
106             trace update actions, old &amp; new screens.
107
108        TRACE_MOVE
109             trace cursor movement and scrolling.
110
111        TRACE_CHARPUT
112             trace all character outputs.
113
114        TRACE_ORDINARY
115             trace  all  update  actions.   The old and new screen
116             contents are written to the trace file for  each  re-
117             fresh.
118
119        TRACE_CALLS
120             trace all curses calls.  The parameters for each call
121             are traced, as well as return values.
122
123        TRACE_VIRTPUT
124             trace virtual character puts, i.e., calls to <STRONG>addch</STRONG>.
125
126        TRACE_IEVENT
127             trace low-level input processing, including timeouts.
128
129        TRACE_BITS
130             trace state of TTY control bits.
131
132        TRACE_ICALLS
133             trace internal/nested calls.
134
135        TRACE_CCALLS
136             trace per-character calls.
137
138        TRACE_DATABASE
139             trace read/write of terminfo/termcap data.
140
141        TRACE_ATTRS
142             trace changes to video attributes and colors.
143
144        TRACE_MAXIMUM
145             maximum trace level,  enables  all  of  the  separate
146             trace features.
147
148        Some  tracing  features are enabled whenever the <STRONG>trace</STRONG> pa-
149        rameter is nonzero.  Some features overlap.  The  specific
150        names are used as a guideline.
151
152        These  functions check the <STRONG>NCURSES_TRACE</STRONG> environment vari-
153        able, to set the tracing feature as if <STRONG>trace</STRONG> was called:
154               filter,  initscr,  new_prescr,  newterm,  nofilter,
155               ripoffline, setupterm, slk_init, tgetent
156
157
158
159 </PRE>
160 <H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
161        Routines  which  return a value are designed to be used as
162        parameters to the <STRONG>_tracef</STRONG> routine.
163
164
165 </PRE>
166 <H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
167        These functions are not part of the XSI  interface.   Some
168        other  curses  implementations  are known to have similar,
169        undocumented features, but they are  not  compatible  with
170        ncurses.
171
172
173 </PRE>
174 <H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
175        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
176
177
178
179                                                          <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
180 </PRE>
181 <div class="nav">
182 <ul>
183 <li><a href="#h2-NAME">NAME</a></li>
184 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
185 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
186 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
187 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
188 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
189 </ul>
190 </div>
191 </BODY>
192 </HTML>