1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
3 ****************************************************************************
4 * Copyright (c) 2000,2002 Free Software Foundation, Inc. *
6 * Permission is hereby granted, free of charge, to any person obtaining a *
7 * copy of this software and associated documentation files (the *
8 * "Software"), to deal in the Software without restriction, including *
9 * without limitation the rights to use, copy, modify, merge, publish, *
10 * distribute, distribute with modifications, sublicense, and/or sell *
11 * copies of the Software, and to permit persons to whom the Software is *
12 * furnished to do so, subject to the following conditions: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
25 * Except as contained in this notice, the name(s) of the above copyright *
26 * holders shall not be used in advertising or otherwise to promote the *
27 * sale, use or other dealings in this Software without prior written *
29 ****************************************************************************
30 * @Id: curs_trace.3x,v 1.5 2002/02/16 22:39:52 tom Exp @
34 <TITLE>curs_trace 3x</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39 <H1>curs_trace 3x</H1>
42 <!-- Manpage converted by man2html 3.0.1 -->
46 <STRONG>_tracef</STRONG>, <STRONG>_tracedump</STRONG>, <STRONG>_traceattr</STRONG>, <STRONG>_traceattr2</STRONG>,
47 <STRONG>_nc_tracebits</STRONG>, <STRONG>_tracechar</STRONG>, <STRONG>_tracechtype</STRONG>, <STRONG>_tracechtype2</STRONG>,
48 <STRONG>_tracemouse</STRONG>, <STRONG>trace</STRONG> - <STRONG>curses</STRONG> debugging routines
52 <H2>SYNOPSIS</H2><PRE>
53 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
54 <STRONG>void</STRONG> <STRONG>_tracef(const</STRONG> <STRONG>char</STRONG> <STRONG>*format,</STRONG> <STRONG>...);</STRONG>
55 <STRONG>void</STRONG> <STRONG>_tracedump(const</STRONG> <STRONG>char</STRONG> <STRONG>*label,</STRONG> <STRONG>WINDOW</STRONG> <STRONG>*win);</STRONG>
56 <STRONG>char</STRONG> <STRONG>*_traceattr(attr_t</STRONG> <STRONG>attr);</STRONG>
57 <STRONG>char</STRONG> <STRONG>*_traceattr2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch);</STRONG>
58 <STRONG>char</STRONG> <STRONG>*_nc_tracebits(void);</STRONG>
59 <STRONG>char</STRONG> <STRONG>*_tracechar(const</STRONG> <STRONG>unsigned</STRONG> <STRONG>char</STRONG> <STRONG>ch);</STRONG>
60 <STRONG>char</STRONG> <STRONG>*_tracechtype(chtype</STRONG> <STRONG>ch);</STRONG>
61 <STRONG>char</STRONG> <STRONG>*_tracechtype2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch);</STRONG>
62 <STRONG>char</STRONG> <STRONG>*_tracemouse(const</STRONG> <STRONG>MEVENT</STRONG> <STRONG>*event);</STRONG>
63 <STRONG>void</STRONG> <STRONG>trace(const</STRONG> <STRONG>unsigned</STRONG> <STRONG>int</STRONG> <STRONG>param);</STRONG>
67 <H2>DESCRIPTION</H2><PRE>
68 The <STRONG>trace</STRONG> routines are used for debugging the ncurses
69 libraries, as well as applications which use the ncurses
70 libraries. These functions are normally available only
71 with the debugging library <EM>libncurses</EM><STRONG>_</STRONG><EM>g.a</EM>, but may be com-
72 piled into any model (shared, static, profile) by defining
73 the symbol <STRONG>TRACE</STRONG>.
75 The principal parts of this interface are the <STRONG>trace</STRONG> rou-
76 tine which selectively enables different tracing features,
77 and the <STRONG>_tracef</STRONG> routine which writes formatted data to the
80 Calling <STRONG>trace</STRONG> with a nonzero parameter opens the file
81 <STRONG>trace</STRONG> in the current directory for output. The parameter
82 is formed by OR'ing values from the list of <STRONG>TRACE_</STRONG><EM>xxx</EM> def-
83 initions in <STRONG><curses.h></STRONG>. These include:
89 trace user and system times of updates.
95 trace update actions, old & new screens.
98 trace cursor movement and scrolling.
101 trace all character outputs.
104 trace all update actions. The old and new screen
105 contents are written to the trace file for each
109 trace all curses calls. The parameters for each call
110 are traced, as well as return values.
113 trace virtual character puts, i.e., calls to <STRONG>addch</STRONG>.
116 trace low-level input processing, including timeouts.
119 trace state of TTY control bits.
122 trace internal/nested calls.
125 trace per-character calls.
128 trace read/write of terminfo/termcap data.
131 trace changes to video attributes and colors.
134 maximum trace level, enables all of the separate
137 Some tracing features are enabled whenever the <STRONG>trace</STRONG>
138 parameter is nonzero. Some features overlap. The
139 specific names are used as a guideline.
143 <H2>RETURN VALUE</H2><PRE>
144 Routines which return a value are designed to be used as
145 parameters to the <STRONG>_tracef</STRONG> routine.
149 <H2>PORTABILITY</H2><PRE>
150 These functions are not part of the XSI interface. Some
151 other curses implementations are known to have similar,
152 undocumented features, but they are not compatible with
157 <H2>SEE ALSO</H2><PRE>
158 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
166 Man(1) output converted with
167 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>