blob: ca7495272d330d51af7f793f152149a67d0cbe3a [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
2.\" Copyright (c) 2000-2005,2007 Free Software Foundation, Inc. *
3.\" *
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: *
11.\" *
12.\" The above copyright notice and this permission notice shall be included *
13.\" in all copies or substantial portions of the Software. *
14.\" *
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. *
22.\" *
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 *
26.\" authorization. *
27.\"***************************************************************************
28.\"
29.\" $Id: curs_trace.3x,v 1.8 2007/02/24 17:33:49 tom Exp $
30.TH curs_trace 3X ""
31.na
32.hy 0
33.SH NAME
34\fB_tracef\fR,
35\fB_tracedump\fR,
36\fB_traceattr\fR,
37\fB_traceattr2\fR,
38\fB_nc_tracebits\fR,
39\fB_tracechar\fR,
40\fB_tracechtype\fR,
41\fB_tracechtype2\fR,
42\fB_tracemouse\fR,
43\fBtrace\fR - \fBcurses\fR debugging routines
44.ad
45.hy
46.SH SYNOPSIS
47\fB#include <curses.h>\fR
48.sp
49\fBvoid _tracef(const char *format, ...);\fR
50.br
51\fBvoid _tracedump(const char *label, WINDOW *win);\fR
52.br
53\fBchar *_traceattr(attr_t attr);\fR
54.br
55\fBchar *_traceattr2(int buffer, chtype ch);\fR
56.br
57\fBchar *_nc_tracebits(void);\fR
58.br
59\fBchar *_tracechar(int);\fR
60.br
61\fBchar *_tracechtype(chtype ch);\fR
62.br
63\fBchar *_tracechtype2(int buffer, chtype ch);\fR
64.br
65\fBchar *_tracemouse(const MEVENT *event);\fR
66.br
67\fBvoid trace(const unsigned int param);\fR
68.SH DESCRIPTION
69The \fBtrace\fR routines are used for debugging the ncurses libraries,
70as well as applications which use the ncurses libraries.
71These functions are normally available only with the debugging library
72\fIlibncurses_g.a\fR, but may be compiled into any model (shared, static,
73profile) by defining the symbol \fBTRACE\fR.
74.PP
75The principal parts of this interface are the \fBtrace\fR routine which
76selectively enables different tracing features, and the \fB_tracef\fR
77routine which writes formatted data to the \fItrace\fR file.
78.PP
79Calling \fBtrace\fR with a nonzero parameter opens the file \fBtrace\fR
80in the current directory for output. The parameter is formed by OR'ing
81values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB<curses.h>\fR.
82These include:
83.TP 5
84TRACE_DISABLE
85turn off tracing.
86.TP 5
87TRACE_TIMES
88trace user and system times of updates.
89.TP 5
90TRACE_TPUTS
91trace tputs calls.
92.TP 5
93TRACE_UPDATE
94trace update actions, old & new screens.
95.TP 5
96TRACE_MOVE
97trace cursor movement and scrolling.
98.TP 5
99TRACE_CHARPUT
100trace all character outputs.
101.TP 5
102TRACE_ORDINARY
103trace all update actions.
104The old and new screen contents are written to the trace file
105for each refresh.
106.TP 5
107TRACE_CALLS
108trace all curses calls.
109The parameters for each call are traced, as well as return values.
110.TP 5
111TRACE_VIRTPUT
112trace virtual character puts, i.e., calls to \fBaddch\fR.
113.TP 5
114TRACE_IEVENT
115trace low-level input processing, including timeouts.
116.TP 5
117TRACE_BITS
118trace state of TTY control bits.
119.TP 5
120TRACE_ICALLS
121trace internal/nested calls.
122.TP 5
123TRACE_CCALLS
124trace per-character calls.
125.TP 5
126TRACE_DATABASE
127trace read/write of terminfo/termcap data.
128.TP 5
129TRACE_ATTRS
130trace changes to video attributes and colors.
131.TP 5
132TRACE_MAXIMUM
133maximum trace level, enables all of the separate trace features.
134.PP
135Some tracing features are enabled whenever the \fBtrace\fR parameter
136is nonzero. Some features overlap.
137The specific names are used as a guideline.
138.SH RETURN VALUE
139Routines which return a value are designed to be used as parameters
140to the \fB_tracef\fR routine.
141.SH PORTABILITY
142These functions are not part of the XSI interface.
143Some other curses implementations are known to
144have similar, undocumented features,
145but they are not compatible with ncurses.
146.SH SEE ALSO
147\fBcurses\fR(3X).
148.\"#
149.\"# The following sets edit modes for GNU EMACS
150.\"# Local Variables:
151.\"# mode:nroff
152.\"# fill-column:79
153.\"# End: