1 .\"***************************************************************************
2 .\" Copyright (c) 2000-2002,2005 Free Software Foundation, Inc. *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a *
5 .\" copy of this software and associated documentation files (the *
6 .\" "Software"), to deal in the Software without restriction, including *
7 .\" without limitation the rights to use, copy, modify, merge, publish, *
8 .\" distribute, distribute with modifications, sublicense, and/or sell *
9 .\" copies of the Software, and to permit persons to whom the Software is *
10 .\" furnished to do so, subject to the following conditions: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 .\" Except as contained in this notice, the name(s) of the above copyright *
24 .\" holders shall not be used in advertising or otherwise to promote the *
25 .\" sale, use or other dealings in this Software without prior written *
27 .\"***************************************************************************
29 .\" $Id: curs_trace.3x,v 1.7 2005/05/15 17:02:54 tom Exp $
43 \fBtrace\fR - \fBcurses\fR debugging routines
47 \fB#include <curses.h>\fR
49 \fBvoid _tracef(const char *format, ...);\fR
51 \fBvoid _tracedump(const char *label, WINDOW *win);\fR
53 \fBchar *_traceattr(attr_t attr);\fR
55 \fBchar *_traceattr2(int buffer, chtype ch);\fR
57 \fBchar *_nc_tracebits(void);\fR
59 \fBchar *_tracechar(const unsigned char ch);\fR
61 \fBchar *_tracechtype(chtype ch);\fR
63 \fBchar *_tracechtype2(int buffer, chtype ch);\fR
65 \fBchar *_tracemouse(const MEVENT *event);\fR
67 \fBvoid trace(const unsigned int param);\fR
69 The \fBtrace\fR routines are used for debugging the ncurses libraries,
70 as well as applications which use the ncurses libraries.
71 These functions are normally available only with the debugging library
72 \fIlibncurses_g.a\fR, but may be compiled into any model (shared, static,
73 profile) by defining the symbol \fBTRACE\fR.
75 The principal parts of this interface are the \fBtrace\fR routine which
76 selectively enables different tracing features, and the \fB_tracef\fR
77 routine which writes formatted data to the \fItrace\fR file.
79 Calling \fBtrace\fR with a nonzero parameter opens the file \fBtrace\fR
80 in the current directory for output. The parameter is formed by OR'ing
81 values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB<curses.h>\fR.
88 trace user and system times of updates.
94 trace update actions, old & new screens.
97 trace cursor movement and scrolling.
100 trace all character outputs.
103 trace all update actions.
104 The old and new screen contents are written to the trace file
108 trace all curses calls.
109 The parameters for each call are traced, as well as return values.
112 trace virtual character puts, i.e., calls to \fBaddch\fR.
115 trace low-level input processing, including timeouts.
118 trace state of TTY control bits.
121 trace internal/nested calls.
124 trace per-character calls.
127 trace read/write of terminfo/termcap data.
130 trace changes to video attributes and colors.
133 maximum trace level, enables all of the separate trace features.
135 Some tracing features are enabled whenever the \fBtrace\fR parameter
136 is nonzero. Some features overlap.
137 The specific names are used as a guideline.
139 Routines which return a value are designed to be used as parameters
140 to the \fB_tracef\fR routine.
142 These functions are not part of the XSI interface.
143 Some other curses implementations are known to
144 have similar, undocumented features,
145 but they are not compatible with ncurses.
149 .\"# The following sets edit modes for GNU EMACS
150 .\"# Local Variables: